Indicate the number of times the trigger executes in an operation
When working with the session-based interface, the TriggersPerRun
property
indicates the number of times the specified trigger executes for one
acquisition or generation session.
Create a session and add channels and trigger to the session.
s = daq.createSession('ni'); addAnalogInputChannel(s,'Dev1', 0, 'voltage'); addAnalogInputChannel(s,'Dev2', 0, 'voltage'); addTriggerConnection(s,'Dev1/PFI4','Dev2/PFI0','StartTrigger');
Display Session’s TriggersPerRun
Property.
s.TriggersPerRun
ans = 1
Set the trigger to run twice during the operation.
s.TriggersPerRun = 2
s = Data acquisition session using National Instruments hardware: Will run 2 times for 1 second (1000 scans) at 1000 scans/second. Trigger Connection added. (Details) Number of channels: 2 index Type Device Channel MeasurementType Range Name ----- ---- ------ ------- --------------- ---------------- ---- 1 ai Dev1 ai0 Voltage (Diff) -10 to +10 Volts 2 ai Dev2 ai0 Voltage (Diff) -10 to +10 Volts