Article sections
1. Why shouldn't monitoring begin only after development is complete?2. A four-layer observability model3. A KPI and an alarm are not the same thing4. How should event records be designed?5. Which questions should a dashboard answer?6. Alarm thresholds, hysteresis, and noise7. Why do quality signals arrive late?8. From alarm to incident, from incident to corrective action9. Data retention, privacy, and the boundaries of the production network10. An example KPI set for a metal surface inspection line11. Why is it important to create a KPI dictionary?12. The difference between application logs and an operational event log13. Telemetry collection must not slow down the production line14. How should average latency and latency percentiles be collected?15. Setting alarm thresholds with a test set16. Measuring alarm fatigue in concrete terms17. Denominators and product mix in comparisons across stations18. The data joining process for delayed accuracy assessment19. How do we test a dashboard's effectiveness?20. Turning monitoring data into continuous improvement21. Example indicator definitions and formulas22. How do we test an alarm scenario in a test environment?23. Monitoring handover at shift changesFrequently asked questionsAn AI application running quietly on a production line is not always good news. The camera connection may have dropped, the program may still be displaying the last valid frame, or a queue may be growing in the background. Even if the model produces correct predictions, its success in production is questionable if results reach the PLC late or are never written to the MES. Monitoring is therefore not just a dashboard project; it is part of operational reliability.
1. Why shouldn't monitoring begin only after development is complete?
Monitoring should be designed during development. If product identity, model version, and trigger time are not carried through from the outset, investigating why an event was linked to the wrong product in production becomes much harder. Adding telemetry only at the end of deployment is not enough to produce retrospective evidence.
A production system has three different monitoring audiences: the software engineer monitors connection errors and latency; the quality engineer monitors false rejects and defect distributions; and the production supervisor monitors line capacity and operator workload. The same screen does not have to show every signal to everyone. Instead, different views and alarm levels can be built on a shared event record.
A monitoring strategy starts with measurable objectives. Rather than saying "the system should be fast," the objective could be that p99 end-to-end decision latency must not exceed the physical decision window; rather than "the camera should be healthy," it could require uninterrupted frame acquisition and the expected trigger count over the last 60 seconds. These thresholds are examples; actual values must be determined through measurements on the line.
2. A four-layer observability model
The first layer is hardware and acquisition: camera connection, lighting driver, temperature, trigger count, frame counter, image sharpness, exposure, and dropped frames. The second layer is the processing pipeline: queue occupancy, CPU/GPU load, memory, end-to-end latency, p95/p99, and timeouts. The third layer is decision behavior: defect rate, score distribution, class-specific alarms, and decisions corrected by operators. The fourth layer is operations and traceability: PLC handshake, MES records, manual review, and rollback version.
The layers must be interpreted together. For example, an increase in defect alarms may coincide with a change in image brightness, a camera restart, and the activation of a new product recipe. Jumping straight to a conclusion of "model drift" would be misleading in this situation. Similarly, when processing load increases, the actual cause may not be the model but storage that keeps failing or blocked log writes.
An image quality indicator is also context-sensitive. An increase in average brightness may be normal variation for some products; for another product type, it may mean overexposure and a loss of defect visibility. Raw telemetry must be evaluated alongside product type, station, and recipe.
3. A KPI and an alarm are not the same thing
A KPI is a performance indicator tracked over time. An alarm reports a condition that requires a specific action. Not every KPI change should trigger an alarm. For example, a rise in GPU temperature from 60 to 66 degrees may be a trend worth monitoring; it does not necessarily require an immediate production-stop alarm. By contrast, camera triggers stopping entirely or a mismatch between a PLC decision and product identity may require urgent intervention.
An SLI is an observed service level indicator; an SLO specifies the target level. Useful SLIs for a vision system include the proportion of triggers that produce results on time, the proportion of decisions linked to the correct identity, and the completeness of frames received from the camera. Quality metrics such as the actual defect detection rate require a different evaluation window because ground truth arrives with a delay.
When a KPI deteriorates, what matters is not just the number itself but the scope of the impact. Does it occur across the line, on a single camera, for a particular material, or during one shift? If the dashboard cannot be filtered by product family and station, an aggregate average may hide critical local problems.
4. How should event records be designed?
A record design that links all significant events may use event_id, product_id, station_id, trigger_ts, frame_id, model_version, recipe_id, prediction, threshold, decision, plc_ack_ts and result_status as fields. Not all of these fields are mandatory in every system, but they must be consistent enough to track product identity end to end.
Records should not consist only of successful product decisions. A trigger for which the camera provides no frame, an inference timeout, an operator override, a threshold change, and a manual restart must also be recorded. If the log is merely a list of messages beginning with the word "error," silent data loss may go undetected.
The reliability of the camera, edge computer, and PLC clocks must be assessed separately for event timing. Because of network latency and different time zones, events must not be matched solely by their order of arrival at the server. Ideally, both the time an event occurred and the time it reached the system are recorded; retransmitted messages retain the same event_id.
5. Which questions should a dashboard answer?
A good dashboard should quickly answer five questions: Is the system acquiring images right now? Is it producing a result on time for every product? Have its decisions changed in recent days? Which station or product type has a problem? Is there anything the operator needs to do now? Adding fifty different charts before answering these questions is not useful.
Critical conditions can appear at the top, with diagnostic charts below. A summary such as "In the last 15 minutes: 3,400 products, 5 lost frames, p99 76 ms, 12 manual reviews" is more meaningful than a GPU percentage alone. However, the meaning of each metric and its calculation window must be visible. If the denominator behind a "0.2% loss" indicator is unclear, its value for decision-making decreases.
Different users need different levels of detail. A red alarm and the procedure to follow may be enough for an operator, while an engineer should be able to access the frame counter difference, NIC error counters, and complete timestamp chain for the same event. A dashboard that supports navigation between these levels can reduce unnecessary information overload.
Production monitoring and alarm simulator
Not actual measurements: adjust illustrative camera and application values to explore which layer an alarm might originate from. Hysteresis must be determined separately for the actual site.
6. Alarm thresholds, hysteresis, and noise
If a metric oscillates around a threshold, the system may repeatedly activate and clear an alarm. This is called flapping. Hysteresis can make alarm activation and clearing depend on different conditions: for example, the alarm activates when the threshold is exceeded in three consecutive windows and clears after two normal windows. These values must be established from the actual system; copying the same numbers to every line is not appropriate.
Alarm levels must also be linked to actions. An information level indicates a trend; a warning recommends intervention soon; a critical level flags conditions that threaten production quality or reliability. If an alarm has no assigned owner, coverage hours, or escalation time, it is merely a color change on a screen.
To reduce alarm fatigue, related events can be grouped under a single root problem. When the camera network is down, repeating frame drop, timeout, missing decision, and missing MES record warnings hundreds of times is not useful. It is more effective to first raise an alert identifying the primary cause and then link the affected downstream events.
7. Why do quality signals arrive late?
Whether a rejection decision made by the system today is correct is not always known at the same time. A second quality inspection, laboratory test, or customer feedback may arrive days later. The defect rate monitored online and actual precision/recall are therefore different indicators. A shift in the distribution of decision scores is not conclusive evidence of performance degradation.
As delayed labels arrive, they are matched to decisions using product IDs, and the results are reevaluated for specific periods. If only rejected parts are reinspected, missed defects among parts accepted as good may remain invisible. Risk-based or random sampling of accepted products may also be needed to reduce this selection bias.
When the production rate changes, the observed defect rate may change too. Slice-based analyses using the relevant metadata are needed to determine whether this is actually due to a process change, lighting, a model version, or the product mix. A monitoring screen does not replace causal analysis; it shows where to investigate.
8. From alarm to incident, from incident to corrective action
When an alarm occurs, the first step is to verify a safe operating state. Can the line continue making automatic decisions, should it switch to manual inspection, or is a stop necessary? This decision must be consistent with the prior risk assessment. The observed behavior and the time it first appeared are then recorded. When necessary, a copy of the image and configuration at the time of the event is retained in accordance with data protection principles.
The system change log plays a critical role in root cause assessment. If lens cleaning, a GPU driver update, and deployment of a new model all took place at the same time, it is not immediately clear which change had an effect. Keeping changes limited and traceable is as important as rapid troubleshooting.
An alarm clearing after corrective action is not enough on its own. Has the cause been eliminated, can the event be reproduced, are other stations affected, and which procedure was changed to prevent the same error? The answers belong in the incident review record.
9. Data retention, privacy, and the boundaries of the production network
Keeping every image forever may be neither technically nor legally appropriate. A retention policy balances the value of images for auditing decisions, storage costs, the confidentiality of customer product information, and industry requirements. Some systems retain only anomaly and alarm images; it must also be recognized that this can make missed defects harder to analyze later.
Adding a remote monitoring service to the production network creates new access surfaces. Allowing PLC write permissions on the same channel used to read log data is not sound design. Network segmentation, service identities, certificate management, least privilege, and logging of maintenance connections are required. The performance, reliability, and safety constraints of OT systems differ from those of conventional cloud applications.
The monitoring system can also fail. It must be defined what happens to production decisions when the dashboard is unavailable, which alternative channel will display alarms, and how long logs will be retained locally. Where possible, loss of visibility should be treated as a separate critical condition.
10. An example KPI set for a metal surface inspection line
| Category | Indicator | Example observation window | Interpretation |
|---|---|---|---|
| Acquisition | Expected / received frame ratio | 1 minute | Check against the trigger counter |
| Timing | p99 end-to-end decision latency | 5 minutes | Compare with the rejection window |
| Quality | Defect alarm rate | Shift and product type | Not a substitute for actual precision |
| Operations | Human review queue | Real-time + shift | Capacity planning required |
| Integration | PLC ACK timeout | Last 1000 events | Link to product ID |
| Continuity | Version / recipe change | Event-based | Helps investigate causality |
11. Why is it important to create a KPI dictionary?
Different teams may measure the same term, "lost frame," differently. Packet loss counted by the camera SDK, a frame the application failed to retrieve, and an image missing relative to the product trigger count are not the same thing. Each indicator therefore needs a documented definition, calculation formula, denominator, collection frequency, intended scope, and data source. Otherwise, two dashboards may show conflicting numbers for the same shift.
For example, should the denominator for the "on-time decision rate" include only products successfully imaged, or all production triggers? Counting only available images makes lost triggers invisible. If the interval from the first trigger to the corresponding PLC ACK is to be measured for a particular business event, it must also be stated which clocks are synchronized and how failed events are counted. A KPI dictionary may look like a simple document, but it ensures that different teams are discussing the same reality.
12. The difference between application logs and an operational event log
A software debug log gives developers detailed information about exceptions and processing. An operational event log, by contrast, should provide an auditable account of how a product decision was made, which version was running, and whether any human intervention occurred. Keeping every debug line forever increases storage requirements and makes actual production events harder to find. Logging layers and retention policies can therefore be separated.
Operational event records should be as structured as possible. event_id, station, product, trigger_ts and decision fields are easier to correlate when they use the same names and types across services. Free-text messages are readable by humans but prone to reporting errors. The record schema needs versioning; when new fields are added later, old records must not be silently misinterpreted.
13. Telemetry collection must not slow down the production line
If you synchronously send a large image to a remote server for every frame, network or server latency can create a critical bottleneck after the model. The production decision path and the telemetry writing path should therefore be separated where appropriate. Image logging can be delegated to an asynchronous queue, but queue capacity and the data loss policy must be explicitly defined. If losing critical events is unacceptable, buffering and retransmission mechanisms are required.
Asynchronous logging does not provide unlimited free capacity. What will the program do when the disk is full, how large can the logging queue grow, and which events will be protected first? These are design questions. For example, stopping the storage of all frames and keeping only error and manual review images may be reasonable for some projects, but such a policy can make falsely accepted production examples harder to find later. This choice must be made in light of operational risk.
14. How should average latency and latency percentiles be collected?
If latency at a station has a heavy-tailed distribution, the average may appear to be 40 ms while some products take 150 ms. Rare slow events can be critical if the decision does not arrive in time for the rejection point. Therefore, p95/p99, the highest observed value, the timeout rate, and the sample count must be monitored together. A p99 calculated over a window of 1,000 events does not have the same reliability as one calculated over 20 events.
The start and end points for latency measurement must remain fixed. Is the measurement limited to the model's infer() call, or does it cover the interval from the photoelectric sensor to the PLC ACK? Both are valuable, but they reveal different problems. Stage-by-stage measurement can show that image transfer or MES recording is causing delays even though the model is fast. If timestamps come from different devices, uncertainty in clock synchronization must also be assessed.
15. Setting alarm thresholds with a test set
Choosing an alarm threshold because it "looks good on the chart" is not reliable. First, select a production period considered healthy, examine normal variation, and construct scenarios involving risky deviations. If an indicator produces false alarms too often, the team may gradually start ignoring alerts. Conversely, if the threshold is too high, an actual problem may be noticed far too late. This cost trade-off depends on product and process risk.
A persistence condition can be defined alongside the alarm threshold. For example, instead of a single 90 ms decision triggering a warning, a warning could require p99 latency over the last five minutes to exceed an 80 ms limit in two consecutive windows. Some events, such as a critical product matching error, may require an immediate alarm on a single occurrence. Hysteresis, silencing, repeat intervals, and escalation times must be explicitly documented for each alarm family.
16. Measuring alarm fatigue in concrete terms
If a station generates a hundred alarms per shift and ninety-five come from the same intermittent cable connection, "100 events" may look useful to an engineer, but the system may become unusable for the operator. The alarm count, the deduplicated number of root incidents, the proportion of alarms requiring actual intervention, and the time taken to clear alarms should be shown separately. Counting a silenced alarm as "resolved" produces misleading results.
Operators can provide feedback on alarm meanings and the procedures applied. If an unclear message repeatedly leads to support calls, clearer alarm text and guidance are needed. Instead of "GPU at 98 percent," a good alarm might provide action context: "The processing queue is growing; the decision latency limit may be exceeded within 10 minutes; the station supervisor should check." Predictive statements, however, must be supported by actual monitoring data.
17. Denominators and product mix in comparisons across stations
A false reject rate of 1% at one camera station and 3% at another does not prove that the second station is faulty. The second station may process shinier material, more difficult product geometry, or a different defect prevalence. Comparisons must therefore account for product family, shift, recipe, and sample count. If only the plant average is used, a high-volume, easy station may mask a smaller station with a critical problem.
Comparing results requires additional care if camera and model versions differ. New lighting at one station and old settings at another may look like model drift. Presenting the change log and physical maintenance record in the same report supports more reliable interpretation. Showing stations on a single shared chart is useful, but must not sacrifice local diagnostic data.
18. The data joining process for delayed accuracy assessment
An actual defect label may come from a second inspection station, a laboratory, or a customer return. Correctly linking these labels to production decisions requires the product serial number and event time. Without product identity, reliably measuring the percentage of incorrect model decisions becomes difficult. The source and validation level of labels arriving later must also be retained; not every customer complaint should automatically count as a definitive defect label.
In a process that reinspects only rejected parts, missed defects among parts accepted as good may remain invisible. This creates verification bias. The necessary sampling procedures can be established with the quality team; for example, random samples can be taken from the automatically accepted stream, or critical products can receive additional validation. These selected samples must not be presented as an overall error rate without weighting them to reflect the natural production proportions.
19. How do we test a dashboard's effectiveness?
A dashboard opening successfully does not prove that it works correctly. Test scenarios can create a known camera outage, queue buildup, and PLC timeout; the test then measures whether the expected alert reaches the appropriate users at the appropriate time. When the event is subsequently corrected, evaluate when the alarm clears, whether the event record is retained, and whether an unauthorized person can delete the alarm.
If the system clock at an image processing station is set backward, how will the dashboard display the event sequence? If internet or central server connectivity is lost, which information will the local HMI continue to show? These situations are especially important in distributed systems. The monitoring service must not be the sole guardian of production quality; the control system should be able to continue enforcing defined limits on its own.
20. Turning monitoring data into continuous improvement
Collecting trends has value only when it leads to decisions. A month-end review can examine which errors recurred, which alarm caused the most production downtime, and which KPIs changed after a new model or maintenance. Change decisions should be based on data, with an assigned owner and a date for follow-up. For example, persistently high temperatures may require better GPU cooling, while an increase in false rejects limited to a particular product may require investigation of data or lighting.
A vision system may have a long lifecycle, and its monitoring indicators evolve over time. However, critical KPI definitions that enable historical comparisons must be preserved, and changes must be versioned. Continuous improvement is not about adding a new chart every time; it is about faster diagnosis and more reliable quality decisions.
21. Example indicator definitions and formulas
The "on-time decision rate" could be the ratio of triggers for which a valid decision was delivered to the PLC within the specified deadline during a shift to the total expected trigger count. The "lost frame rate" could be based on the difference between expected and received frame counts; however, the denominator must be adjusted in systems where the camera captures multiple images per trigger. These definitions must be explicitly documented for the production plan.
The "manual review rate" can be defined as the proportion of all products routed to an operator instead of being automatically accepted or rejected. If the same product is reviewed twice, however, it must be specified whether unique products or review events are counted. The "false reject rate" can only be calculated from samples verified against reference labels. A number should not be presented on its own before the data source and valid sample scope have been defined for each indicator.
22. How do we test an alarm scenario in a test environment?
For example, suppose that only 95% of the expected camera frames arrive under test conditions. It is defined in advance whether the alarm should activate immediately or after a specified observation window. The network or buffer condition causing the fault is then corrected, and the system returns to normal. The test also checks that the alarm clears correctly, that the event record is retained, and that the explanation shown to the operator is understandable.
The same approach can be applied to p99 latency and brightness shifts. However, an alarm concerning the quality of an actual model may take longer to validate than a sensor alarm; the number of labeled products must be checked for adequacy. Automatically retraining the model just because a threshold has been exceeded is not appropriate. Optics, hardware, product mix, and the data pipeline must be investigated first.
23. Monitoring handover at shift changes
Operational monitoring should not depend on a few engineers on the day shift watching screens continuously. During shift handover, open critical alarms, the manual review queue, abnormal image quality indicators, and planned maintenance can be communicated in a brief but standardized record. If it is unclear who should receive each alarm, delayed intervention may affect production quality.
The handover report can be generated automatically, but safeguards are needed to prevent the system from producing an incorrect status summary on its own. Cleared alarms confirmed by the operator and events that remain open should be presented separately. Checking consistency between the product counter and decision counter can be part of routine checks, particularly to catch periods when the system is "silently processing incorrectly" at high production volumes.
Frequently asked questions
Is it mandatory to save every image?
No. The retention policy is determined by project requirements. However, deleting all images may also prevent later investigation of performance changes; representative sampling and risk-based retention can offer a balanced solution.
Has the model degraded if its average confidence drops?
Not necessarily. Product mix, lighting, camera settings, or an actual process change may affect scores. The effect on quality metrics and the site conditions must be verified separately.
Why should a dashboard show p99 latency?
Even if the average is short, rare slow events may miss the rejection point. p99 helps reveal this tail; it is still a percentile observed in a particular sample, not a guarantee of a physical upper bound.
Is increasing the number of alarms safer?
Not necessarily. Excessive alarms make it harder for operators to distinguish important events. Alarms should be designed around actions, responsible owners, and threshold logic.
Sources and technical reference documents
The sources link to official institutional and project documentation. The diagrams and calculation examples were created for this article; they are not presented as measured results from a particular facility.
Publication note: A test or example value does not replace a contract-specific acceptance specification or a facility's risk analysis. No code example is included.