The pen selector in a trend object lists integer and floating point tags only, so a pump boolean cannot be a pen. Map each pump bit to an integer that holds one level when off and another when on, then add that tag as a pen. One pump uses 0 and the top of scale; three pumps use separate bands.
You are staring at a trend object whose pen selector lists integer and floating point tags only, and the pump run bit is a boolean, so it never appears no matter what you type. The fix is to give each pump a numeric tag that holds one level while the bit is clear and another while it is set, then add that tag as a pen. Done well, the chart shows the caisson level as a wandering line and each pump as a square wave whose edges mark the exact start and stop times. This page gives the levels for one pump and for three, where to build the mapping, and how to prove the pens against the real pumps.
Why won't the trend object take a boolean tag?
Because the pen plots numbers and the selector behind it offers integer and floating point types only, so the boolean never appears in the list, and no amount of rescanning or renaming will put it there. The screen is telling you its type list is fixed, not that your tag is broken.
A trend pen samples one numeric tag and plots the samples against a time window, live or from a log. A boolean has state and no magnitude, so the trend object leaves it out of the tag list. Renaming the tag, rescanning the controller database, or rebuilding the object changes nothing: the list belongs to the object, and the bit's name was never the problem. Treat the missing choice as a display limitation. The same bit drives other objects on the screen with no conversion at all: two text states from one PLC bit, indicators, color. Keep working on the trend pen, and leave the wiring alone.
How does a two-state bit become a chart trace?
Pick two constants on the chart's value axis, write the lower one to a numeric tag while the pump is off and the upper one while it is on, and the pen draws a square wave whose edges are the start and stop times you wanted. That is the whole trick, and it is standard practice on charts of this kind.
While the bit is clear the tag holds the lower constant, while it is set the upper one. The pen sits flat at each level and steps at each change, so run time reads as the width of the upper plateau. The numbers are an encoding for the eye. They carry no engineering unit, and the level trace beside them is the only measured thing on the axis. Generic charting tools do the same with digital traces pinned to the bottom and top of the panel, and the complaint there is the one you are solving here: a full-height digital trace walks over the analog trace it is meant to accompany. Chosen levels fix that. A numeric state tag built this way is also a clean input for color states driven by one integer tag elsewhere on the screen.
What OFF and ON levels work for one pump?
Use 0 for off and the top of the chart scale for on, so on a 0 to 100 axis the pen steps the full height and each start and stop draws as a vertical marker across the whole chart. An operator scanning the page sees every cycle without reading a number.
That full-height pair is the classic single-pump encoding, and the vertical line at each transition is exactly the point. The plateau width at the top is the run time, often the number the maintenance question is really about. The cost is visual weight: a trace that owns the whole axis crosses the level pen twice per cycle and can crowd it on a busy chart. That crowding is the problem the multi-pump bands in the next section are built to avoid.
What levels keep three pump pens apart?
Give every pump its own pair of constants, a band nobody else uses: one working three-pump overlay ran 20 and 40 for the first pump, 25 and 45 for the second, and 50 and 70 for the third, and the three traces never merged. Adjacent pens always stayed at least 5 counts apart on a 0 to 100 axis.
Each band there spans 20 counts and overlaps its neighbour by design. The rule that decides whether any set works is different: keep every state level out of the range the level trace actually occupies. Those 20, 25 and 50 numbers came from a caisson whose level lived low on the axis. On a caisson that holds between 35 and 60 percent, the 50 to 70 band lands on top of the level pen and the overlay dies. The worked example below moves the bands to fit. Past three or four pumps, switch to a single pen driven by a packed status word trend, one integer that steps by 1, 2 and 4 as pumps come on. And if your run bits arrive as bits of one controller register, split the register bits into discrete tags before mapping each one.
Where should the boolean-to-number mapping run?
In the controller, one rung pair per pump writing an integer register the HMI already polls, because an HMI-side calculated tag depends on the software supporting expressions and gives you a second place to maintain the same logic. The controller version survives an HMI project import and sits in the program where the next maintainer reads it.
You need one integer tag per pump, access to the rung logic or the HMI expression editor, and edit rights on the trend object. Then:
- Write the level plan on paper first: for each pump an OFF constant and an ON constant in counts of the chart axis, each band 10 to 20 counts wide, every level clear of the level trace's operating range.
- Create one integer tag per pump: one controller register per pump, or one calculated tag in the HMI.
- Program the mapping. In the controller, one rung moves the ON constant while the bit is set and one moves the OFF constant while it is clear. In the HMI, the calculated tag reads the bit and returns one of the two constants.
- Add each integer tag as a pen in the trend object, each pen its own color, and label it with the pump name plus the word status, so nobody reads 85 as a tank percentage.
- Set the chart's value axis so every band and the level's normal range sit on screen at once, then verify as described below.
How does an example with three pumps and a level pen turn out?
Take a caisson trend scaled 0 to 100 percent whose level holds between 35 and 60 percent: the bottom third and the top third of the axis are free, so the bands go there, two low and one high. Here is the assignment and its clearances.
| Pen | OFF level | ON level | Clearance from the level band |
|---|---|---|---|
| Pump 1 | 5 | 15 | 20 counts below 35 |
| Pump 2 | 20 | 30 | 5 counts below 35 |
| Pump 3 | 75 | 85 | 15 counts above 60 |
The chart's plot area is 600 pixels tall and the axis spans 100 counts, so one count is 600 / 100 = 6 pixels. Pump 2's ON level at 30 sits 35 - 30 = 5 counts below the lowest normal level reading, which is 5 x 6 = 30 pixels of separation. Pump 3's OFF level at 75 sits 75 - 60 = 15 counts above the highest, or 90 pixels. Nothing rides on anything.
Now the run. At 10:00 all three pumps are off: the pens sit at 5, 20 and 75, and the level reads 42 percent. At 10:04 pump 2 starts and its pen steps 20 to 30, an edge 10 counts high. At 10:11 the level has climbed to 58 percent and pump 3 starts: its pen steps 75 to 85. At 10:19 the level is back to 44 percent and pump 2 stops: its pen falls to 20. Pump 2's run time reads straight off the plateau: 10:19 - 10:04 = 15 minutes. Compare the 50 to 70 band from the standard set: the whole band sits inside the level's 35 to 60 range, and every pump 3 edge would have drawn on top of the level trace.
Recommendation: map one integer per pump in the controller, with OFF and ON constants 10 to 20 counts apart and every level at least 5 counts clear of the level trace's operating range. On a 0 to 100 axis that carries three pumps; a fourth belongs on a second trend or on a packed status word pen.
How do you confirm the pens match the real pumps?
Work in order from the bit to the pen, because each failure points at one layer: the bit, the integer, or the pen assignment, and a flat pen at the end of the chain has a different fix at each layer. Spend your time where the chain stops moving.
- Watch the bit in the HMI tag monitor while the pump is commanded. If the bit never moves, stop: the mapping cannot display a state the controller is not reporting, and the fault is upstream of the screen.
- If the bit moves and the integer does not, the mapping is wrong. Check the constants and the rung conditions, or the expression.
- If the integer moves and the pen stays flat, check the tag address first, then the chart scale. A pen scaled 0 to 1000 turns a 20 to 45 step into a 2.5 percent wiggle you will never see.
Do not jog a pump just to make a trace move: command it under the site's normal permissives, or simulate the status bit in the controller with the output disabled. Leave every interlock on the original bit; the encoded integer exists for the chart. And if the floor also wants a large shared board showing the same pump and level status for the room, that is a job for shop-floor signage.
Questions
Is an integer or a floating point reference better for the state pen?
Integer. The selector accepts both types, and a 16-bit integer covers 0 to 32767, far beyond any chart scale you will draw. A two-value signal gains nothing from floating point, and an integer keeps the controller side simple: two move instructions and one register per pump. Use floating point only when the same tag must also carry a true analog value somewhere else in the project.
Will the pump pens keep their history after the panel restarts?
Only the logged part. A live trend redraws what it sampled since the view opened, so after a restart the trace starts again from an empty line. If your trend plots a data log, log each pump's integer reference, because the pen reads that tag: a boolean that was never logged leaves nothing for the pen to plot later.
How many pump pens fit on one 0 to 100 chart?
Three state pens plus the level pen is the practical limit. Each band wants 10 counts plus about 5 counts of separation, so three bands consume roughly 45 counts of the axis and still leave the middle open for the level trace. A fourth pump belongs on a second trend, or on one packed status word pen that steps by 1, 2 and 4.
Can the control program read the encoded value back as pump status?
Keep interlocks and permissives on the original bit. The constants exist for the chart, and anyone who rescales a band for readability changes what the number means. The controller already owns the true state, so a display encoding read back becomes a second source of truth that can drift from the bit it came from.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.