Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate pulses using DOs

Hi,

 

I am using PCI 6229 card for my application. My application needs a pulse generation using a DO  as counters are used to achieve other functionality

Can anyone please tell me if it is possible to generate pulses using DOs? if yes, how to do it?

 

Thanks in advance

 

 

Regards,

 

Prashant

0 Kudos
Message 1 of 2
(3,276 Views)

@PCSNF wrote:

Hi,

 

I am using PCI 6229 card for my application. My application needs a pulse generation using a DO  as counters are used to achieve other functionality

Can anyone please tell me if it is possible to generate pulses using DOs? if yes, how to do it?

 

Thanks in advance

 

 

Regards,

 

Prashant


Hello Prashant. 

 

You can programmatically define Digital output pulses via use of Correlated Digital I/O. This is where you allow the digital I/O line to use a different clock source on board the device, typically done with the AI/AO sample clocks (This can even be done with external clock sources for hardware applications). The PCI-6229 has 32 of these correlated clocked lines.

 

To see an example of Correlated DIO, you should check out the DAQmx example via:

LabVIEW > Help > Find Examples... > Hardware Input and Output > DAQmx > Digital Generation > Correlated Dig Write with Counter.vi
This example shows how you can actually reference one of the counters you could be already using to drive the clock source of the output task.

You can also try changing the clock source to one of the Timebase sources of your device. However, because your counters are already being used, you won't be able to operate the lines at any frequency other than the source frequency as frequency division is generally handled by the counters. However, if you're not using any analogue channels, you can set up the Analogue I/O task rate sample clock for any arbitrary frequency and can reference that as your correlated DIO operation frequency instead. The only thing left to do is create a write buffer array holding a 0 and 1 to be continuously written, thus generating your digital pulse. Best of all, this is a task which is entirely delegated to the hardware so you won't be limited by the speed of your OS.

 

This is always really fun once you get it working!

 

 


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 2 of 2
(2,901 Views)