LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous signal with tirggered event output

Hi all,

I would like to create an output for my NI-PXI 5421 waveform generator that has a constant output of white noise, and then once triggered by a user event, I would like a discrete analog waveform to be added into the output.   Is this possible?  Does this make sense?

Please help,

Thanks,
Sam
0 Kudos
Message 1 of 4
(2,862 Views)
Hello Sam,

Yes it is possible to do something like what you describe.  I think the easiest way to do this is with scripting and script triggers.  There is an example called niFgen_Arb_Script_Example.vi that ships with the driver that goes over the basics of how to program this.  If you are using LabVIEW you can find it in NI-Example Finder under Hardware Input and Output >> Modular Instruments >> NI-FGEN >> Arbitrary Waveform Generation.  This example allows you to setup a software or hardware trigger.

You will need to modify this to write your two waveforms (one white noise and the other analog waveform).  You would then have a script that generates until it receives a script trigger (repeat until script trigger) and then you would generate the second waveform.  For help creating scripts you can use the Script Editor located in your start menu under Start >> programs >> National Instruments >> NI-FGEN.  There is also documentation inside of the NI Signal Generators Help (also located in your start menu).  If you search for script and there is a section called common scripting use cases that might help.  I hope this gets you started.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 4
(2,846 Views)
Thanks for the advice Jesse

I can't seem to find this example nifgen_arb_script_example.vi.  I'm runnning LV8.0, is this my problem?

sam
0 Kudos
Message 3 of 4
(2,834 Views)
I think I found the problem.  NI-FGen version 2.3.2.  It looks like scripting was introduced for version 2.4 which I am in the process of downloading.
0 Kudos
Message 4 of 4
(2,825 Views)