Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the Onboard clock on my PCI-DIO-32-HS to get desired time difference between successive digital output to the ports


How to use the Onboard clock on my PCI-DIO-32-HS to get desired time difference
between successive digital output to the ports.
Desired operation is as follows,
time(s)             data
t=0               data0
t=2e-6         data1
t=1e-5         data2

and so on....

As the time difference between successive data out is in microseconds i cannot
use software timing(as it is generally in millisecond). and also the time
difference between every successive data isn't constant so i need to write a
wait function which uses something like "WaitForNextSampleClockPulse" to get me
exact time lag between successive data-out with jitter in nano seconds as
onboard clock is 20MHZ.

I want to write a C program and link the DLL to the operating VI.
I am having trouble understanding how to use the Onboard clock to get it done.

Thank you!
Software Details: ANSI C (Visual Studios) (Free form entry)  version
NI Hardware:  PCI DIO 32 HS 
Driver Version :  
Operating System:  Windows 7

0 Kudos
Message 1 of 2
(2,428 Views)

You won't be able to program specific variable sampling intervals on that board.   Newer boards with the DAQ-STC3 timing chip (such as X-series MIO boards) support buffered pulse train generation with their counters and such a variable rate pulse train could be used by other tasks for sampling.

 

If you can't pair up another board that supports this, the general workaround is to sample at the highest rate needed (for the shortest interval), and write redundant data to the task during all the extra clock cycles where no bits change state.   So, following your example:

t=0         data0

t=2e-6    data1

t=4e-6    data1

t=6e-6    data1

t=8e-6    data1

t=10e-6  data2

and so on...

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 2
(2,413 Views)