daq_set_setpoints()

Outputs values synchronously to analog output channels and digital output ports. This function only works with boards that support synchronous output.

Prototype

daq_set_setpoints(board_num, limit_a_list, limit_b_list, setpoint_flags_list, setpoint_output_list, output_1_list, output_2_list, output_mask_1_list, output_mask_2_list, setpoint_count)

Parameters

board_num (int)

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

limit_a_list (list of int)

List containing the limit A values for the input channels used for the setpoint. Limit A specifies a value used to determine if the setpoint criteria are met.

limit_b_list (list of int)

List containing the limit B values for the input channels used for the setpoint. Limit B specifies a value used to determine if the setpoint criteria are met.

setpoint_flags_list (list of SetpointFlag)

List containing the setpoint flags. Set to one of the constants in the setpoint_flags_list parameter values section below.

setpoint_output_list (list of SetpointOutput)

List containing output sources. Set to one of the constants in the setpoint_output_list parameter values section below.

output_1_list (list of int)

List containing the values for the output channels used for the setpoint.

output_2_list (list of int)

List containing the values for the output channels used for the setpoint.

output_mask_1_list (list of int)

List containing the output masks for output value 1 (for FIRSTPORTC only).

output_mask_2_list (list of int)

List containing the output masks for output value 2 (for FIRSTPORTC only).

setpoint_count (int)

Number of setpoints to configure (0 to 16). Set to 0 to disable the setpoints.

setpoint_flags_list parameter values

FlagDescription
EQUAL_LIMITASetpoint criteria: The input channel = limit A.
LESSTHAN_LIMITASetpoint criteria: The input channel < limit A.
GREATERTHAN_LIMITBSetpoint criteria: The input channel >limit B.
INSIDE_LIMITSSetpoint criteria: The input channel > limit A and < limit B.
OUTSIDE_LIMITSSetpoint criteria: The input channel < limit A and > limit B.
HYSTERESISSetpoint criteria: If the input channel > limit A then output value 1.
If the input channel < limit B then output value 2.
UPDATEON_TRUEONLYIf the criteria is met then output value 1.
UPDATEON_TRUEANDFALSEIf the criteria is met then output value 1, else output value 2.

setpoint_output_list parameter values

Output sourceDescription
NONEPerform no outputs.
FIRSTPORTCOutput to FIRSTPORTC when the criteria is met.
DIGITALPORTOutput to digital port when the criteria is met.
DAC0Output to DAC0 when the criteria is met. You must have a device with DAC0.
DAC1Output to DAC1 when the criteria is met. You must have a device with DAC1.
DAC2Output to DAC2 when the criteria is met. You must have a device with DAC2.
DAC3Output to DAC3 when the criteria is met. You must have a device with DAC3.
TMR0Output to timer 0 when the criteria is met.
TMR1Output to timer 1 when the criteria is met.