LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change waveform index dynamically

Solved!
Go to solution

I extended the waveform index selection example, and fed the selected waveform into single channel analog output. The analog outputs are triggered by PFI1, which is set to retriggerable. When I start the program, the analog output will be listening, whenever I send a raise signal through PFI1, the selected waveform will be output, and it goes back to listening mode waiting for the next trigger. This works perfectly.

 

However, between PFI1 signals, I changed the waveform index manually, but the next output waveform is still the same. What I want is whenever a trigger comes in, it would increase the waveform index by one, so when the next trigger comes in, the selected waveform becomes the next one. When reaching the last index, it would loop back to zero.

 

 

 

 

Download All
0 Kudos
Message 1 of 3
(2,110 Views)
Solution
Accepted by topic author joehsiao

You could just add a while loop with an custom index:

imagen.png

Sorry I don't have de DAQmx library but there is an example of what you need.

 

Kudos and Solved accepted.

Greetings!!!

Roger Garcia, Certified LabVIEW Developer

HTML tutorial

There are two ways to tell somebody thanks: Kudos and Marked Solutions
Message 2 of 3
(2,067 Views)

Thanks! I just need to take out the "retriggerable" property and let the loop to handle trigger sequence.

0 Kudos
Message 3 of 3
(2,047 Views)