LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I synchronize a PCI-MIO-16E-4 with two 6602 cards?

I'm trying to synchronize a PCI-MIO-16E-4 with two 6602 cards by using
the RTSI lines. I'm setting up the MIO to be the Master and both 6602
cards to be slaves by routing the scan clock signal from the mio on
the RTSI. Then in the actual programm i read data from the analog
input and from all (5)counters with a "0" at "Number of scans to
read". I'm doing this, because I want the Scan Backlog to work as a
positioning tool for all data in the buffer (iread data again later in
the process of the programm).But when i do this the Scan Backlog of
the counters starts at 82,83 and 84 while the scan backlog of the
analog in is still at 0.
Does somebody have an answer or idea (maybe example code) to solve
this problem?
T
hanks a lot - Sven Kraus.
0 Kudos
Message 1 of 3
(2,666 Views)
Hi Sven,

That's interesting. You might have to do a little more investigating
to determine why the counters seem to start prematurely (or why the
analog in is not reporting the scan backlog correctly). Are you using
the startscan (scan clock) signal as the source of your counters?
This signal will pulse as many times as you sample.

One test you can perform is a finite acquisition with a specific
number of samples. Your counter should count that exact number of
samples. If the counter does in fact count the exact number of
samples then we know your problem will be in monitoring the scan
backlog of the analog input.

Another thing that could contribute to the difference between the two
backlog numbers is the fact that the analog input will store a certain

number of samples in the onboard memory and then transfer them once
the DMA FIFO is full. For the 16E-4 card, this FIFO size is 512
samples. This means that the card can accumulate up to 512 samples
and then scan backlog would read 0. This is because the scan backlog
monitors the samples on the PC buffer that you configured. The FIFO
doesn't count in that scan backlog number. Only after samples have
been transferred from the FIFO (MIO card memory) to the PC buffer
(memory you declared in your program) will you see a correlation.

Another way to easily monitor this is to use Interrupts as your
transfer method instead of DMA. Interrupts will transfer each sample
as it is acquired so your PC buffer will always be current (or off by
no more than 1 sample). You can change this by using the Set DAQ
Device Info function.

Anyway, hope that clears things up. Have a good day.

Ron
0 Kudos
Message 2 of 3
(2,666 Views)
Hi Ron,

Thank you for your Answer. I wrote a simple version of the program and got some more information now:
If I aquire a certain number of scans, I recieve the specified scans from all devices.(exactly) but my plan is (like I wrote in my first article) to aquire zero scans and using the rising backlog in the further distribution of the program.
While I was testing the Program I realized something. The behavior of the backlog does depend on the channels I configure for the MIO Board. When I confire any regular 0..10 V Signal on the 1120D, which I use, the backlogs are almost even. But when I configure a temperatur sensor, which is configured as a K-thermocouple on a 1121, (all in a scxi 1001) I end up with this scan backlog delay of 81-
82 counts between the backlogs of the 6602 boards and the scan backlog of the MIO board.
I attached the program I am using incl. the sub vi's.
Would be nice if You would take a look at it - maybe there is something wrong with it.

Oh - i forgot to tell that i changed the settings on the Set DAQ Device Info function from using DMA to Interrupts - without any effects.

Hope I get more Imformation and serve the problem...

Anyway, thank You for Your reply.Have a nice day.

Sven.
Download All
0 Kudos
Message 3 of 3
(2,666 Views)