At the input, the function block consists of pins inEnum and disable, and 9 input pins. The output pins are Out, Fire, and 6 output pins. This function translates enumeration of a digital value into different enumeration numbers, allowing standard and custom enumeration to be combined and used together. If a match between inEnum and one of the in values is found, then the appropriate output value is put into out and the fire line is true. If there is no match, then the inEnum is put to the out and fire is false. Disable disables all matching and allows the inEnum to be put to the out line.
Analog Inputs
| Range | ||||
| Input Name | Low | High | Input Value | Description |
| inEnum | 0 | 255 | unconnected | val = 255 |
| invalid | val = 255 | |||
| val matches an input value | output = matching output value of the input | |||
| val matches two or more input values | Output = matching first output value of the input | |||
| Disable | 0 | 255 | unconnected | Val = 0 |
| invalid | Val = 0 | |||
| Val not equal to 0 | All mappings disable, pass input to output | |||
| Val equal to 0 | Enable mappings | |||
| in 1,2,3 | 0 | 16777215.0 | 0xAABBCC |
|
| in 4,5,6 | 0 | 16777215.0 | 0xDDEEFF |
|
| in 7,8,9 | 0 | 16777215.0 | 0xGGHHII |
|
| out 1,2,3 | 0 | 16777215.0 | 0xaabbcc |
|
| out 4,5,6 | 0 | 16777215.0 | 0xddeeff |
|
| out 7 | 0 | 255 | 0xgg |
|
| out 8 | 0 | 255 | 0xhh |
|
| out 9 | 0 | 255 | 0xii |
|
Note: In123, In456, In789, Out 123,and Out456 are created by taking each individual input value (0-255) and convert to a hex byte (0x00 0xFF) and putting first value in Most Significant Byte, 2nd value in middle and 3rd value in Least Significant Byte. The end result gives an integer value that must be stored as a float. So if In1 is 1, In2 is 2 and In3 is 3 then the integer would be 0x010203=66051, and the float value stored as a parameter would be 66051.0. The tool prompts the user for individual in1.. out9 values and do the conversion both to and from the packed structure for the user.
Analog Outputs
| Output Name | Range | Input Value | Description | |
| Low | High | |||
| OUTPUT | 0 | 255 | See Description |
|
| FIRE | 0 | 1 | See Description |
|
For example, to map a standard HVAC enumeration into a custom enumeration, the standard HVAC enumeration and desired mapping is as follows:
| In parameter | Input Enumeration | Out parameter | Output Enumeration |
| In1 | HVAC_AUTO 0 | Out1 | COOL_MODE 0 |
| In2 | HVAC_HEAT 1 | Out2 | HEAT_MODE 2 |
| In3 | HVAC_MORNING_WARM_UP 2 | Out3 | HEAT_MODE 2 |
| In4 | HVAC_COOL 3 | Out4 | COOL_MODE 0 |
| In5 | HVAC_NIGHT_PURGE 4 | Out5 | NIGHT_MODE 7 |
| In6 | HVAC_PRECOOL 5 | Out6 | COOL_MODE 0 |
| In7 | HVAC_OFF 6 | Out7 | OFF_MODE 255 |
| In8 | HVAC_TEST 7 | Out8 | OFF_MODE 255 |
| In9 | HVAC_EMERGENCY_HEAT 8 | Out9 | EMERG_HEAT 3 |
| Block 2 passed through | HVAC_FAN_ONLY 9 | Block2 not used | Pass through (output =9) (Does not require mapping because the output is the same as the input.) |
| Block2In1 | HVAC_NUL 255 | Block2Out1 | REHEAT_MODE 1 |
The first encode function block parameters are:
And the Second block:
The input pins for the first block are inEnum and disable. The output pins for the first block, Out and Fire provides the inputs to the input pins inEnum and disable of the second block. The final output is provided by output pins Out and Fire of the second block.