Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Tip for DAQ acquisition...

I must measure the time between two signal ON -> OFF and then OFF -> ON from a Digital Input of a NI6034E (multifunction board). My idea was to execute a software polling over this digital input channel, waiting for a state change, and then start to count pulses of the source of a counter (on a 6601 board) with a time base of 20MHz. I want to connect this input on gate of that counter, but I'm not able to do it. Anyone has a tip for me? Are there samples on internet?
Thanks at all.
Peo

P.S. I use LabWindows/CVI for my application...
0 Kudos
Message 1 of 2
(2,728 Views)
Peo,

there is a much easier way to do the trick.
The NI 6034E has its own 24-bits counters. You can use one of these 2 counters to measure the period of your digital signal.
To do this there are a couple of ways, depending on how fast is your signal changing state (frequency):

1)LOW Frequency Signal: You will need to connect your digital signal to the Counter's Gate Pin (say pin 3/GPCTR0_GATE) and select 20MHz internal timebase as a Source. This allows you to count how many 50ns-period pulses fit within one single period of your signal. The period of the signal will be (count+/-1)*50ns.

2)HIGH Frequency Signal: in this case the configuration in (1) will lead to unprecise results. The best way to measure a very short period is to connect th
e digital signal to the Counter's Source pin (pin 37/GPCTR0_SOURCE) and use the internal 100kHz timebase as the gate signal. This allows you to count how many periods of your signal fit within a 10 usec period. The period of your signal will be 10 usec / (count+/-1).

As far as examples are concerned, you can find different examples depending on the API you choose to develop with.

Traditional NI-DAQ
Find them on your machine running CVI in the folder

..\National Instruments\CVI71\samples\daq\Ctr

Look at the examples named
STCsingleBufPeriodMeasure.PRJ
STCsinglePeriodMeasure.PRJ

NI-DAQmx
Find the examples for DAQmx under

...\National Instruments\CVI71\samples\DAQmx\Counter\Measure Period or Pulse Width

Best Regards,

AlessioD
National Instruments
0 Kudos
Message 2 of 2
(2,728 Views)