LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I Generate continuous Pluse train with same dutycycle but one pluse different (different duty cycle) for every certain number of Pluses

Hi,
I want to generate a continuous  pluse train with same dutycycle at counter output ,but one pluse with different dutycycle after every 21 pluses in that pluse train.
Can you please send me sample code to achieve this task.
Thanks
Murali
0 Kudos
Message 1 of 4
(3,723 Views)
Hello Murali,
 
For the continuous pulse train you can use an example from the Example Finder that comes with LabVIEW. Go to the Help menu>>Find Examples. Browse Hardware Input and Output>>DAQmx>>Generating Digital Pulses>>Gen Dig Pulse Train-Continuous.vi.
 
For the pulse train with different duty cycles, use Gen Dig Pulse Train-Finite.vi. Put a for loop around the whole program with N = 21. Put a while loop around that. Create an array of duty cycles that you want. Use the iteration of the while loop (i) to index the array of duty cycles and then feed that into the for loop and use it as the input for the duty cycle of DAQmx Create Channel.
 
Then all you have to do is combine these two examples into one program! Please let me know if you have any questions. Have a great day!
 
Sincerely,
Marni S.
0 Kudos
Message 2 of 4
(3,703 Views)
It's great that there's a nice example in labView, but this is a LabWindows forum. Is there also a CVI solution?
0 Kudos
Message 3 of 4
(3,684 Views)

Dear Erwin,

That's what I get for working on a Sunday. There is a LabWindows Example for continuous pulse train generation. (C:\Program Files\National Instruments\CVI71\samples\DAQmx\Counter\Generate Pulse\Dig Pulse Train-Cont.) You can modify this to be finite by changing DAQmxCfgImplicitTiming to finite mode instead of continuous. Please let me know if you have any questions. Have a great day!

Sincerely,

Marni S.

Message 4 of 4
(3,662 Views)