10-22-2013 03:29 AM
any example program on how to generate a specific waveform? what functions do i need to use?
i want the waveform to have a specific rise time between amplitude levels and specific time during the steady state of such level.
Currently, i use the waveform editor but can not make the signal stay indefinetely at the last part.
Ex: from 0V to 1V, a rise time of 1us and 1V will stay for 5us then after that it go to 4V with a rise time of 2us then stays at 4V indefinitely.
Thanks
.
10-22-2013 05:37 PM
There isnt any example code out there that I know of. However, can get more versatility with scripting. Please see the following white paper: http://www.ni.com/white-paper/2990/en/
You need to make sure your card supports scripting:
http://zone.ni.com/reference/en-XX/help/370524M-01/siggenhelp/features_by_device_smc/
10-23-2013 05:03 PM
Hi xxxNOAHxxx,
Are you using the Analog Waveform Editor? If so, you can save the waveform and then load that waveform using NI-FGEN. You can refer to Fgen Create From File example for this. That example uses the Arbitrary Waveform Output mode. To achieve what you want, you need to specify the trigger mode, (drop a NI-FGEN property node, select Trigger mode under Triggers). Set it to use the NIFGEN_VAL_SINGLE. This tells the driver to only generates the waveform once, and once it finishes, it retains the last value in the waveform, which in your case, the 4V DC.
Alternatively, if your AWG supports the Frequency List Output mode, you can easily specify a list of DC waveforms, each with the durations you want. You can refer to the Fgen Sweep Generator on how to do this. Similarly, you also want to specify Single Trigger mode.
Lastly, you can always use Script output mode if you need to control the generation much further.
Thanks,
- Liusdi