필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Orpheus
Orpheus 2012년 5월 31일
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