At a glance
| Item | Typical answer |
|---|---|
| Problem | Output and stops are written on shift sheets and typed in the next day, so nobody knows during the shift whether a line is behind, and stop times are guessed. |
| What is connected | Run state, good and reject counters, cycle time and stop reason codes from machine PLCs, and stack-light and cycle signals from machines without a usable PLC, through licensed gateways on the shop floor. |
| Who uses it | Line supervisors and team leaders, production and maintenance managers, process engineers, and the planning or ERP team. |
| Typical first scope | One line or one cell of eight to fifteen machines, ideally mixing a modern PLC machine and an old relay machine. |
| Time to first screen | Typically a few days after the first machine is wired. Budget three to six weeks for a pilot whose counts the supervisors accept as the shift record. |
The situation
A discrete manufacturing plant typically has machines from four decades on the same floor: CNC machining centres with networked controls, presses and assembly stations on mid-range PLCs, and older special machines whose only interface is a stack light and a mechanical counter. Production figures come from operators: a tally at the end of each hour or shift, stop times rounded to the nearest quarter, and a reason chosen from memory.
The effects are well known. Small stops of two or three minutes never reach the sheet and quietly cost more output than the big breakdowns. A machine waiting for material looks the same as a machine waiting for maintenance. Supervisors learn on the next morning that night shift was 20 % short. Improvement projects argue from opinions, and the ERP receives quantities a day late.
The goal here is modest and achievable: an automatic record of when each machine ran, how many good and rejected parts it made, and when and how long it stopped, visible live on the floor and available to other systems. Detailed MES functions such as order booking and reason entry by operators are a separate step, covered at the end.
Goals and measures
Agree the state model and the definitions with production before connecting anything; arguments about definitions later cost more than any wiring.
- Availability = run time ÷ planned production time. Planned time excludes breaks and planned maintenance; record the shift pattern on the line asset so everyone uses the same calendar.
- Performance = (total parts × ideal cycle time) ÷ run time. The ideal cycle time per part number is a property of the product, kept in the machine's attributes or the ERP.
- Quality = good parts ÷ total parts, from separate good and reject counters.
- OEE = availability × performance × quality. Hermetry provides the inputs; compute OEE where your production reporting lives, or in a small compute script on a board card.
- Stops = number of transitions into a stopped state per shift; mean time between stops = run time ÷ number of stops; mean stop duration = stopped time ÷ number of stops.
- Output against target per hour = parts made ÷ target per hour, the figure supervisors steer by during the shift.
Prefer counters over events. A machine's total part counter, reject counter and run-seconds counter, read every minute, give exact hourly and shift figures through Hermetry's increase aggregation, which also copes with a counter that resets at shift change or power-up. Where a machine cannot provide a run-time counter, sample a 0/1 running value at a fixed rhythm, for example every 30 seconds, and read the hourly average as the share of time running.
Architecture
One licensed gateway running Hermetry Edge per cell or line section, in a cabinet near the machines. Modern machines are read over Modbus TCP on the machine network, or Modbus RTU where the PLC has a serial port: the gateway polls a small block of registers that the machine's PLC programmer exposes. Old machines get their stack-light outputs and a cycle-complete signal wired, through interposing relays, to the gateway's digital inputs; whether the gateway counts pulses on an input depends on its model, and a small remote I/O module or PLC can do the counting where it does not. Every machine appears as a child device of its gateway, with its own profile, history and alarms. See Hermetry Edge and the licensed devices.
| Component | Role | Notes |
|---|---|---|
| Licensed gateway with Edge | Polls PLCs, reads contacts, publishes telemetry | One per cell or 10 to 20 machines. Claimed by scanning its code. |
| Machine PLC register block | State, counters, cycle time, part number, reason code | Agree one register layout for all machines, mapped once by each PLC programmer. |
| Interposing relays | Isolate stack-light and cycle signals of old machines | Never draw gateway inputs directly from machine safety circuits. |
| Remote I/O or small PLC | Counts fast cycle pulses where the gateway model does not | Exposes counters over Modbus to the gateway. |
| Energy meter per machine, optional | kW and kWh | Distinguishes idle from running on machines without signals; Modbus on the same line. |
| Plant network or licensed router | Outbound connection | The gateway needs only an outbound MQTT connection with TLS; nothing on the floor accepts connections from the internet. |
| Hermetry | Storage, aggregates, alarms, rules, flows, boards, SCADA | EU, US or Türkiye region, or on your own servers. |
Point list
One register layout for every PLC machine, and a reduced set for signal-only machines. Register numbers are examples of a block the PLC programmer reserves, starting at holding register 41001.
| Point | Telemetry key | Unit | Source | Interval | Notes |
|---|---|---|---|---|---|
| Machine state | state | code | PLC 41001, or derived from stack light | on change + 60 s | 1 running, 2 idle or starved, 3 blocked, 4 stopped by fault, 5 setup, 6 planned stop, 0 off. |
| Running | running | 0/1 | PLC 41002 or green stack light | 30 s fixed | Fixed rhythm so the hourly average is the run share. |
| Run time counter | run_s | s | PLC 41003-41004 (32-bit) | 60 s | Preferred source of run time. |
| Total parts | count_total | parts | PLC 41005-41006 (32-bit), or cycle pulses | 60 s | Never reset by the gateway. |
| Rejected parts | count_reject | parts | PLC 41007-41008 | 60 s | Good = total minus reject. |
| Last cycle time | cycle_s | s | PLC 41009, tenths of a second | on change, at most every 10 s | Scale value / 10 in the gateway map. |
| Stop reason code | stop_reason | code | PLC 41010, set by the HMI | on change | Only if the machine HMI lets the operator pick a reason. |
| Active alarm number | alarm_no | code | PLC 41011 | on change | 0 when no alarm is active. |
| Part number | part_no | text | PLC string or ERP | on change | Links counts to the ideal cycle time. |
| Program number | program_no | number | CNC control | on change | CNC machines. |
| Automatic mode | auto_mode | bool | PLC or selector contact | on change | |
| Red stack light | light_red | bool | Gateway input via relay | on change | Signal-only machines. |
| Yellow stack light | light_yellow | bool | Gateway input via relay | on change | Often waiting or warning. |
| Green stack light | light_green | bool | Gateway input via relay | on change | |
| Machine power | p_kw | kW | Energy meter | 60 s | Optional; idle power is waste too. |
| Machine energy | kwh | kWh | Energy meter | 15 min | Optional; energy per part. |
| Spindle load | spindle_load_pct | % | CNC control | 60 s | CNC only; tool wear indicator. |
| PLC communication | plc_comm_ok | bool | Gateway Modbus status | 60 s | False when the gateway cannot read the PLC. |
For signal-only machines, derive state from the stack light in the gateway configuration where the model allows, or in a Script block in the profile's root flow: green steady is running, yellow is idle, red is fault, all off with power on is stopped. Declare every key in the profile's Telemetry keys tab with label, unit and decimals, and write the state code meanings into the key's label or the profile description so every board shows the same words.
Asset model
- Plant (Site) with time zone and
shift_pattern(for example three shifts 06:00, 14:00, 22:00). - Hall (Building) with
hall_manager. - Line or cell (Line) with
target_per_hour,planned_breaks,supervisor_groupandbottleneck_machine. - Machine (Machine) with
machine_no,ideal_cycle_s,machine_type(CNC, press, assembly, special),criticalityandinstall_year.
Place each machine's child device on its machine asset and the gateway on the line. Add Feeds relations between machines in material-flow order, so a blocked machine can be read against the one after it. The line's status is the worst of its machines, so the hall's site table shows at once which lines have a machine in fault. Rules written on a line act only on its machines, and an access policy on a hall gives a hall manager every line in it and nothing else. Put ideal_cycle_s and target_per_hour as attributes where both boards and rules read them.
Device setup
Profiles. One profile per machine kind: PLC machine, standard block, CNC machine, Signal-only machine, and one for the gateway. A profile holds keys, alarm rules, the online rule and its root flow. Use the Recent message online rule with a 60-second expected interval and a factor of three.
Provisioning. The administrator claims each gateway by scanning its code and places it on its line. Machines appear as child devices the first time the gateway reports them; name them in the gateway configuration after the machine number on the floor, such as M-214, so people find them by the name painted on the machine.
Settings. Remote device settings on licensed gateways expose the Modbus map, polling intervals, input configuration and, where the model has it, input counting and state derivation. Make one baseline per line type, dry-run it, and apply it to the other gateways with a bulk job in waves; a job pauses itself if fewer than 95 % of answering gateways apply it. Changes to the register layout are then one baseline change, not twenty site visits.
Intervals and exceptions. Send state and the stack lights on change, plus the state again every 60 seconds as a heartbeat. Read counters every 60 seconds; reading on every part wastes messages on fast machines and adds nothing, because increase gives the exact count per bucket. Send cycle_s on change but at most every 10 seconds. Keep running on its fixed rhythm with no deadband, or the hourly average stops meaning run share. If the gateway model has a deadband setting, use it for spindle load and power only.
Time. Shift figures depend on clocks. Synchronise gateway clocks, or leave time stamps out and let Hermetry stamp the arrival. Licensed gateways buffer readings while the link is down, within a capacity that depends on the model, and send them with original time stamps; because counters are cumulative, a shift total stays correct after an outage even if some intermediate readings were lost. Firmware for gateways is signed and rolled out in waves with a soak time; plan waves for weekends or planned stops.
Dashboards
| Board | Audience | Widgets and what they show |
|---|---|---|
| Line live | Operators, supervisors | State card per machine coloured by state; stat of parts this hour against target_per_hour; progress card of shift output against shift target; bar chart of good parts per hour for the last 12 hours (increase of count_total minus count_reject); alarm table of open stop alarms. Shown on a screen at the line through a read-only display link. |
| Hall overview | Hall and production managers | Device table of every machine with state, part number and last seen; site table of lines with their status; stat with trend of yesterday's output against the previous period. |
| Machine page | Process and maintenance engineers | Line chart of cycle_s against ideal_cycle_s; heatmap of run share by hour and weekday; table of stop reasons and alarm numbers over 30 days; spindle load or power trend. Opened from the line board by clicking a machine. |
| Shift review | Supervisors, managers | Bar chart of output per machine per hour across the last three shifts; run share per machine; count of stops per machine; table of hourly figures downloadable to Excel. |
A compute script on a card can sum the hourly buckets of the current shift into one figure and apply the shift pattern from the line's attributes; keep such scripts in one shared card definition so every line computes shift figures the same way. Entity parameters let one line board serve every line: the line is the parameter, and every card follows it.
SCADA screens
A floor layout is often more useful than a process diagram here. Draw each hall once, to scale, with machine symbols where the machines stand. The Factory pack has machine tools, presses, robot arms, gantry robots, nutrunner stations, leak testers, workstations, conveyors, palletisers and control cabinets; the MES symbols in the core set add andon boards, andon call stations, operator terminals, inspection stations, end-of-line testers, reject bins and WIP buffer lanes. See the SCADA library.
- State colours: every machine symbol takes its colour from
state: green running, yellow idle, orange blocked, red fault, blue setup, grey planned stop or off. Use the same colours as the stack lights. - Labels: each machine prints its parts this hour and its last cycle time; a rule makes the cycle time label blink when it exceeds
ideal_cycle_sby 20 %. - Andon: an andon board symbol per line, bound to the bottleneck machine's
state, shows at a glance whether the machine that sets the line's pace is running. - Stale data: a rule greys a machine whose
plc_comm_okis false, so a frozen value is never taken for a running machine. - Reuse: identical cells share one drawing attached as a view on the line; Match everything proposes a device for every unbound symbol. Clear the Problems tab before applying, and offer a 3D view of the hall for visitors and training.
Rules and alarms
Profile alarm rules handle value conditions; rules in a line's Rules card handle anything that depends on the time of day or on how long a state lasts.
| Alarm | Condition | Delay and hysteresis | Severity | Notified | Escalation |
|---|---|---|---|---|---|
| Machine fault | state == 4 | Debounce 60 s | Minor | Line supervisor, push and in-app | Rules card raises Major if it stays so for 15 min |
| Long stop | Rules card: state != 1 and stays so for 20 min, only in shift hours | Major | Supervisor and maintenance, push | Reminder every 30 min | |
| Bottleneck stopped | Rules card: state of the bottleneck machine != 1, stays so 5 min, only in shift hours | Major | Supervisor, push and SMS | Reminder every 15 min | |
| Slow cycles | cycle_s > attribute cycle_alarm_s | Debounce 10 samples; hysteresis 1 s | Warning | Process engineer, in-app | None |
| Reject rate high | Flow: rejects in the last hour above 3 % of parts | Major | Quality and supervisor, push | Reminder every hour | |
| Machine data lost | plc_comm_ok == false | Debounce 3 samples | Warning | Automation engineer, e-mail | None |
| Gateway offline | Inactivity, 5 min | Major | Automation engineer and supervisor, push | Reminder every 30 min |
Profile alarm rules debounce on the device's own time stamps, so a time debounce only advances when readings arrive; that is why state is repeated every 60 seconds. The Rules card's "stays so for N minutes" wait runs on a timer and fires on time even if nothing new arrives, and a message that ends the condition cancels it. Its Only if time window keeps stop alarms quiet during breaks and the weekend. The reject-rate alarm needs arithmetic over a window: a branch in the profile's root flow with a Statistics or Counter block on the reject and total deltas raises an alarm through Raise alarm when the ratio crosses the limit.
Alarms are acknowledged by the person who takes them (User role) and resolve when the machine runs again. One alarm stays open per machine and type and counts occurrences, so twelve short faults on a press in a shift show as one alarm with twelve occurrences, itself a useful signal. Put the first checks for each alarm number in the runbook text. During a planned changeover or maintenance, switch the cell to Manual on its Rules card for a set time, or mute single machines (at most 90 days); muted alarms are recorded but page nobody. Above 20 notifications a minute, Hermetry sends a five-minute digest instead; send stop alarms to the supervisor of the line, not to the whole plant.
Automation and integrations
- ERP quantities: the ERP pulls hourly good and reject counts per machine through the REST API with a read-only API key, using
GET /api/telemetry/serieswithagg=increaseandbucket=1h, and books them against the running order there. - State events to MES: a branch in the profile's root flow passes
statethrough an Only changes block and posts each transition, with machine name and time stamp, to an MES endpoint with HTTP request. - Maintenance: signed
alarm.createdandalarm.clearedwebhooks for fault alarms open and close work requests in the CMMS, with the alarm number in the payload. - Exports: shift review tables download to Excel. Scheduled, e-mailed reports are not built in today.
Order booking, downtime reason entry by operators, labour reporting and full OEE reporting are MES functions. They belong to Hermetry Forge, which is planned after the IoT launch and not available today, or to the MES you already run, fed with the data above. This design sends no commands to machines.
Roles and access
| Who | Role or group | Can |
|---|---|---|
| Operator | Display link on the line screen | Read-only view of the line board; no account needed on the shared screen. |
| Line supervisor | User, policy limited to their lines | Line boards and alarms, acknowledge, switch a cell to Manual. |
| Production manager | User + IoT viewer group | Every board and table, downloads. |
| Process and maintenance engineers | User + IoT operator group | Machine pages, alarms, acknowledge, mute single machines. |
| Automation engineer | Admin | Profiles, gateway settings and baselines, flows, rules, drawings, firmware. |
| IT owner | Owner | Members, sign-in policy, API keys for the ERP. |
Display links expire after a set time between 1 and 365 days and can be revoked; renew them on a schedule. The audit log records sign-ins, rule and profile changes, Manual switches and setting jobs in a hash chain that can be verified and exported.
Sizing and data
As an order of magnitude, for 40 machines on three shifts:
- Counters and fixed-rhythm values: one message per machine per minute, 40 × 1,440 = 57,600 messages a day. If
runningis sampled every 30 seconds in its own message, add the same again. - State changes and cycle times: allow about 300 messages per machine per day, 12,000 a day.
- About 70,000 to 130,000 messages a day, roughly 2 to 4 million a month. Telemetry and attribute messages count toward the allowance; alarms and connection events do not.
- Values: about 8 keys per message, some 600,000 to 900,000 values a day, in the order of 250 to 330 million a year.
Group running with the counters in one 30-second message to stay at the lower end. One gateway serving 15 machines sends about 15 to 30 messages a minute, far inside the default limit of 300 a minute. Raw readings are kept for at most 90 days; hourly and daily aggregates of the counters, kept for the plan's full retention class, carry the long-term output history at a fraction of the volume. Storage per value depends on the deployment; ask us to confirm the estimate.
Rollout plan
| Phase | Weeks | Work | Exit criteria |
|---|---|---|---|
| 0. Definitions | 1-2 | State model, counter definitions, register block, shift pattern, targets; survey which machines need signal taps. | Signed state model and register layout. |
| 1. Pilot cell | 3-6 | One cell with a modern and an old machine. Profiles, line board, floor drawing, stop rules. | Two weeks where Hermetry counts match the supervisors' tallies within an agreed tolerance; stop times agreed as more accurate than the sheet. |
| 2. First hall | 7-12 | All machines of the hall; PLC programmers add the register block line by line. | Shift sheet replaced by the shift review board for that hall. |
| 3. Integration | 13-16 | ERP quantity pull, MES state events, CMMS webhooks. | Quantities in the ERP within an hour of production. |
| 4. Plant | From 17 | Other halls; energy meters on the largest machines. | All machines reporting; weekly review uses the boards. |
Commissioning checklist
- Gateway claimed and placed on its line; every machine appears as a child device under its floor name and is placed on its machine asset.
- Each
statecode forced once with the operator: running, idle, fault, setup, planned stop, off; the board shows the right colour each time. - Counters compared with the machine display over a full hour:
count_totalandcount_rejectincreases match exactly. - 32-bit counters checked across the 65,535 boundary, or by writing a large test value in the PLC, to prove word order.
cycle_sscaling checked against the HMI.- Counter reset tested: a reset at power-up or shift change does not produce a negative or giant hourly bar.
- Long stop rule tested in shift hours and confirmed silent during a break.
- Gateway uplink unplugged for 15 minutes during production: offline alarm opens; afterwards the hour's count is complete.
- Line board on the display link shows on the line screen; the drawing has nothing in the Problems tab.
Pitfalls
- No agreed state model. If idle, blocked and starved are not defined, every board is argued over. Define states first.
- Counting events instead of counters. A message per part loses parts during outages; a cumulative counter never does.
- Resetting counters from outside. Let the PLC count forever and let
increasefind the shift figure. - Signal taps on safety circuits. Use interposing relays and leave e-stop and guard circuits alone.
- Fault alarms to everyone. Route stop alarms to the line's supervisor and use time windows, or people mute the app.
- Treating the screen as the order system. Counts per machine are not counts per order; booking belongs to the ERP or MES.
What Hermetry does not replace
Hermetry records what machines do and alerts people; it does not control them. Machine control, safety circuits and interlocks stay in the machine PLCs and safety relays and must work when the link or the platform is unavailable. Order management, booking, labour reporting and the official production record stay in your ERP or MES; Hermetry Forge, which will add MES functions, is planned and not available today.

