How to Step Through Output Waveforms Using NI-FGENHardware: Signal Sources (AWG/FG/AO)>>Arbitrary Waveform and Function Generators
Problem: I am using NI-FGEN, and I want to output a sequential list of waveforms, having each waveform loop continuously until I send a software trigger. Is this possible, and if so, how can I accomplish this task? Solution: There are two ways that this can be accomplished, burst mode triggering and scripting. Burst Mode Triggering Each waveform you wish to output will correspond to a segment of an arbitrary waveform sequence. The sequence can be configured for burst mode triggering. When set to burst mode triggering, the generation will wait until it recieves a trigger (hardware or software) and then it will output the first waveform of your arbitrary sequency continuously until another trigger is recieved. Once another trigger is recieved the next waveform in the arbitrary sequence will begin to generate continuously until it recieves the next trigger, and so on through the entire arbitrary sequence of waveforms. Once this entire sequence has been stepped through the generation returns to the first waveform in the sequence. One thing to be noted is that if a trigger is recieved in the middle of the generation of one period of a waveform in the sequence, the device will not step to the next waveform until the full waveform from that sequence segment has completed generating. If this were not the case if a trigger were recieved in the middle of the generation of one segment of the sequence, the generation of that sequence would not finish and would move on to the next segment. This could cause some discontinuity in the output waveforms. Please refer to the shipping example Fgen_Arb_Sequence_Example.vi. This example is also provided here as an attachment. There is a version of this example for LabVIEW 7.1 and 8.2 and above attached. For more information about creating arbitrary sequences and burst trigger mode see the NI Signal Generators Help linked below. There is also an extremely well written and detailed Developer Zone article on the triggering modes of some of the Signal Generators. Scripting You can also step through a certain sequence of waveforms, switching on a trigger using scripting. To do this using scripting, you must use the "repeat until" function. In this case you would use a script similar to the following. script myScript4Scripting is only available on some of the NI-Fgen cards. Scripting is available on the following cards. NI 5421 NI 5422 NI 5441 NI 5442 NI 5450 As with burst trigger mode, using the "repeat until" script will repeat the waveform until receiving a trigger. Also, if the trigger comes in the middle of the generation of one waveform segment, the Fgen will wait until that segment has completed generating before moving to the next segment. For a scripting example refer to the shipping example Fgen Arb Script.vi, which is also attached to this document. Related Links: NI Signal Generators Help (June 2008) NI Developer Zone: Triggering Modes Attachments:
Report Date: 07/07/2005 Last Updated: 01/19/2009 Document ID: 3N6FFJBC |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
