Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

signal generation using the data from matlab script node

Hello Jingjing,

For the loop counts, simply wire an array of two 1s. You'll also want to use burst trigger mode:

Burst Trigger mode—After a start trigger is received, the waveform described by the first stage generates until another trigger is received. At the next trigger, the buffer of the previous stage completes, and then the waveform described by the second stage generates. Once the staging list is exhausted, the waveform generation returns to the first stage and continues to repeat the cycle.

You'll aslo want to use the niFgen Set Waveform Next Write Position VI with the appropriate waveform handle, setting the write position to 0. Afterwards, you'll update the waveform whenever you receive your new data via TCP/IP, then send a start trigger. I'm not sure which VI you are speaking about which cannot be set while running, but this scenario should work just fine.

Regards,
Ryan
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 21 of 25
(5,525 Views)

Hello Ryan:

Sorry to forget to put the name of the vi I refered to. It's "niFgen Create Arbitrary Sequence".

In the help: Notes  The signal generator must not be in the Generating state when you call this VI.

Best Regards!

Jingjing

0 Kudos
Message 22 of 25
(5,523 Views)

Hi Jingjing,

You will be using "niFgen Create Arbitrary Sequence.vi" before you enter the while loop and configure the arbitrary sequence with two waveforms. The waveforms inside the while loop will be referenced with waveform handles. After you receive waveform data from MATLAB, you will replace corresponding data on the onboard memory with fresh data. Then, a software trigger will be sent through LV to change the waveform being generated.

Inside the while loop, you will replace the waveform using "niFgen Set Waveform Next Write Position VI" with the appropriate waveform handle, setting the write position to 0. Afterwards, you'll update the waveform whenever you receive your new data via TCP/IP, then send a software burst trigger.

Let me know if I am not clear on anything....

Thanks,

Kalyan

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 23 of 25
(5,508 Views)
Hi Raajit L, Ryan, Kalyan:
 
Thanks for your kind help^_^
The scheme of arbitrary waveform sequence does work and can generate dynamic waveform as I want.
 
Best Regards!
Jingjing 
0 Kudos
Message 24 of 25
(5,497 Views)
That is great to hear, Jingjing!

Just let us know if you run across any more difficulties (on a new thread Smiley Wink ).

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 25 of 25
(5,475 Views)