Session base level trigger of analog input NI USB daq.

4 ビュー (過去 30 日間)
Jon
Jon 2012 年 5 月 9 日
I'd like to set up an analog input channel of an NI USB daq to level trigger with a session based approach. What is the session based equivalent of the following?
set(s1,'SamplesPerTrigger',500000)
set(s1,'TriggerChannel',chan4) %Trigger Channel
set(s1,'TriggerType','Software')%Immediate, Manual, or Software
set(s1,'TriggerCondition','Rising')%Rising, None
set(s1,'TriggerConditionValue',1.5)% Trigger level
set(s1,'TriggerRepeat',0)
set(s1,'TriggerDelay',-1.0)% pretrigger (seconds)
Thanks, Jon R2012a

回答 (1 件)

AndTim
AndTim 2012 年 7 月 6 日
Hi,
As far as I know, triggering to a certain level is not possible with the session based approach.
In principle, the equivalent to the legacy approach starts like this: (assuming session is already created, 'CHANNEL' would be the trigger channel on your card)
trig = session.addTriggerConnection('External','CHANNEL','StartTrigger');
session.TriggersPerRun = 1;
trig.TriggerCondition = 'RisingEdge';
Now you would have to change
trig.TriggerType
to 'Analog' in order to be able to do leveled triggering, but as far as I know that is not yet possible.
Best, Tim

カテゴリ

Help Center および File ExchangeAnalog Input and Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by