Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize M Series board clocks then acquire at different rates

I have an application in which I am using 3 M Series boards. Two boards will acquire at a faster rate and the third at a slower rate. In my initial testing, I can see how to set master and slave boards and use the 10MHz clock as the reference clock over RTSI to synchronize all the boards. I thought that doing this meant that the 20MHz and 80MHz clocks were synchronized and that I would then be able to set my slower acquisition rate for my third board. However, I seem to get an error unless I acquire at the same rate on all boards. I don’t know whether I am not calling the correct configuration functions or whether this is just not possible.

 

Is it possible to synchronize the clocks and then acquire at different rates? Also, I am a bit more used to using the traditional DAQ functions rather than DAQmx and have not yet spotted how to specify acquisition rates by specifying the timebase to use and the multiplier - is this no longer possible? The reason I ask is that I have read that the 100kHz clock is not synchronized so I would want to choose the 20MHz or 80MHz.

 

In general, I am struggling to find out indepth information about the DAQmX functions. I am using them in Measurement Studio (in C#) and the help provided tends to do little more than expand the function and property names in to a sentence. For example when I look up the Timing.ReferenceClockRate property I am informed that it 'Specifies the frequency of the Reference Clock'. Not so helpful. Is there a more indepth explanation of DAQmX functions anywhere?

 

Thanks,

CAS

0 Kudos
Message 1 of 4
(2,639 Views)

Hi CAS,

 

Sorry it's taken so long to get back to you.  At the moment it sounds like you are sharing a sample clock over the three devices using a single RTSI line, by doing this you wont be able to synch them together with different sample rates.  What you can do however is use a second RTSI line and send a master timebase and a start trigger over the these lines so they all start sampling together.  Here is a tutorial regarding synchronisation which I think you might find usefull.  The examples are in LabVIEW but you can copy these basic ideas over to Measurement Studio.

 

Regarding your questions on converting from Traditional DAQ to DAQmX there are some great tutorials here to help with the transition. 

 

http://zone.ni.com/devzone/cda/tut/p/id/4342

http://digital.ni.com/public.nsf/allkb/42484E84DA98053686256D32006E0494

 

 

If you have any more problems implementing a solution I would be glad to help,

 

Tom

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 4
(2,612 Views)

Hi Tom

 

Thanks for your reply. You are right, I do want to share a master timebase and start trigger and then have boards acquiring at different rates. I am then setting the sampling rates and sample counts on each board to be equivalent to the same time period (e.g. 1000Hz and 1000 samples on the first board and 4000Hz for 4000 samples on the second board) and then using a single callback function for the two boards. This now seems to be working (I suspect that I didn't set my number of samples correctly in the callback function when restarting my read). However, is this a wise thing to do? Would separate callbacks be a 'safer' option?

 

CAS

 

 

 

0 Kudos
Message 3 of 4
(2,609 Views)

Hi,

 

Using the one callback is absolutly fine if it's all in the same task which it sounds like it is.

 

 

Hope that helps,

 

Tom

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 4
(2,607 Views)