Configures up to 16 detection setpoints associated with the input channels within a scan group. This function only works with boards that support synchronous input.
C/C++
int cbDaqSetSetpoints(int BoardNum, float *LimitAArray, float *LimitBArray, float *reserved, int *SetpointFlagsArray, int *SetpointOutputArray, float *Output1Array, float *Output2Array, float *OutputMask1Array, float *OutputMask2Array, int SetpointCount);
Visual Basic
Function cbDaqSetSetpoints(ByVal BoardNum&, LimitAArray!, LimitBArray!, Reserved!, SetpointFlagsArray&, SetpointOutputArray&, Output1Array!, Output2Array!, OutputMask1Array!, OutputMask2Array!, ByVal SetpointCount&) As Long
BoardNum
The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99. The board must support synchronous input.
LimitAArray
Array 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.
LimitBArray
Array 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.
Reserved
Reserved for future use.
SetpointFlagsArray
Array containing the setpoint flags. Set to one of the constants in the SetpointFlagsArray argument values section below.
SetpointOutputArray
Array containing output sources. Set to one of the constants in the SetpointOutputArray argument values section below.
Output1Array
Array containing the values for the output channels used for the setpoint.
Output2Array
Array containing the values for the output channels used for the setpoint.
OutputMask1Array
Array containing the output masks for output value 1 (for FIRSTPORTC only).
OutputMask2Array
Array containing the output masks for output value 2 (for FIRSTPORTC only).
SetpointCount
Number of setpoints to configure (0 to 16). Set to 0 to disable the setpoints.
Flag | Description |
SF_EQUAL_LIMITA | Setpoint criteria: The input channel = limit A. |
SF_LESSTHAN_LIMITA | Setpoint criteria: The input channel < limit A. |
SF_GREATERTHAN_LIMITB | Setpoint criteria: The input channel >limit B. |
SF_INSIDE_LIMITS | Setpoint criteria: The input channel > limit A and < limit B. |
SF_OUTSIDE_LIMITS | Setpoint criteria: The input channel < limit A and > limit B. |
SF_HYSTERESIS | Setpoint criteria: If the input channel > limit A then output value 1. If the input channel < limit B then output value 2. |
SF_UPDATEON_TRUEONLY | If the criteria is met then output value 1. |
SF_UPDATEON_TRUEANDFALSE | If the criteria is met then output value 1, else output value 2. |
Output source | Description |
SO_NONE | Perform no outputs. |
SO_FIRSTPORTC | Output to FIRSTPORTC when the criteria is met. |
SO_DIGITALPORT | Output to digital port when the criteria is met. |
SO_DAC0 | Output to DAC0 when the criteria is met. You must have a device with DAC0. |
SO_DAC1 | Output to DAC1 when the criteria is met. You must have a device with DAC1. |
SO_DAC2 | Output to DAC2 when the criteria is met. You must have a device with DAC2. |
SO_DAC3 | Output to DAC3 when the criteria is met. You must have a device with DAC3. |
SO_TMR0 | Output to timer 0 when the criteria is met. |
SO_TMR1 | Output to timer 1 when the criteria is met. |