Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Accurate timing on multiple digital outputs

I am trying to produce a reasonably accurate length (+/- 100mS) digital pulse from a PCI-6221 card. At present I read the current time of 'Tick Count' millisecond counter, add the desired pulse length in mS to it and go into a while loop to wait for the Tick Count to reach this value. This works OK for a single channel, but when I try to do it running 8 channels simultaneously and generating 'uniform white noise' at the same time, the timing is all over the place. Presumably this is because it is trying to do too many things at once. Can someone suggest a better way of generating these timing pulses which will give me the desired accuracy?

 

Thanks

 

 

0 Kudos
Message 1 of 4
(4,821 Views)

Hello Novelec,

It seems like you are doing software timed pulse generation hence the timings are off. The best way is to use counter as a clock source and generate DO based of counter clock (Hardware timed DO). Here is the knowledgebase that might help you getting started, on it.

 

Thanks

 NI-khil

0 Kudos
Message 2 of 4
(4,816 Views)

Thanks NI-khil,

I downloaded a few sample vi's and got one going using the hardware timing, however, this seems only to be supported on Port0, which on my card only has 2 lines available (PCI-6221 37 pin). I need to use 9 lines for my application. Is there any way of linking the hardware timing to Port1, or otherwise improving the timing accuracy of Port1?

 

Bradley Dawson

0 Kudos
Message 3 of 4
(4,802 Views)

Hello Novelec,

In PCI-622x boards only port 0 is hardware timed. It is on page 6 of this manual hence there is no way we can make port1 hardware timed. We do have some M-Series board ( PCI/PXI - 625x) that do have 32 bit Port 0 which is all hardware timed.

 

NI-khil

 

0 Kudos
Message 4 of 4
(4,789 Views)