Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize 6602 4472

I have some problem to synchronize my NI hardware.

I start reading the daqmx introduction and the synchronize examples but still found no solution.

Attached is the "working" approach.

With that it is possible to continously read the voltage and the position but the values do not correlate to each other.

After every 1000 positions read there is a huge step between.

As a first approach it would be really great if it would possible to read 1000 samples per channel from my ai card and correlate the read 1000 samples from the ctr.

But it would be really great if it would be possible to read n samples from the ctr and correlate them with the samples from the ai.

As an example 2 positions per voltage should be acquired, so only every second value should be at the same time measured compared to the position. (It would be really nice if could say something about the realtime ability from this approach)

It must be possible to read at least 10kHz from both (per channel for the ai).

 

What did I wrong and what would be the right approach?

 

Hardware:

PXI-6602 for the linear encoder

PXI-4472 for the n channels voltage

Edit: OS: W7Pro

Download All
0 Kudos
Message 1 of 4
(5,250 Views)

The counter task needs a sample clock--you should be able to have it use the AI Sample clock from the 4472 as its sample clock source.  Note that the 4472 uses a delta sigma converter so the term "sample clock" is a bit of a misnomer.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 4
(5,237 Views)

At first thank you I get the position in the right pulse.

What happens if I set the sample frequency of the counter to a multiple of the ai frequency by use of the same sample clock?

0 Kudos
Message 3 of 4
(5,215 Views)

Setting the sample rate on the counter task doesn't do much (it might give you a different default buffer size to accomodate the expected sample rate), the actual clock rate is determined by the AI task in your case.

 

If you want to sample from your counter at some multiple of the AI sample clock, it's a little more complicated.  You'd need to route the faster AI Sample Clock Timebase from the 4472 to the 6602, I believe this requires the PXI Star line so you'd need to have the 4472 in the system timing slot.  You would use another counter (counter output task) to divide down the AI Sample Clock Timebase to generate the faster sample clock for the counter task.

 

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 4
(5,209 Views)