LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two boards acquisition at different sampling rate

Hello LabVIEW users,

I am currently using two 4472 boards.
I would like to acquire analog signals with both of them, so what I did was to share the clock of one of them through the RDSI line and make the acquisition start with the same trigger.
My problem is that the signals of board 1 need to be sampled at 20KHz and the ones in board 2 need to be sampled at 2KHz, so currently I am oversampling the data recorded in board 2 and then I filter it and resample it with software.
It works fine, though, now I have some performance issues and the resampling and filtering functions are the ones that take most of my performance away.
Is there any way to acquire data with two boards at the same sampling frequency AND having t
he acquisition synchronized?

Thanks a lot
0 Kudos
Message 1 of 7
(3,183 Views)
If you route the master clock from one board to the other instead of the scan clock, then both boards will share use the same timebase. If both boards are triggered at the same time while using two different rates, the clock base rate will be the same and there will not be drift between the two acquisitions. Is this what you want?
Stu
0 Kudos
Message 2 of 7
(3,183 Views)
Thanks for the answer,

Though, I tried to do whatyou suggested:
Share the board clock of one of the boards, set different sampling rates, and start the DAQ at the same time.
I created a small vi with that and it seems that the slave device tries to sample at the master device rate even though I set up a different sampling rate.
Take a look at the attached VI and see how when the slave device Fs is lower than the master, the scan backlog of the slave keeps increasing.

Any idea?

Thanks
0 Kudos
Message 3 of 7
(3,183 Views)
The scan backlog of the slave should keep increasing until it reaches 2000. I'm not sure exactly what behavior you are expecting. I tried out your VI, and it seemed like it was working fine. I made a little modification to show you that the master really was running 5X faster than the slave. I set the number of points to read to 10,000 for both boards and incremented a number every time each board reads 10,000 points. The number of buffers read by the master is 5 times greater than the slave over the same time period.

Hope this helps.
Regards,
Erin
0 Kudos
Message 4 of 7
(3,183 Views)
Thanks for your reply.

If you try again my VI, set the master Fs to 10KHz and the slave to 2KHz, let it run for a few seconds and you will see how the scan backlog of the slave keeps increasing. (It will fill up the buffer eventually)

Also, what you did was to set the number of samples to read to 10K for both boards, which makes me think that both of them are sampling at the same frequency even though the specified Fs is different.

My point is that if I set the Fs of one board to 10K and the other one to 2K, I sould be able to retrieve 1/5 less points from the second board and in my example the buffer keeps on filleing up.

Thanks
0 Kudos
Message 5 of 7
(3,183 Views)
Actually, I was using 2 E Series boards, and this works for 2 E Series boards. I was assuming that it would work for 2 DSA boards. However, I did some more research, and it does not work for 2 DSA boards due to the lack of a divider to divide the clock frequency. I found this forum entry answered by one of the software developers for these products:

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000003E620000&ECategory=Measurement+Hardware.Dynamic+Signal+Acquisition+and+Analysis

Sorry for the confusion.

Regards,
Erin
0 Kudos
Message 6 of 7
(3,183 Views)
No problem,

Thanks for the help though!
0 Kudos
Message 7 of 7
(3,183 Views)