Assigning different sample rates in single session (session-based interface)

1 次查看(过去 30 天)
Hi,
I am writing code to output and input some signals using the session based interface in Matlab. My configuration is as follows:
Data acquisition session using National Instruments hardware:
No data queued. Will run at 1000 scans/second.
Number of channels: 4
index Type Device Channel MeasurementType Range Name
----- ---- ------ ------- ------------------- ------------------ ----
1 ao Dev2 ao0 Voltage (SingleEnd) -10 to +10 Volts
2 ai Dev1 ai0 Voltage (SingleEnd) -1.0 to +1.0 Volts
3 ai Dev2 ai1 Voltage (Diff) -5.0 to +5.0 Volts
4 ai Dev2 ai2 Voltage (Diff) -10 to +10 Volts
Dev1 has a max sampling rate of 2 MS/s while Dev2 is at 250 kS/s. I would like to be able to run no.1 at 100 kS/S, no. 2 at 2 MS/s, no. 3 at 100 kS/s and no.4 at 100 kS/s.
When I create a session object and add all the above channels to it, I can only set a global rate that applies to all devices and channels in that session. I would like to assign sampling rates separately.
My thoughts on that are the following: Is it possible to create different session objects (so that I can assign individual sampling rates) and then execute startForeground() for each one of them? Note that I want the channels to be synchronized with each other. My existing trigger is as follows:
AO_AI1.addTriggerConnection('Dev1/PXI_Trig0','Dev2/PXI_Trig0','StartTrigger');
Thank you so much for your time. I will be looking forward to your replies!
Kind regards, Orpheus

回答(1 个)

Walter Roberson
Walter Roberson 2012-5-31

类别

Help CenterFile Exchange 中查找有关 Simultaneous and Synchronized Operations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by