AdvisorySchedule a Technical Discovery Call — Book your session today! »

· Eduardo Vieira · Industrial Programming · 5 min read

PLC Logic Validation Before Commissioning

Build evidence from requirements through simulation, HIL, FAT, SAT, and physical sign-off without confusing the levels.

Build evidence from requirements through simulation, HIL, FAT, SAT, and physical sign-off without confusing the levels.

PLC Logic Validation Before Commissioning

Validating PLC logic before commissioning finds unclear requirements and recovery gaps when they are cheaper and safer to correct. It turns expected behavior into evidence that can be reviewed before a change reaches installed equipment, while keeping simulator and physical results in their proper scope.

Trace requirements and freeze the baseline

Useful PLC validation connects every requirement to a scenario, observable criterion, evidence level, owner, and later change. A traceability row should contain requirement ID, scenario, evidence level, inputs, expected result, owner, baseline, actual result, status, and regression trigger. This makes omissions visible: a requirement without a scenario is not tested, and a scenario without an owner is not accepted. Before testing, freeze the project, firmware, libraries, hardware configuration, I/O map, drive parameters, plant model, and tool version. A result without that baseline cannot be compared after an update, online edit, or equipment substitution. An online edit invalidates the baseline until the changed project, configuration, and result are captured again.

Separate four evidence levels

Host or unit tests cover calculations, conversions, and deterministic decisions without a PLC runtime; they do not prove scan behavior or I/O. A PLC simulator or emulator executes selected project semantics, not hardware or field wiring. A plant model, SIL, or MIL explores represented interaction when valid for that question. HIL and physical I/O reveal configured integration, but do not by themselves prove production authorization, full environment, or process safety.

Test the state machine

Define states, entries, exits, timers, timeouts, invalid-state behavior, reset, retention, and safe defaults. Test normal operation, start, stop, pause, permissive loss, timeout, stuck sensor, out-of-range value, communications loss, PLC reboot, power recovery, and unexpected transition. Criteria must also say what does not happen: reconnect or reboot must not resume a command unless the approved narrative permits it.

Use observable Arrange–Act–Assert

Arrange establishes inputs, retained state, configuration, and time; Act applies one event or scan interval; Assert checks state, output, alarm, diagnostic, and recovery eligibility. For example, with Running and a true permissive, removing the permissive for one scan must make the command safe, enter Fault, and record the reason. With Stopped and start false, a reboot must leave output off and never enter Running.

ArrangeActAssert
Known safe stateOne defined eventNamed state, output, and diagnostic

Name simulation limitations

Simulation does not establish real scan time, jitter, loaded scheduling, network delay, electrical noise, grounding, field wiring, mechanical dynamics, thermal response, actuator force, or safety performance. Use it to reduce uncertainty before later levels, not to skip them. Record model simplifications and the condition that requires physical evidence.

Emulation is also version- and platform-specific. Confirm the exact controller, firmware, modules, and tool compatibility before treating an emulator result as relevant. A project that compiles or runs in an emulator does not prove target equivalence. Record unsupported instructions or modules and carry those cases to representative hardware.

Distinguish FAT, SAT, and SIT

FAT verifies the agreed build against requirements before release; SAT verifies installed scope, configuration, and local interfaces; SIT verifies system interaction in site context. One scenario may appear at several levels, but its evidence changes. Capture actual configuration, inputs, results, deviations, and authorized disposition without hiding a lower-level defect behind a site workaround.

Regress changes and respect the safety lifecycle

Version-control the project and configuration exports. A firmware, library, task, drive-parameter, I/O-address, model, or communications change can invalidate evidence; traceability identifies the required regression scenarios. ISA-84 and IEC 62061 impose safety-lifecycle obligations whose applicability depends on hazard analysis, function, and jurisdiction. A standard PLC test does not automatically validate a safety function.

Commission under authorization

Commissioning needs an approved plan, named authority, safe state, stop criteria, rollback, and physical sign-off. Inject faults first in host, simulator, isolated model, or authorized HIL; do not inject them into an energized plant to complete a checklist. Stop on unmet criteria, uncertain protective boundaries, or impractical rollback; restore the approved version and continue only with authorized disposition.

Before an authorized physical test, review the test sequence with operations, controls, maintenance, and the safety owner where applicable. Confirm the exact controller and I/O identity, the initial safe state, the expected observation point, the maximum test duration, and the person allowed to stop the activity. A signal seen in a dashboard is not necessarily the signal at the field terminal; the test plan must name the boundary being observed.

For recovery testing, define power-up behavior, retained values, communication establishment, acknowledgement requirements, and the first permitted operator action. Verify that alarms and diagnostics identify the condition without exposing secrets or encouraging a bypass. If a model represents a permissive, sensor, or actuator, compare its assumptions with the real interface before using the result to change commissioning scope.

Review timing as a budget rather than a slogan. Name task period, requested and revised communication interval, timeout, queueing point, input update, output update, and any external device cycle. Measure them on representative configured hardware when the requirement depends on time. A source-code review cannot prove that a controller under load meets a physical deadline.

Use the traceability matrix after commissioning as well. When an incident, parameter change, or device replacement occurs, it identifies which requirements must be reconsidered and which evidence is no longer current. This preserves a controlled path from observed field behavior back to a requirement and approved configuration.

References

Continue with PLC clean code, the Siemens OPC UA boundary, modern SCADA, and PLC programming services.

Back to Blog

Related Posts

View All Posts »