Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How I can synchronize the counter and analog inputs of DAQCard-6024E?

Dear People,

 

How I can synchronize the counter and analog inputs of DAQCard-6024E?

 

I have played with the NI examples of synchronizing two devices without a success.

 

The counters of 6024E seem to need an external sample clock? What is this?

 

My target is to monitor continuously the analog inputs and values of one counter. The preferred solution should be able to read multiple samples at the desired sampling frequency (SampleQuantityMode.ContinuousSamples or SampleQuantityMode.FiniteSamples).

 

What do you think?

 

Is it easier with some M-series board?

 

BR,
Ilkka

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

You shouldn't need a different board.  Here's a simple way to synchronize using DAQmx in LabVIEW:

When configuring your counter task, wire into the "sample clock source" input in DAQmx Timing.vi  There you can specify something similar to "Dev1/AISampleClock", causing both buffered tasks to be driven by the same hardware clock.  From the point of view of the counter task, the AI Sample Clock IS the needed external sample clock.

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 4
(3,999 Views)

Hello Kevin

 

Yesh, now it is working, thanx. I had a lot of problems before I noticed that the sampling rate was too high for the counter. After I dropped the sampling frequency to 900 Hz my application started to work.

 

People have similar problems in the following thread:

http://forums.ni.com/ni/board/message?board.id=250&message.id=12326&requireLogin=False

 

What do you think about the DAQCard-6024E card? I have a similar application as the example above (some AIs and an encoder for position data), but I would like to run much faster than the current 900 Hz.

 

I can change from continuous sampling mode to finite samples... 10 kHz sampling rate for acquiring 5000 samples would be good.

 

Best regards,

Ilkka

0 Kudos
Message 3 of 4
(3,981 Views)
After a quick glance at the DAQCard 6024E datasheet, it appears that all your data acquisition must be performed in interrupt mode.  Your sampling rate will definitely be limited due to this fact, particularly for counter tasks.  The hardware buffer for counter values is very small on most MIO boards and can't absorb many "misses" when the main CPU gets busy on other things.  I'd wager that you could sustain a much higher sampling rate for analog alone than for counter alone.  Doing both at once will only make things worse.
 
There may be special pains you can take to try to give your acquisition tasks the max possible CPU, but I don't know your board well enough to give you odds for success.
 
About the only hardware I'd be inclined to recommend checkout out is an M-series USB board under DAQmx.  I remember skimming an app note about DAQmx optimizations for streaming data over USB.
 
-Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 4 of 4
(3,976 Views)