Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse generation with separation time

I have a NI USB-6221 DAQ device and I want to generate square pulses with a separation time between them.

 

For example: I want to generate 2 square pulses of a given frequency and duty cycle. Then I want the DAQ to pause the output for a specified time. Then send 2 more of the same pulses and pause the output again for the same pre-specified time.

 

How can I do that?

0 Kudos
Message 1 of 3
(5,673 Views)

Hi there,

 

To be able to produce square pulses using the USB 6221 you will need to use one of the counter output. There is an example in the Example Finder that can help you achieve this, have a look at the example "Gen Dig Pulse Train-Finite.vi". You can specify the frequency and the duty cycle, as well as the number of pulses you want to generate. Regarding the delay, you can use a Elapsed Time Express VI for the amount of time you want to wait for before producing another set of square wave.

 

Hope this helps.

 

 

Shalini B
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 3
(5,658 Views)

Thanks for your reply.

 

Is the timing in Elapsed Time Express VI controlled by hardware or software? I want to synchronise two devices, light sourse and camera and need to be precise with the timing.

 

I noticed that the second counter output is reserved when I use the Gen Dig Pulse Train-Finite.vi. I presume this is a hardware limitation. Is there any way to use the second counter for output as well?

0 Kudos
Message 3 of 3
(5,650 Views)