02-06-2008 11:33 AM
The help for niFgen Create Waveform (poly) says:
"Takes the data provided and creates an onboard waveform of the same size
for use in Arbitrary Waveform mode or Arbitrary Sequence mode. "
I can only assume "onboard" means in the signal generator's local
memory. The VI has an output for Waveform handle which presumably would let me
access waveforms I have already programmed the generator which as opposed to
resending a wave I have previously sent over the PXI bus again.
In effect I could "preload" my signal generator with several
waveforms and using this Waveform handle select the active one very rapidly.
The function niFgen Allocate Waveform also appears to allow this behavior.
What I am unable to find on the niFgen pallet is any VI that takes the Waveform
Handle as an INPUT so that I can set "Active" waveform to be a
certain handle.
In the example niFgen_Arbitrary_Waveform_Streaming_Example.vi (located at
C:\Program Files\National Instruments\LabVIEW
8.5\examples\instr\niFgen\niFgen_Arbitrary_Waveform_Example.vi) uses a property
node to specify a Streaming Waveform handle but I don't want to stream data
from my host memory, I just want to change which waveform I have active
programmatically using handles.
Thanks for any input or guidance
02-06-2008 03:17 PM
Hello Alex,
There are two ways to do what you want. The first is to use the niFgen Configure Arbitrary Waveform VI, located on the NI-FGEN palette under Waveform Control->Arb Waveform. This VI takes in a waveform handle as an input, along with gain and offset, and configures which of the waveforms in the device's onboard memory will be generated. The second way to do this is to use the niFgen Property Node (located on the palette) - set the "Arbitrary Waveform Handle" property, located under the Arbitrary Waveform submenu. The advantage of the second way is that you don't have to set gain and offset, which are part of the Configure Arbitrary Waveform VI.
One thing to note is that you can only change the "active" waveform when the arbitrary waveform generator is not generating. So if you want to play a waveform and switch to another, you will have to abort the generation, change the waveform, and re-initiate.
Hope that helps...
Drew Creel
NI Software Engineer
Signal Generators