Setpointoutput - daqsetpointoutputt, Function usage – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 104

setpointOutput - DaqSetpointOutputT
Definition
Description
DsoNone
Perform no outputs
DsoP2PortC
Output to P2 Port C when criteria met
DsoDAC0
Output to DAC0 when criteria met (must have device with DAC0)
DsoDAC1
Output to DAC1 when criteria met (must have device with DAC1)
DsoDAC2
Output to DAC2 when criteria met (must have device with DAC2)
DsoDAC3
Output to DAC3 when criteria met (must have device with DAC3)
DsoTMR0
Output to Timer0 when criteria met
DsoTMR1
Output to Timer1 when criteria met
Function Usage
The daqAdcSetSetpoints function may be used to setpoints for those devices which support setpoint
controlled outputs such as the DaqBoard/3000 and PersonalDaq/3000 Series devices. Up to 16 separate
setpoints are supported and an input channel can have more than one setpoint associated with it. Any input
channel can be configured to use a setpoint including analog, digital or counter channels. However, if the input
channel is a TC channel, there will be no compensation or linearization of the channel applied when evaluating
the setpoint and the setpoint input channel must be specified in voltage. The daqAdcSetSetpoints
function only configures the setpoints. See daqAdcSetScan function for information regarding how to
associate an input channel to a setpoint.
Each setpoint requires an input channel, a detection criteria and and output or action to be performed when the
detection critera are met. As mentioned before, the input channel can be an analog voltage, digital or counter
channel. If a counter channel is used and the counter channel is a 32-bit counter the setpoint can only be
evaluated against either the high or low order word (or 16-bits) of the counter. See the See daqAdcSetScan
function for information regarding how to configure the high and low order words in the scan list.
While data is being collected by the device the input signal is compared to the detection criteria mentioned
above. When given criteria are met the result is a condition which is driven High(True) or Low(False)
depending upon current state of the signal. The rate at which the condition is updated depends upon the overall
scan rate selected for the acquisition. See See daqAdcSetRate function for more details on setting up the
scan rate. So the detection of change of input state against the criteria can be no faster than the overall
acquisition scan rate.
The output target or channel can be the P2 Port C, Timer0, Timer1 or any of the onboard DAC. In addition, the
user may select no outputs to be peformed. When the condition is driven High(True) or Low(False) the
UpdateOnTrueOnly
and the UpdateOnTrueAndFalse flags determine which output value will be used
to update the output channel.
If Timer0 or Timer1 (TMR0 or TMR1) is the output channel , then the value you enter is that of the 1 MHz
clock divisor. The following table shows 5 examples of divisor value and associated Timer Output Frequency.
Divisor
Timer Output Frequency
1 1
MHz
100 10
kHz
1000 1
kHz
5000 200
Hz
65535 15.259
Hz
If using UpdateOnTrueOnly,then output1 will be updated to the output channel each time the criteria
is met. If using UpdateOnTrueAndFalse, then output1 will be updated to the output channel each
time the criteria is met. In addition output2 will be updated to the output channel each time the criteria is
NOT met.
See your device hardware manual for a more complete description and theory of operations for the setpoint
feature.
4.2-48 Daq API Command Reference
907794
Programmer’s Manual