LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Question]: Channel synchonization between multiple boards

Solved!
Go to solution

Hello all!

I am having some problems when it comes to synchronize the signals that are acquired from multiple boards and I don't know how to solve it. Here's a brief summary of what happens:

Equipment: I have 4 S Series DAQ devices, connected through the RTSI cable and they are connected to my computer. There exists communication between them. Each one of the boards has 8 analog input channels. NI Max is configured: it detects the 4 boards as well as the RTSI cable.

I want to start a high frequency sampling of the first 26 channels (DEV1 a0:a7, DEV2 a0:a7, DEV3 a0:a7 and DEV4 a0:a1) at a given time T, and I need them to be simultaneously sampled. For that, I am using the 'Channel Expansion' block diagram (http://www.ni.com/white-paper/52634/en/). There is no problem up to here.

However, I want to start sampling the remaining 6 other channels at a lower frequency at a different particular time, T2, and I also want them to be simultaneously sampled. I use a similar block diagram (Channel Expansion) as before. The problem comes here.

If I sample the first 26 without any sampling of the remaining 6 channels, it works perfectly. If I do the opposite thing and sample the 6 low frequency channels and don't sample the first 26 channels, it also works perfectly. Then, if I want to sample all of them, it does not work and just samples either one of the two blocks (the first 26 channels or the latter 6 channels). I want to stress again that the starting sampling time is different between the two blocks and that the sampling needs to be synchronized between the first 26 channels; it also needs to be synchronized between the 6 remaining channels but the two blocks don't need to be synchronized overall.

I attach a picture that will help explain better what I just wrote.

 

acquisition_problem.png

 

Does anyone know why this happens? If so, what should I do to solve the issue?

I really appreciate your help!

David

 

0 Kudos
Message 1 of 7
(2,344 Views)

Most desktop or PXI DAQ boards that I know of have only *one* timing subsystem that can be used for AI DAQ on a given board.  You can't have 2 distinct hw-clocked AI tasks running simultaneously on the same board.

 

Two possible solutions:

1. Buy and install a 5th DAQ board dedicated to the lower-freq channels.

 

2. Always sample *all* channels at high freq.  Downsample the lower-freq channels in software.  Also in software decide whether to report the lower-freq channels or ignore them.

 

 

-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 7
(2,328 Views)

Thank you for your answer, Kevin!

I thought about sampling all of them at a high frequency, but I am not sure the way to implement the 'triggering'. There are six channels that should start acquiring at a specific time instant and the other 26 at another time. Do you have any suggestions?

I appreciate it!

David

0 Kudos
Message 3 of 7
(2,307 Views)

A lot depends on whether you can either know or choose the timing relationship of T and T2 ahead of time.  If you can, then the sample rate & total # of captured samples will identify when to "trigger" T2 and start keeping low-freq channels.

 

If you need to hardware trigger at 2 different instants that can't be known ahead of time, you'll probably need that 5th board.

 

 

-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 7
(2,295 Views)

Hi Kevin,

 

In principle, the time is known in advance. What I have right now is a for loop. When, for example, the current loop is 40, the channels from

DEV1 a0:a7, DEV2 a0:a7, DEV3 a0:a7 and DEV4 a0:a1 and when the current loop is, say 50, the remaining channels need to acquire. I believe this should be done by using a case structure (true/false). So, if the loop is 40, the first structure is true and acquire the signals of those 26 channels. Then, if the loop is 50, the second case structure is true and should acquire from the remaining 6 channels. There is 'acquisition overlap', as you can see on the picture that I included on the first post. I am not 100% sure how to do this. Could you please walk me through? I appreciate your help

 

David

0 Kudos
Message 5 of 7
(2,293 Views)
Solution
Accepted by topic author davidmc33

I won't be able to walk you all the way to a complete solution, but I can illustrate a couple things to give you a nudge in the right direction.

 

1.  Set up a continuous acquisition containing all 32 channels.  26 high freq channels first, 6 low freq channels last.

2.  Sample all channels at high freq rate.

3.  In your reading loop, always read all channels.  Separate the high freq channels from the low.  Handle separately.

4.  I would resample the low freq channels always, even during times when you ignore their data.  If you were to do it conditionally, piece-wise, you could get discontinuities.

 

 

-Kevin P

 

resample to lower rate.png

 

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 6 of 7
(2,277 Views)

Hello Kevin!

 

Thanks a lot for your help!!! What I ended up doing is just sampling them at the same time and having the same number of samples in each one of the channels. Having more samples than what I need will just hurt my hard disk drive 😉

 

David

0 Kudos
Message 7 of 7
(2,264 Views)