07-28-2016 05:48 PM
I am creating a 50 ms waveform with a PXie-5451 in a PXIe-1078 chassis with a PXIe-8840 controller running Labview RT. The waveform is currently triggered with a pulse from a DAQ counter because the timing of the waveform needs to be closely synchronized with data collection on the DAQ. However, this approach is problematic because it is difficult to produce a continuous signal from the 5451 when it is triggered this way. If the waveform is exactly 50 ms long, I will miss the start trigger. I can tolerate losing the end of the waveform, but I cannot tolerate having a gap in the output, and I need the waveform to start exactly on the 50 ms trigger edge. Can I configure the 5451 to accept a start trigger and restart the waveform immediately rather than waiting for the current iteration of the waveform to complete?
I guess I could use a complete event from the 5451 to trigger the DAQ instead, but I am guessing there's a way for me to do what I want.
Solved! Go to Solution.
07-29-2016 02:14 PM - edited 07-29-2016 02:14 PM
Stephen,
The PXIe-1078 chassis provides a 100MHz reference clock (PXIe_CLK100) on the backplane, and you can use the backplane trigger lines to manage the triggering of all devices in your chassis with reference to the same clock. I think this would be a more effective approach from what I gathered based on your description.
It's a bit lengthy, but this page is a great resource: http://www.ni.com/white-paper/11369/en/
I hope this helps!
-Will
07-29-2016 03:50 PM
Thanks, Will. That is probably a better way to synchronize the clocks, and I can make that change. The clocks are currently synchronized to the DAQ clock, which is just an artifact of the order in which I started messing with the boards to learn how to program them.
Forgive my ignorance, though--does that address my problem? It seems like the fundamental issue is that an exactly 50 ms waveform will not be done exactly 50 ms after the trigger is sent, so I have to chop off part of the end of the waveform to get it to start every time on a 20 Hz trigger. Even if I zoom in on a scope and figure out where to cut as precisely as possible, there will always be jitter, so I'll have to have either a gap or some lost cycles. I would much rather just have the waveform terminate and restart immediately when it receives a trigger.
08-01-2016 12:04 PM
Are you familiar with 'script' mode? You might be able to use this sample script:
script restartWhenTriggeredScript repeat forever generate wfm break on scriptTrigger0 repeat forever generate wfm end repeat end break end repeat end script
Basically the idea is that when it receives a trigger, it will stop executing the inner loop, and finishing the outer loop iteration. Then it will start over from the beginning and back to the inner loop again.
Please let us know if that resolve the issue.
08-02-2016 02:28 PM
Thanks for the suggestion. I was not familiar with script mode, but I gave it a shot and it is working perfectly.