This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Specify condition that must be satisfied before trigger executes


When working with the session-based interface, use the TriggerCondition property to specify the signal condition that executes the trigger, which synchronizes operations on devices in a session. For more information, see Synchronization.


Set the trigger condition to RisingEdge or FallingEdge.


Specify Session Connection Trigger Condition

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');

Change the trigger condition to FallingEdge.

connection = s.Connections(1)
connection.TriggerCondition = 'FallingEdge'
s = 

Data acquisition session using National Instruments hardware:
   Will run 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

Click on (Details) to see the connection details.

Start Trigger is provided by 'Dev1' at 'PFI4' and will be received by 'Dev2' at terminal 'PFI0'.

     TriggerType: 'Digital'
TriggerCondition: FallingEdge
          Source: 'Dev1/PFI4'
     Destination: 'Dev2/PFI0'
            Type: StartTrigger
Was this topic helpful?