a_trig()

Waits for a specified analog input channel to go above or below a specified value. a_trig() continuously reads the specified channel and compares its value to trig_value. Depending on whether trig_type is set to TrigType.TRIG_ABOVE or TrigType.TRIG_BELOW, it waits for the first A/D sample that is above or below trig_value. The first sample that meets the trigger criteria is returned.

Prototype

a_trig(board_num, channel, trig_type, trig_value, ul_range)

Parameters

board_num (int)

The number associated with the board when it was installed with InstaCal or created with create_daq_device().

channel (int)

A/D channel number. The maximum allowable channel depends on which type of A/D board is being used. When a board has both single ended and differential inputs, the maximum allowable channel number also depends on how the board is configured, such as 8 channels for DIFF inputs, and 16 channels for SE inputs.

trig_type (TrigType)

TrigType.TRIG_ABOVE or TrigType.TRIG_BELOW. Specifies whether to wait for the analog input to be ABOVE or BELOW the specified trigger value.

trig_value (int)

The threshold value that all A/D values are compared to. Must be in the range 0 to 4,095 for 12-bit A/D boards, or 0 to 65,535 for 16-bit A/D boards.

ul_range (ULRange)

A/D Range code. If the selected A/D board does not have a programmable gain feature, this parameter is ignored. Otherwise, set to any range that is supported by the board.

Returns