Define the HMI tag as a signed integer and enter the raw count range and the signed engineering range on the numeric object's scaling tab, so 0-4095 counts maps to -10 to +10 and the minus sign comes from the value itself. Keep the conversion in one place, panel or PLC, and check the display at three calibrator points before release.
A scale application crosses zero twice a shift. The text panel in front of it handled the minus side with a flag: the PLC sets a negative bit, and the message prints a minus sign in its text portion. Porting that job to a touch panel breaks the trick. A touch panel binds numbers and text as separate objects, and an unsigned tag turns -1 into 65535. The conversion is simpler than the old logic. Define the panel tag as a signed integer, enter the raw count range and the signed engineering range on the numeric object's scaling tab, and keep the conversion in exactly one place. This article walks the swap for a 0-4095 count card scaled to -10 to +10, including the flicker you will meet near zero and the calibrator check that releases the panel.
Why does the minus-sign flag trick fail on a touch panel?
A message panel assembles its display as text, so the flag and a printed minus character travel together. A touch panel binds its numeric object to one tag, and an unsigned tag turns a -1 register into 65535.
On the text panel the display is a message you build: fixed text, an embedded number, and a minus character printed when the flag bit is set. A touch panel's numeric object shows whatever its tag holds, and the flag lives in a separate bit that never travels with the number. A trend object plots the number the tag holds, so it carries no sign, and a sign built as text is one more object to place and keep in step on every screen that shows the value.
The fix is to let the value carry its own sign. A signed integer tag makes -1 read as -1, and the scaling tab turns raw counts into signed units. The flag logic retires with the old panel.
What does the analog card put in the register?
Read the card manual's count range first. Then force the input to the bottom, the middle and the top of its range with a calibrator and record the raw register value at each point; the example card gives 0-4095 counts.
You need four things:
- the analog card manual, for the input range and the count range
- a calibrator or a known load
- the PLC data view, to read the raw register
- the panel editing software
Work it in this order:
- Look up the count range in the card manual. The example card spans 0-4095 counts.
- Drive the input to the bottom of the range and record the raw register value.
- Repeat at mid-range and at the top.
- Compare all three readings with the manual.
If the bottom-of-range reading is not the manual's low count, fix the wiring or the card configuration before touching the panel; panel scaling cannot repair a wrong raw signal. Some cards scale internally and hand the PLC engineering units already, for example 0 to 10500 for a 0-10 V input; the register is then already in units and the panel tag stays 1:1. For a second worked pass at the same arithmetic, converting 0-4095 raw counts to temperature units runs the numbers for a temperature input.
How do I set the panel tag to a signed integer?
Give the tag the signed form of the same integer size the register uses, a signed 16-bit integer for a single analog word. The panel then reads two's complement and the value crosses zero cleanly from positive to negative.
In two's complement the top bit of a 16-bit word is the sign, so a register holding -1 reads as 65535 when the tag is typed unsigned, and a process that drifts just below zero jumps to a huge number. That jump is exactly the symptom the old flag logic covered up on the text panel. Keep the tag's size matched to the register, and change to 32-bit only when the scaled math itself overflows 16 bits, as the FAQ below covers.
A wrong data type always shows a plausible but wrong number, and the same family of fault with BCD-coded registers is its own article: why an HMI panel shows nonsense numbers from a BCD analog register.
Check the tag before adding scaling. Put the numeric display on a screen with the scaling left off, and confirm it shows the same raw counts you recorded in the PLC data view. When those numbers match, the tag is right and scaling can go on top.
How do I map raw counts to signed units on the scaling tab?
Enter the raw low and high counts and the engineering low and high values on the numeric object's scaling tab, so the panel applies one linear conversion; for the example card that is 0 mapped to -10 and 4095 mapped to +10.
Set it up like this:
- Open the numeric display object's settings and find its scaling tab.
- Enter 0 as the raw low and 4095 as the raw high.
- Enter -10 as the engineering low and +10 as the engineering high.
- Set the decimal places; two for this example.
- Download the project and watch the object on a live screen.
The panel applies this line:
EU = EU_low + (raw - raw_low) x (EU_high - EU_low) / (raw_high - raw_low)
= -10 + raw x 20 / 4095
The scaling tab belongs to each display object, so every object that shows this tag needs the same entries. Editors that offer interpolation between points take the same two pairs; two points define one straight line and the panel interpolates between them.
If the reading comes out right at one end and off by a steady factor elsewhere, that is an offset or span error, and the fix for an HMI value that reads ten times too small walks through finding it.
Worked example: what does 1529 counts show on a -10 to +10 scale?
With EU = -10 + counts x 20 / 4095, a register holding 1529 counts works out to -2.53. The panel shows -2.53, and the minus sign comes from the signed tag and the scaling tab, with no flag and no text object.
The arithmetic:
- Span: 20 units over 4095 counts = 20 / 4095 = 0.0049 units per count.
- 1529 counts x 20 = 30580; 30580 / 4095 = 7.468 units above the low end.
- -10 + 7.468 = -2.532, displayed to two decimals as -2.53.
The calibrator points land like this:
| Raw counts | Displayed value |
|---|---|
| 0 | -10.00 |
| 2047 | -0.00 |
| 2048 | +0.00 |
| 4095 | +10.00 |
So a load that puts 1529 counts on the card reads -2.53 with a live minus sign, and stepping the load up through zero flips the display from negative to positive without any logic in the PLC.
Why does the display flicker around zero and how do I stop it?
Zero falls at count 2047.5 in this example, which no integer count can hold. Near zero the display toggles between about -0.002 and +0.002 and reads like a sign fault; round the display to fewer decimals or filter the value in the PLC.
The quantum is 0.0049 units per count, so count 2047 computes to -0.002 and count 2048 to +0.002, and a little input noise toggles the sign even when the weight is steady. Cut the flicker in this order:
- Round the numeric object to two decimals. The 0.005 quantum then rounds into 0.00 from both sides.
- If the job needs the third decimal, add a small deadband or filter in the PLC and scale the filtered value on the panel.
- If the process needs a true zero, tare or zero the value in the PLC before the panel scales it.
Check it by holding the input at zero load: the display should sit still. If the sign still toggles at two decimals, the noise band is wider than the rounding, so filter in the PLC.
Where should the scaling live, in the PLC or on the panel?
In one place only: scale on the panel's scaling tab as the permanent repair, and use PLC scaling with a 1:1 panel tag as a temporary restore. Scaling twice applies the conversion twice and the range goes wrong at both ends.
If the cutover has to run tonight, scale in the PLC: convert the raw count to a signed integer in scaled units, point the panel tag at that register, and leave the tab at 1:1. That is the old idea minus the flag. Once the tab is checked against the calibrator points, point the tag back at the raw register, enter the scaling there, and delete the PLC conversion and the flag logic together. One place then holds the calibration, and a recalibration is a single edit.
If operators enter negative setpoints from the panel, the entry object needs the signed type for the same reason, and the allowed range should be clamped in ladder logic; clamping HMI numeric entry limits in PLC ladder logic shows the clamp.
Recommendation: Keep the scaling on the panel's scaling tab with the tag pointed at the raw register, and run PLC scaling with a 1:1 tag only for a same-night cutover. Once the tab passes the three calibrator points, delete the flag logic and the PLC conversion so a single edit holds the calibration.
How do I check the panel before releasing it?
Drive the input to the low end, through zero and to the high end with the calibrator, and confirm the display shows -10.00 with its minus sign, a steady value near zero, and +10.00, matching the raw counts you recorded at the start.
Run the release check in this order:
- Drive the input to the low end and confirm the display reads the negative end value with a leading minus.
- Step slowly through zero and confirm the display crosses without jumping to a large number; a jump means an unsigned tag survived somewhere in the project.
- Drive to the high end and confirm the positive end value.
- Search the project and the PLC for leftover flag logic or text objects that print a minus sign, and delete what you find.
- Cycle power on the PLC and the panel and repeat the low and high points to confirm the scaling entries persisted through the restart.
Hand the panel over when all five pass.
Can a signage display replace the HMI panel?
No: a signage display plays its own content and has no PLC driver, so it cannot take over this scaling job. On the panel-mount units the HDMI port is an output for feeding a screen, not an input for one.
The HMI holds this project together: a driver for the PLC protocol, data types such as the signed integer, and the scaling tab. A signage screen has none of that, so putting one where the HMI belongs stops the numbers entirely. Where a cell does want a screen beside the machine, for shift targets or maintenance notices, that is a separate job with its own content, and the Android panel-mount displays are the product for it.
Questions
Why does the panel show a plus sign on every value, positive and negative?
That is the display format, not the tag. Some editors format numeric fields with an explicit-sign pattern, and the pattern one editor uses on its IO fields, s999.9, prints a sign in front of every value including positives. Remove the sign character from the number pattern and the plus signs disappear.
What if the scaled value overflows the 16-bit register?
A signed 16-bit integer holds -32768 to 32767. If the multiply and divide produce values outside that band, the register wraps and the display jumps from one extreme to the other mid-range. Do the scaling math in 32-bit integers and store the result in a 32-bit tag, keeping the raw register itself untouched.
How many decimal places can the display honestly show?
Round the span divided by the count range. The example gives 20 / 4095 = 0.0049 units per count, so the third decimal is the smallest real step. Show two decimals and the last digit stays stable; a fourth decimal would only display noise.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.