Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

4 pulses with different on times of 1ms to 4ms with off time off 3ms to 30ms

I wish to generate 4 pulses with different on times of 1ms,2ms,3ms and 4ms with an off time that can be from 3ms to 30ms between each pulse.
0 Kudos
Message 1 of 19
(3,439 Views)
Michael,

Cany you tell us what hardware you are using? The solution will depend on what type of data acquisition board you are using (M Series, E Series, DIO ...)

Regards,
Anuj D.
0 Kudos
Message 2 of 19
(3,415 Views)
I have a daqpad-6016.
0 Kudos
Message 3 of 19
(3,412 Views)
Hello Michael,

In order to do this, you will need to play around with the duty cycle of the pulse. The duty cycle calculates the duration of the cycle that a square waveform is positive or "high." (The positive width divided by the period * 100.) So, you will need to generate a pulse and be able to change the duty cycle at different times so that you can create the pulses that you want. To begin, you will need to choose whether to use the internal timebase of the board (20MHz or 100MHZ) or use an external clock. Let's pretend you are going to use an external clock of frequency of 1000Hz and you want your first pulse to be ON for 1ms and be OFF for 3ms. In this case, you will need to use a duty cycle of 25%. If you want your second pulse to be ON for 2ms and off for 30ms, then you will need to use a duty cycle of 6.25%. This would be the second duty cycle in your program. You can do the same calculations for the other pulses in your program.

Please let me know if this information was useful and if you have any additional questions about this.

Best regards,

LA
0 Kudos
Message 4 of 19
(3,397 Views)
Hello LA,
I have been trying various methods of implementing your idea of changing the frequency and duty cycle to generate different pulse durations.I have not had any luck tying to cycle the vi.
0 Kudos
Message 5 of 19
(3,378 Views)
Hello LA,

How can I change the frequency and duty cycle after each pulse is generated? Would I use a loop and an array of values that would be read in successive iterations? If you have a sample vi to illustrate, that would be of great help.
0 Kudos
Message 6 of 19
(3,369 Views)
Hello,

Attached you will find a very simple VI that generates 5 pulses with different duty cycles. You can check the pulses being generated using an oscilloscope or another program that can read the pulses. Please let me know if you have any additional questions.

Thanks,

LA
0 Kudos
Message 7 of 19
(3,353 Views)
Hello LA

Thanks for the vi. I tried using it but since I have LabView 7.0, I kept getting an error that it needed 7.1
Is there a version of your vi that would work on 7.0? If not, would you recommend that I upgrade to 7.1? Is there a significant improvement in 7.1 over 7.0?

Thanks again
0 Kudos
Message 8 of 19
(3,346 Views)
Hello,

Attached you will find the VI on LabVIEW 7.0. I would definitely recommend you to upgrade, LabVIEW 7.1 has a lot more new features than LabVIEW 7.0. If you are interested in getting more info about this, please let me know.

thanks,

LA
0 Kudos
Message 9 of 19
(3,340 Views)
Hello LA,

Thanks for the vi. I tried it but the pulse train I need is somewhat different. I have attached a file showing the pulse sequence I wish to generate. I modified your vi slightly to give just one pulse per iteration loop, but the time between iterations seems to be too large (I suspect the DAQmx Clear Task takes quite a while to execute), thus my OFF times are always too long between duty cycle changes (30ms typically). Is there any way I can speed it up?
By the way, I am considering upgrading to 7.1 as well

Thanks and Happy New Year,

JB
0 Kudos
Message 10 of 19
(3,319 Views)