Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control the number of cycles in a triangle pattern

Solved!
Go to solution

Hi, 

I'm quite new Labview programming and finding a hard time coding a simple program. So can someone help me find a way to control the no. of cycles of a triangle pattern.ie, if a button is pressed the code should send a particular no. of waveform Once it's completed the button should toggle back to the orginal state. I have attached the code that I been using working on. The hardware used are NI 6013 & NI6723, together with two BNC-2110 as input and output. 

 

Thanks & Regards,

George

0 Kudos
Message 1 of 3
(3,054 Views)
Solution
Accepted by topic author geojj

Hi,

first of all, if you want to have an application like this, a simple while loop will not be enough. You will need to use a state machine or producer-consumer pattern. You read about them here, you also have quite a few templates and examples in LabVIEW.

Another thing is that for finite generation, it would be better to use the "Finite Samples" sample mode (in the DAQmx Timing.vi configuration).

Message 2 of 3
(3,012 Views)

Hi,

Thanks for the help. I used state -machine and it worked.

 

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