Most bar graph objects that lack a target-line setting cannot gain one, so split the job. Place a static marker at (target - minimum) / (maximum - minimum) of the bar length for the operator's eye, and write the below-target comparison in the PLC so a 38 psig reading on a 0 to 100 psig scale asserts the alarm bit the marker never can.
A pressure or level readout asks two things of a bar graph: a line the operator reads the fill against, and a signal when the value drops under it. The bar object you placed offers scale minimum and maximum, fill direction and colors, but no target-line setting. Another bar object in the same editor ships one. That gap splits cleanly. Draw the reference as a separate marker at the position a scale formula gives you, and write the below-target decision in the PLC, where a 38 psig reading on a 0 to 100 psig scale asserts an alarm bit a drawing can never set. This article gives the formula, the rung, the worked numbers and the tests that keep the two honest.
Does your bar graph object have a target line option?
Open the bar graph object's property list and look for a target, threshold or reference-line setting. If the object does not expose one, no amount of searching adds it, and you build the marker and the alarm as two separate pieces.
The property list is the complete catalog of what that object can do. Editors ship several bar or meter objects, and one family often carries a threshold line while another does not. A feature that exists on one bar object tells you nothing about the object on your screen. Open the exact object you placed, in your installed editor and version, and read the properties. Search the property names too, because the same feature can ship under the words threshold, limit or reference.
Split the requirement before you draw anything. A target line is a visual reference: it shows the operator where the threshold falls. A low alarm is a logic decision: something compares the process value with the target and asserts a signal. An overlaid drawing can serve the first job and can never serve the second.
How do you place a target marker without a target line setting?
For a linear scale, place the marker at (target - minimum) / (maximum - minimum) of the bar's length, measured from the minimum end. A 40 psig target on a 0 to 100 psig bar sits at 40 percent, or 80 px up a 200 px bar.
Record three facts from the object's properties first: the scale minimum, the scale maximum and the fill direction. A vertical bar filling upward measures from the bottom. A horizontal bar with its minimum at the left measures from the left. Take the bar's drawn length from the editor, where object size is a property, not a guess from the running screen. The formula maps linear scales, which is what bar graph objects use, and it assumes the target falls inside the displayed range.
Draw the marker as a short line across the bar and label it TARGET, positioned at fraction times length from the minimum end. If the fill starts inside a frame, measure from the fill's first pixel.
Two boundaries keep the drawing honest. A target outside the displayed range lands off the bar, so show the number as text and skip the line; the PLC comparison keeps working where the marker has nothing to sit on. And the drawing is static: recompute it whenever the target value or the scale changes, or replace it with a live number when the target moves between runs.
How do you make the below target condition actually signal?
Write the alarm in the PLC as a rung that asserts a bit when process value is below target, expose that bit to the panel, and drive the horn, light or screen change from the bit. The marker only shows where the threshold sits.
Compare in engineering units on both sides. If the panel object has no scaling tab, scale the analog value in the controller and compare psig against psig; the same move that fixes a line graph with no scaling tab fixes this rung. Mismatched units are a classic reason a marker and a bit diverge, and the scale value differing from the PLC analog input article shows one worked case and how to find the conversion.
Decide the equality case on purpose. A strictly-less rung leaves exactly 40.0 psig unalarmed; a less-than-or-equal rung alarms on the nose at 40.0. Write the chosen rule into the rung comment so the next engineer inherits the decision.
Add hysteresis so the bit stops chattering at the line: assert when the value falls under 40.0 psig and clear it only when the value recovers to 42.0 psig. The 2.0 psig deadband must be wider than the reading's normal wander. A process that drifts 1 psig either side of 40 clears cleanly at 42.
From the bit, everything downstream is ordinary logic: a horn, a stack light, or an event triggered screen change on the HMI when the bit turns on.
Worked example: where does a 40 psig target sit on a 0 to 100 psig bar?
On a 0 to 100 psig bar 200 px tall with a 40 psig target, the marker sits 200 × 40 / 100 = 80 px up. At 38 psig the bar top reaches 76 px, 4 px short, and the alarm bit asserts.
The scenario: a process line watched on a panel, bar graph scaled 0 to 100 psig, fill from the bottom, drawn 200 px tall, target 40 psig, low alarm asserting under 40.0 psig and clearing at 42.0 psig.
The marker: fraction = (40 - 0) / (100 - 0) = 0.40; position = 200 px × 0.40 = 80 px above the bottom, which leaves 120 px to the top.
The states:
| Process value | Bar top | Marker check | Alarm bit |
|---|---|---|---|
| 38 psig | 200 × 0.38 = 76 px | 4 px below the line | on (38 below 40) |
| 40 psig | 80 px | exactly on the line | follows your equality rule |
| 41 psig | 200 × 0.41 = 82 px | 2 px above the line | off on a fresh rung |
| 42 psig | 200 × 0.42 = 84 px | 4 px above the line | cleared after an alarm |
At 38 psig the fill stops 4 px under the marker while the rung asserts, which is the split working as designed: the eye gets its reference and the logic gets its signal. Verify the drawn geometry once with two known points, minimum and maximum, before trusting any position in between.
Which symptoms tell you the marker and the alarm have come apart?
Five symptoms point at a display and logic pair that have come apart: bar under the line with the bit off, bit on with the bar above the line, a marker whose pixel no longer matches a changed scale, a marker missing at a bar end, or a color-only indication.
What each one points to, with the check that separates them:
- Bar under the line, bit off. The rung compares the wrong pair: raw counts against a psig setpoint, an unscaled tag, or the bar's display tag picked instead of the controller tag. Force a low value and watch the process value in the controller data view next to the setpoint in the rung.
- Bit on, bar above the line. The comparison points the wrong way, greater-than where less-than was intended, or the setpoint register holds a stale value from the last edit.
- Marker at the wrong height after a change. The drawing still sits at its old offset while the scale minimum, maximum or object size moved; recompute with the formula.
- Marker missing near a bar end. The target sits outside the displayed range and the editor clips the drawing; show the target as text and let the bit carry the alarm.
- Color-only indication. The state is lost on color blind operators and under poor plant lighting; add text or a shape, as the next section sets out.
How do you test the marker and the alarm at the threshold?
Force the process value through three points, 39, 40 and 41 psig on the example scale, and watch both sides. The bit must follow your equality rule at exactly 40, and the marker must sit where the formula puts it, 80 px on the 200 px bar.
Run the sequence from the controller, forcing the scaled value:
- 39 psig. Bit on; bar top at 200 × 0.39 = 78 px, 2 px under the marker.
- 40 psig. Bit state matches the rung comment exactly; bar and marker coincide at 80 px.
- 41 psig. Bit off on a fresh assertion; nothing chatters while the value holds between 40 and 42.
- Recovery. With the bit on, raise the value to 42 psig, bar top 84 px, and confirm the bit clears only there, proving the 2.0 psig deadband.
- Endpoints. 0 psig gives an empty bar at 0 px and 100 psig a full bar at 200 px; the scale ends where the properties say.
- Handshake. If operators acknowledge on the panel, confirm the acknowledgment reaches the controller; the HMI alarm acknowledgment back to the PLC handshake keeps one source of truth for the state.
Watch the bit in the controller's data view and on the panel at the same time; a panel tag that shows a different state points at a moved or doubled tag address.
How do you keep the alarm readable for color blind operators?
Pair the color with text or a shape: write ALARM LO or a filled triangle beside the bar. High-performance HMI practice pairs color with descriptive text, because text is the part that survives color blindness.
The design guidance published for high-performance HMI panels is direct: combine colors with descriptive text and add alarm indicators, so state information reaches every operator on the floor. Put the text where the eye already is. Use a banner under the bar that reads PRESS LOW, or a triangle at the marker. Blink the banner while the alarm stands unacknowledged, hold it steady after acknowledgment, and return it to plain text when the value recovers past the deadband.
Recommendation: when the bar graph object offers no target line, draw the marker at (target - minimum) / (maximum - minimum) of the bar length and take the alarm from a PLC comparison with a deadband wider than the process wander, 2.0 psig on the 0 to 100 psig example. Keep the drawn marker only while the target and the scale are fixed for the run. If either moves, show the target as a live number and let the rung carry the decision.
Questions
Can the on-screen marker carry an operator safety function?
No. Keep every required machine response, interlock and stopping function in the controller or safety architecture the machine already has. The overlaid line is a drawing for the operator's eye, and the alarm bit from the PLC comparison is the signal that other logic reacts to. If a low condition must stop a pump or a machine, that decision belongs in the control logic or the safety circuit, not in a screen graphic.
The bar sits under the line but the alarm bit stays off. Why?
Check the units on both sides of the rung. A 16-bit analog channel that spans 0 to 16383 counts over 0 to 100 psig reads about 6226 counts at 38 psig. Compared against a setpoint of 40, 6226 is never less, so the bit stays off while the bar sits under the line. Scale the value to psig in the controller, or write the setpoint in counts, and the two agree.
What changes when the target moves between batches?
A fixed marker matches one threshold and one scale. Write the target into a controller register the recipe or the operator sets, keep the comparison rung pointed at that register, and show the live target as a numeric text object beside the bar. Redraw the line only when the new target and the bar scale stay fixed for the whole run, at the fraction the formula gives.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.