The function block has a single input pin and 8 output pins. This function takes an enumerated type input and subtracts a user defined offset to determine which output to set TRUE, holding all others FALSE. The valid range of the input minus the offset is 0 through 7.
The output X (0 through 7) is TRUE if input - offset = X, else, it is FALSE.
Analog Inputs
| Range | ||||
| Input Name | Low | High | Input Value | Description |
| input | 0 | 255 | unconnected | val = invalid, all outputs off. |
| invalid | val = invalid, all outputs off. | |||
| in - offset > 7 | all outputs off. | |||
| in - offset < 0 | all outputs off. | |||
Output
| Output Name | Range | Description |
| OUTPUT 0-7 | Any floating point value | The output 0 through 7 is TRUE if (input - offset) = X,
otherwise it is FALSE If you negate an output, the output is negated from the value determined by the function block logic. |
Setpoint
| Output Name | Range/Value | Description |
| offset | 0 - 255 | Used to determine which Output is set to TRUE based on the expression (input - offset) = Output |
Output = Output position determined by the value (input - Offset). If the value of (input - Offset) is greater than 7, all outputs are taken as FALSE.
If the value (input - Offset) is a floating point number between 0 and 8, the position is determined thus:
Example 1:
Input = 100, Offset = 97
Output = 100 - 97 = 3, and hence Output 3 is made TRUE and all other outputs are made FALSE.
Example 2:
X = 100.6, Offset = 95.2
Output = 100.6 - 95.2 = 5.4, and hence Output 5 made TRUE and all other outputs are made FALSE.
Example 3:
X = 100, Offset = 5.2
Output = 100 - 5.2 = 94.4, and hence all Outputs are made FALSE.