How Do EZ-Touch Signed16 Values Show Negative Numbers?

Brian Holt5 min read
HMI ProgrammingOther ManufacturerPLC Programming
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

EZ-Touch can display a negative value when the PLC sends the value in signed 16-bit form; separate positive and negative bits do not make a magnitude register negative by themselves. The practical fix is to build one signed numeric value in the PLC, then configure the EZ-Touch numeric display to interpret that register as Signed16.

Stop using sign bits as the displayed value

The common first attempt is to keep the magnitude in V2020, use C100 for positive and C101 for negative, and expect the panel to combine them. That does not work when the display reads only the numeric register: the sign bits are separate data and are not automatically applied to the magnitude.

  • Showing the magnitude directly: a value of 18 remains 18 even when the negative bit is on.
  • Switching the panel to signed display without changing the PLC value: the display interprets the register's bit pattern as signed data; it does not consult the two sign bits or infer a minus sign.
  • Building a separate display-side sign rule: unless the configured object explicitly supports that logic, it adds a second place to maintain sign handling. Put the signed value in a PLC register and have the display read it.

Keep the magnitude and sign bits if other PLC logic needs them, but create a separate output register for the signed result. Do not overwrite the source magnitude unless the rest of the program expects that change.

Build one signed register from the magnitude

The sign must be represented in the numeric register itself. Use the panel's Signed16 interpretation for a signed 16-bit result, and write the converted value to the register assigned to the display. In the example logic, X is the original magnitude in V2020, while Z is the signed result.

For a positive value, copy the magnitude into the output register. For a negative value, subtract the magnitude from zero. The example uses a temporary register Y on the negative path:

IF C100 (positive):
    LD X
    BIN
    OUT Z

IF C101 (negative):
    LD X
    BIN
    OUT Y
    LD K0
    SUBB Y
    OUT Z

This produces the intended results: magnitude 14 with the positive condition gives Z = 14; magnitude 18 with the negative condition gives Z = -18. The mnemonics shown are the example logic; confirm the exact instruction names and operand order in the PLC programming environment used on the machine.

Choose the conversion path that matches the PLC

A second way to create the negative representation is to invert the binary value and add one, the two's-complement operation:

LD X
BIN
INV
ADDB K1
OUT Z

Use this path only when the PLC's instruction behavior and operand width match the destination signed value. The zero-minus-magnitude method makes the arithmetic intent explicit; the invert-and-add-one method constructs the two's-complement bit pattern directly. Do not apply both conversions to the same value: that would transform the result twice.

Handle the positive and negative conditions so only one conversion path writes Z during a scan. If both sign bits can be on, both paths may execute and the final value can depend on instruction order. Define the valid sign state in the PLC logic and decide what the output should be when neither sign bit is on.

Configure the EZ-Touch object to read the signed result

  1. Reserve a PLC register such as Z for the signed output; confirm the register is the width expected by the chosen signed format.
  2. Implement the positive and negative conversion paths in the PLC and write the final value to that register.
  3. Set the EZ-Touch numeric object to read that output register and use Signed16 for a 16-bit signed value.
  4. Compile and transfer the PLC logic and HMI configuration using the normal site procedure.

The evidence identifies Signed16 and Signed32 as available panel interpretations, but the example uses a signed 16-bit destination. If the required value can exceed the signed 16-bit range, use a correctly constructed 32-bit PLC value and configure the matching Signed32 interpretation; check the PLC and panel register mapping before changing widths.

Verify sign, magnitude, and register mapping

Monitor the source magnitude, sign bits, temporary register, and signed output together in the PLC. Then compare the live HMI value with the PLC output for a positive test and a negative test. This separates a PLC arithmetic error from a display format or address-selection error.

Test condition Expected PLC output Expected display
Magnitude 14, positive bit on Z = 14 14
Magnitude 18, negative bit on Z = -18 in signed interpretation -18

If the PLC monitor shows the correct signed value but the panel does not, check the displayed register address and the object's signed data format. If the panel shows the right magnitude with the wrong sign, inspect whether the PLC is writing the intended output register and whether the display reads it as Signed16, rather than as an unsigned value.

FAQ: EZ-Touch signed values

What happens if I turn on the negative bit but leave the magnitude unchanged?

The panel still reads the numeric register's value; a separate sign bit does not automatically negate it. Convert the magnitude in the PLC and write the signed result to the display register.

What happens if I select Signed16 without converting the PLC value?

The panel interprets the register bit pattern as signed 16-bit data. It does not combine the magnitude with C101, so construct the signed value in the PLC first.

What happens if both sign bits are on?

If both PLC branches write the output, the result can depend on execution order. Define mutually exclusive sign handling and monitor the final output register.

What happens if Signed16 cannot hold the required value?

Use a matching 32-bit PLC value and configure Signed32, after confirming register width and mapping at both ends. Stop before changing data width if the PLC and EZ-Touch mappings are unclear; consult the applicable product manuals or official manufacturer support.

Back to blog