One line object with rotation animation replaces paired 180-degree meters for a turntable angle: map the PLC's 0 to 359 value to a 359-degree sweep, set zero and direction in the animation, and force 358, 359 and 0 to prove the wrap steps 1 degree. Size the numeric readout beside it at 20 ft of distance per inch of capitals for a glance read.
A turntable with an absolute encoder hands you the angle as a clean 0 to 359 value in the PLC. The screen side is where these projects stall: meter objects draw their needles over a partial arc, and two 180-degree meters back to back keep showing two needles. The fix takes one object. Draw a line, enable its rotation animation, assign the PLC angle tag, and map 0 to 359 onto a 359-degree sweep. You get a single pointer at exactly 1 degree per count, and the wrap at the top of the dial moves the line 1 degree, not 359. This article walks through the setup, the size of the numeric readout beside the dial, and the wraparound test to run before the screen goes into production.
What shows a full-turn angle on an HMI screen?
A line object driven by rotation animation shows the complete 0 to 359 degree turn: assign the PLC angle tag as the animation source and map it to a sweep of the dial, and the line becomes the single pointer two half-circle meters never gave you.
A line is the simplest shape an editor will rotate in runtime. Rotation animation is a standard animation type on line and shape objects: you supply a source tag, the source range and the rotation range, and the panel redraws the object at the mapped angle on every scan. Because the mapping carries the PLC value straight into the angle, the pointer shows the same number the control logic acts on, with no second angle calculation living in the screen. Draw a tick circle behind the line if operators need to read an approximate angle off the dial; the exact value lives in the numeric readout next to it.
Why do two 180-degree meter objects fail?
Two back-to-back 180-degree meters fail because each object draws and keeps its own needle: both dial indicators stay visible, and visibility settings hide or show whole objects, never merge two needles into one pointer.
A meter object is a scale and a needle built as one unit. Its needle never leaves its own arc, so at 181 degrees the second meter takes over while the first still holds its last drawn position. Hiding the idle meter with a visibility expression leaves you a blank half or a visible jump, which is why visibility tweaks never converge on one clean pointer. When the requirement is one pointer through a complete turn, the meter object is the wrong object class, and adjusting visibility is the wrong first fix. If the screen genuinely needs a scaled gauge, build the scale as its own object, the way the zero-centered analog meter scale article does for a needle that must start at zero on the left.
What do you need before you edit the screen?
Confirm three things on the machine before you open the editor: the PLC value sweeps 0 to 359 while the table turns, a backup copy of the project exists, and someone has written down where machine zero sits and which way the table turns positive.
- The value. Watch the existing numeric display while the table turns through at least one full revolution. If the number sticks, repeats or jumps, fix the encoder side first; an animation cannot repair a bad input value.
- A project copy. Edit a copy of the screen and leave the production screen untouched until the wrap table below passes.
- Zero and direction, written down. Encoder zero often sits at a mechanical home that is not 12 o'clock on the screen, and screen coordinates can turn a rising value counterclockwise while the table turns clockwise. Note both before you map anything.
- The numeric readout kept on screen. Keep the 0 to 359 digits beside the dial through commissioning, as in how to display a PLC counter value where operators can see it; disagreement between digits and pointer is the fastest fault finder you have.
- The animation settings location. Most editors collect rotation animation on a tab of the object's own settings. If your editor version has no such tab for line objects, stop and take the panel vendor's support route with model and version ready.
How do you set up the rotating line object?
Draw one line with its inner end on the pivot, open its rotation animation settings, and enter the mapping: source endpoints 0 and 359 to rotation endpoints 0 and 359 degrees, with zero orientation matched to the machine.
- Copy the screen. Work on the copy from the checklist above.
- Draw the pointer line. Put the inner end on the center of rotation and run the outer end out to near the tick circle. Set the pivot where your editor asks, usually the line's end or midpoint.
- Enable rotation animation. Open the line object's settings and switch on the rotation animation; in most editors it sits on a rotation tab of the object.
- Assign the angle tag. Select the PLC's 0 to 359 value as the animation source.
- Map the ranges. Enter 0 and 359 as source endpoints and 0 and 359 degrees as rotation endpoints. Each count then moves the pointer exactly 1 degree, and value 359 rests 1 degree before the start position, which is where a 359-degree angle belongs. If your editor insists on a 0 to 360 endpoint, that mapping leads the true angle by up to 1 degree at the top of the dial; 0 to 359 is exact.
- Set zero and direction. Point the line at machine zero and choose clockwise or counterclockwise to match the encoder. Correct both in the animation settings and leave a valid PLC angle alone.
- Re-check the numeric readout. Keep the digits with their unit on the same screen.
Field names and endpoint conventions differ between editors and versions, so read the range fields your editor actually presents. Vendor knowledge bases show the same three settings editor by editor; a knowledge-base walkthrough of creating rotating objects at runtime is one example. This setup rotates the object in place; when an object has to travel along a circle instead, the setup is different, and animating an object around a circle on an HMI screen covers that motion.
How big should the angle digits be at the operator station?
Use 30 ft of viewing distance per inch of capital letter height, the FHWA planning figure for signs, and step up to 20 ft per inch when the operator reads the angle at a passing glance; a station 10 ft away then needs 0.5 in capitals.
Work the same figure for the digits that sit next to the dial. A station 10 ft away needs 10 ÷ 30 = 0.33 in capitals at the planning figure, or 10 ÷ 20 = 0.5 in for a read at a glance. On a 1920 × 1080 panel near 21.5 in, the pixel pitch works out to about 0.25 mm, since a 16:9 panel of that diagonal is about 476 mm wide and 476 ÷ 1920 = 0.248 mm per pixel. The glance size then needs 0.5 in = 12.7 mm ÷ 0.248 ≈ 51 px of capital height, and capitals run about 70 percent of font size, so draw the value at about a 72 px font. The 30 ft per inch minimum lands at 0.33 in ≈ 8.4 mm ≈ 34 px of capitals, about a 48 px font. If the readout block carries two lines, angle over status text, space them at 1.7 times the capital height. Pixel pitch and shared layouts across panel sizes are worked through in why two HMI panel sizes share one layout in pixels.
Example: what happens when the angle wraps from 359 to 0?
At a correct mapping the wrap is a 1 degree step: value 359 draws the pointer 1 degree before the start position and value 0 draws it on the start position, so the boundary jump is 1 degree, about 0.5 mm at a 120 px pointer tip.
Scenario: a packing-line turntable, an absolute encoder into a PLC integer tag, screen at 1920 × 1080, pointer line 120 px long, machine zero at 12 o'clock, clockwise positive. The tip sits 120 px from the pivot, and one degree of rotation carries it 2π × 120 ÷ 360 ≈ 2.1 px, about 0.5 mm on that panel's 0.248 mm pitch. Force values from the PLC or in the editor's test mode and check the table:
| Value forced | Pointer must sit | Readout must show |
|---|---|---|
| 0 | on machine zero | 0 |
| 90 | a quarter turn clockwise | 90 |
| 180 | opposite the start | 180 |
| 359 | 1 degree before machine zero | 359 |
| 359 then 0 | steps 1 degree, about 0.5 mm at the tip | steps to 0 |
Each row has a failure signature:
- Pointer rests a fixed amount off machine zero at every angle: the zero orientation setting, corrected in the animation settings.
- Pointer turns opposite the table: the direction setting, also in the animation settings.
- Pointer frozen while the digits count: the animation is bound to the wrong tag, or the runtime is running the original screen, not your copy.
- Pointer covers only half a circle at any value: a meter object is still driving the graphic; delete it and bind the line.
- Pointer sweeps backwards through the bottom at the boundary: rotation endpoints entered in reverse, so the sweep runs negative.
Run the table in the editor's simulation or a test runtime before the screen replaces production. The pointer is a drawing of the PLC value, so encoder accuracy is judged on the machine side; the screen proves the graphic, and the digits beside it give operators their check during the first shifts.
When does a meter object beat a rotating line?
Pick the rotating line whenever the operator needs position at a glance, and keep a meter-style object only when the screen must show a scaled dial with tick marks and a needle, such as a zero-centered gauge, where the scale itself carries meaning.
- One pointer over a complete turn, no scale: the rotating line, mapped 0 to 359 to a 359-degree sweep, exactly 1 degree per count.
- A dial whose printed scale and ticks must track the needle: keep the editor's gauge object class and accept its arc, or draw the scale behind the line; the line hides nothing you drew yourself.
- No rotation animation on line objects in your editor version: stop editing and take the panel vendor's support route, with the model, the editor version and the values you forced in the wrap test at hand.
- The same angle wanted away from the machine, say at a packout bench: that is a status-board job, a different screen class. Our shop-floor signage displays play offline content or your own Android app; they are not HMIs and take no video input, so the machine panel stays the display of record at the table.
Recommendation: Replace paired 180-degree meters with one line object driven by the PLC's 0 to 359 value whenever the display is a position readout; map source 0 to 359 onto a 359-degree sweep, and hold the screen out of production until the wrap table passes with a 1 degree step at the boundary.
Questions
Does rotation animation work from an encoder that reports counts instead of degrees?
Yes. Set the source endpoints to the count range and the rotation endpoints to the angle sweep. A 12-bit single-turn encoder reporting 0 to 4095 mapped to 0 to 359 degrees moves the pointer 0.088 degree per count, finer than the 1 degree steps of a degree-valued tag, and the mapping math is the same.
How fast should the animation refresh?
The pointer redraws each time the driver's scan reads the tag, so set the tag's scan rate in the panel's communications settings. For a turntable readout, 100 to 250 ms looks smooth to an operator, and faster scans only add traffic. Give the numeric readout the same scan rate so the digits and the pointer update together.
Can I rotate the pointer by odd angles like 47 degrees in the editor?
Editor rotation of a static object and runtime rotation animation are separate features. Many editors limit static rotation to 90 degree steps for layout work, but the animation mapping accepts any endpoints you type, so a runtime pointer can rest at 47 degrees, 359 degrees or anywhere the value puts it.
Does the dial need a touch screen?
No. The rotating line is output drawn from the PLC value, so nothing on the screen needs a touch. Touch matters only if operators also enter setpoints, jog the table or acknowledge faults on the same panel, and that control requirement should be settled before the panel is ordered.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.