Set output channel, Update modes, Set values for output – Measurement Computing USB-2527 User Manual
Page 45: Using the setpoint status register, Examples of control outputs, Using the setpoint status, Register

USB-2527 User's Guide
Functional Details
45
Set output channel
None
Update FIRSTPORTC
Update DAC
Update timerx
Update modes
Update on True only
Update on True and False
Set values for output
16-bit DAC value, FIRSTPORTC* value, or timer value when input meets criteria.
16-bit DAC value, FIRSTPORTC* value, or timer value when does not meet criteria.
* By default, FIRSTPORTC comes up as a digital input. You may want to initialize FIRSTPORTC to a
known state before running the input scan to detect the setpoints.
When using setpoints with triggers other than immediate, hardware analog, or TLL, the setpoint criteria
evaluation begins immediately upon arming the acquisition.
Using the setpoint status register
You can use the setpoint status register to check the current state of the 16 possible setpoints. In the register,
Setpoint 0 is the least-significant bit and Setpoint 15 is the most-significant bit. Each setpoint is assigned a
value of 0 or 1.
A value of 0 indicates that the setpoint criteria is not met—in other words, the condition is False.
A value of 1 indicates that the criteria has been met—in other words, the condition is True.
In the following example, the criteria for setpoints 0, 1, and 4 is satisfied (True), but the criteria for the other 13
setpoints has not been met.
Setpoint #
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
True (1)
False (0)
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
<<< Most significant bit
Least significant bit >>>
From the above table we have
10011
binary, or 19 decimal, derived as follows:
Setpoint 0, having a True state, shows 1, giving us decimal 1.
Setpoint 1, having a True state, shows 1, giving us decimal 2.
Setpoint 4, having a True state, shows 1, giving us decimal 16.
For proper operation, the setpoint status register must be the last channel in the scan list.
Examples of control outputs
Detecting on analog input, DAC, and FIRSTPORTC updates
Update mode: Update on True and False
Criteria: Channel 5 example: below limit; channel 4 example: inside window
In this example, channel 5 is programmed with reference to one setpoint (limit A), defining a low limit.
Channel 4 is programmed with reference to two setpoints (limit A and limit B) which define a window for that
channel.