PLC Code Documentation Standard for Roll Forming Lines
Introduction — Why PLC Documentation Is Critical in Roll Forming Machines
A roll forming line can run for many years, often far longer than the people who originally programmed it stay involved. Over time, the machine may go through:
- service calls
- electrical modifications
- tooling changes
- retrofits
- drive upgrades
- HMI revisions
- recipe updates
- new product patterns
If the PLC code is poorly documented, every one of those changes becomes slower, riskier, and more expensive.
This is one of the biggest hidden problems in industrial automation. The machine may work, but nobody can quickly understand:
- why the machine will not start
- how a cut is triggered
- how punch patterns are generated
- which tag controls a certain output
- what changed between software versions
- which alarms are latching and why
For roll forming lines, this matters even more because the machine logic is usually a mix of:
- interlocks
- encoder tracking
- hydraulic sequences
- servo motion
- recipe logic
- production reporting
- alarm handling
- machine mode control
A proper PLC documentation standard makes the machine easier to:
- troubleshoot
- commission
- support remotely
- hand over to customers
- modify safely
- scale across future machines
This page sets out a practical documentation standard specifically for roll forming lines.
What “Documentation” Really Means in PLC Programs
Many people think documentation just means adding a few comments in the code. That is not enough.
For a roll forming PLC program, documentation should exist at several levels:
- project-level documentation
- machine-level documentation
- program structure documentation
- tag naming documentation
- sequence documentation
- alarm documentation
- revision documentation
- HMI-linked diagnostics documentation
Good documentation means that another engineer or technician should be able to understand:
- what the machine is supposed to do
- how the PLC is organized
- how each subsystem works
- what each tag means
- what changed and when
That is the real standard to aim for.
Main Goals of a PLC Documentation Standard
A proper standard should achieve five things.
Clarity
Anyone opening the project should understand the machine structure quickly.
Consistency
Every subsystem should follow the same naming and comment style.
Serviceability
Technicians should be able to diagnose problems without decoding cryptic logic.
Traceability
Changes should be logged so later engineers know what happened.
Scalability
The documentation format should work across many machines, not just one project.
The Minimum Documentation Layers Every Roll Forming Project Should Have
Every PLC project for a roll forming line should include at least these documentation layers:
- Project cover information
- Machine functional overview
- Program architecture map
- Standard naming convention
- Sequence descriptions
- Function block descriptions
- Alarm and fault descriptions
- HMI page references
- Revision log
- Commissioning notes
If any of these are missing, the project becomes harder to support.
1. Project Cover Information Standard
The PLC project should begin with a project information section.
This should include:
- machine name
- customer name
- project number
- machine type
- PLC platform
- HMI platform
- drive platform
- software version
- date of current build
- lead controls engineer
- contact details for support
Example:
Machine: High Speed Roofing Panel Roll Former
Customer: Example Metal Roofing Ltd
Project No: RF-2026-041
PLC: Siemens S7-1500
HMI: Siemens Comfort Panel
Drives: SINAMICS + servo flying shear
Software Revision: V1.4.2
Build Date: 2026-03-06
This seems basic, but it avoids a huge amount of confusion later.
2. Machine Functional Overview Standard
Every PLC project should include a plain-language summary of how the machine works.
This should not be written only for the original programmer. It should be readable by:
- service engineers
- electricians
- technicians
- project managers
- future programmers
The functional overview should describe the full material flow:
- uncoiler
- leveler
- pinch rolls
- entry guide
- main forming drive
- punch or notch system
- cut system
- stacker
- scrap handling
It should also describe the machine modes:
- off
- manual
- setup or changeover
- auto
- fault
- maintenance or service mode
This overview gives the reader context before they dive into tags and routines.
3. Program Architecture Map Standard
Large roll forming PLC projects should always include a program map.
This is one of the most important parts of documentation.
The map should show how the logic is divided into sections such as:
- global data
- machine state manager
- safety and start permissives
- mode control
- I/O mapping
- uncoiler control
- leveler control
- main drive control
- length control
- punch logic
- shear logic
- flying shear motion
- stacker logic
- recipe manager
- alarm manager
- diagnostics
- reporting and counters
For each section, briefly describe:
- what it does
- what it depends on
- what outputs it affects
This can be written as a document or embedded in a master routine comment block.
4. Tag Naming Standard
Poor tag naming is one of the biggest causes of bad PLC support.
A roll forming documentation standard should define a clear naming convention and apply it everywhere.
A good standard usually includes a prefix showing the signal type or purpose.
Example style:
- Raw_ for raw mapped input
- Filt_ for filtered signal
- Cmd_ for command
- Fb_ or FB_ for function block instance
- Sts_ for status
- Alm_ for alarm
- Cfg_ for configuration value
- Sim_ for simulation value
- Diag_ for diagnostic bit
- Seq_ for sequence state
- Perm_ for permissive
- Man_ for manual command
- Auto_ for automatic command
Examples:
- Raw_ShearHome
- Filt_ShearHome
- Perm_MachineStart
- Cmd_MainDriveRun
- Sts_HydraulicPressureOK
- Alm_ShearDownTimeout
- Cfg_JogSpeedMainDrive
- Diag_StartBlockedByHydraulic
This makes the logic easier to read and troubleshoot.
5. I/O Mapping Documentation Standard
Every real machine needs a proper I/O map.
The PLC code should make a clear distinction between:
- physical hardware I/O
- internal machine logic tags
Best practice is:
Physical I/O Layer
Map real PLC addresses to clearly named raw tags.
Examples:
- I0.0 → Raw_EStopHealthy
- I0.1 → Raw_ShearHome
- Q0.0 → RawOut_ShearDownValve
Logic Layer
Use internal logic tags for everything else.
Examples:
- Filt_ShearHome
- Cmd_ShearDown
- Perm_ShearCycleAllowed
Documentation for each I/O point should include:
- terminal number
- field device description
- device location
- normal state
- PLC address
- signal type
- related subsystem
This is essential for field troubleshooting.
6. Comment Standard for Routines and Blocks
Every major routine should start with a structured comment header.
That header should include:
- routine name
- subsystem
- purpose
- inputs
- outputs
- dependencies
- key sequence notes
Example:
Routine: Hydraulic Shear Auto Sequence
Subsystem: Cut System
Purpose: Controls automatic stop-to-cut shear cycle using down and home confirmations with timeout supervision.
Inputs: CutRequest, MachineStopped, HydraulicPressureOK, Filt_ShearHome, Filt_ShearDown
Outputs: Cmd_ShearDown, Cmd_ShearUp, Sts_ShearReady, Alm_ShearTimeout
Dependencies: Machine state manager, alarm manager, hydraulic ready logic
This should be the standard for every important routine.
7. Comment Standard for Logic Networks
Comments should not explain the obvious. They should explain the intent.
Bad comment:
// Set bit
Good comment:
// Latch cut request once target length is reached and machine is not already in cut cycle
Bad comment:
// Timer
Good comment:
// Timeout if shear down confirmation is not received within 1.5 seconds of valve command
The point is to explain:
- why this rung exists
- what condition it is protecting
- what physical machine action it represents
That is the level of documentation that helps service engineers later.
8. Sequence Documentation Standard
Roll forming machines contain many sequences that should be documented clearly.
Each sequence should have a short written description showing:
- state names
- transition conditions
- outputs active in each state
- fault exits
- reset behavior
This is especially important for:
- hydraulic shear sequence
- punch cycle sequence
- stacker drop cycle
- servo feed sequence
- flying shear cycle
- machine startup sequence
- changeover mode
Example sequence documentation format:
Sequence Name
Hydraulic Shear Auto Cycle
States
- Idle
- WaitForCutRequest
- CommandDown
- WaitForDown
- CommandUp
- WaitForHome
- Complete
- Fault
Transition Notes
- Enter CommandDown when CutRequest and MachineStopped are both true
- Enter Fault if down confirmation timeout expires
- Reset to Idle only after operator reset and healthy home signal
This makes the machine logic much easier to follow.
9. State Machine Documentation Standard
If the roll forming machine uses a state machine, the states must be documented in one place.
Document:
- numeric or enum values
- meaning of each state
- expected machine behavior
- allowed transitions
- fault transitions
- HMI display text
Example:
- 0 = Off
- 10 = Idle
- 20 = Ready
- 30 = Threading
- 40 = AutoRun
- 50 = CutCycle
- 60 = Fault
- 70 = Maintenance
Without this, future engineers may struggle to understand the machine flow.
10. Alarm Documentation Standard
Alarm documentation is one of the most important parts of the code standard.
Every alarm should have:
- alarm tag name
- alarm ID number
- plain-language description
- trigger condition
- latch behavior
- reset condition
- priority
- subsystem
- recommended operator action
Example:
Alarm Tag: Alm_HydraulicPressureLow
ID: 1023
Description: Hydraulic pressure below minimum operating threshold
Trigger: Scaled pressure < 120 bar for more than 2 seconds while hydraulic system enabled
Latched: Yes
Reset: Pressure restored and operator reset
Priority: High
Subsystem: Hydraulic Power Pack
Operator Action: Check pump operation, oil level, pressure switch, and hydraulic leaks
This alarm documentation should exist both in the PLC comments and in the HMI alarm list documentation.
11. Start Permissive Documentation Standard
Because “machine will not start” is such a common support issue, the machine start logic should be documented especially well.
Document every major start permissive including:
- safety circuit healthy
- hydraulic ready
- drive ready
- shear home
- punch home
- stacker ready
- recipe loaded
- no active critical faults
- correct machine mode selected
For each one, document:
- where the signal comes from
- what physical condition it represents
- what causes it to be false
- where it is shown on the HMI
This makes diagnostics much faster.
12. Function Block Documentation Standard
Every reusable function block should have its own description.
This should include:
- block name
- purpose
- version
- author
- input descriptions
- output descriptions
- internal behavior summary
- fault handling summary
- reset behavior
- example usage notes
This is especially important for standardized blocks such as:
- length control
- punch cycle
- shear sequence
- alarm block
- timeout block
- permissive block
- recipe validation block
If these are reused across projects, good documentation saves huge amounts of time.
13. Recipe Documentation Standard
Recipe systems should be documented clearly because operators and engineers rely on them heavily.
Document:
- recipe structure
- parameter names
- engineering units
- valid ranges
- protected parameters
- versioning rules
- audit behavior
- rollback process
For example, define clearly whether:
- line speed is stored in m/min or Hz
- panel length is in mm or inches
- punch offsets are absolute or relative
- compensation values are signed or unsigned
Ambiguity here causes real production errors.
14. Motion and Servo Documentation Standard
If the machine contains servo axes, motion logic must be documented carefully.
For each axis, document:
- axis name
- mechanical purpose
- home method
- travel limits
- normal operating modes
- setup jog speeds
- automatic move patterns
- readiness conditions
- fault behavior
Examples:
- servo feed axis
- flying shear carriage axis
- stacker positioning axis
- guide adjustment axis
Motion code without documentation is very difficult to support safely.
15. HMI Documentation Standard
PLC documentation should reference the HMI clearly.
For each major subsystem, document:
- HMI page name
- page purpose
- operator controls on the page
- status indicators shown
- alarms linked to page
- hidden or engineer-level access items
This matters because many support calls depend on both PLC and HMI behavior.
A technician should be able to answer:
- where does the operator see this status?
- where is this permissive shown?
- where can this alarm be acknowledged?
- where is this recipe loaded?
16. Revision Log Standard
Every PLC project should have a proper revision history.
This should not just be a filename change. It should be a real engineering log.
Each revision entry should include:
- revision number
- date
- engineer name
- summary of change
- reason for change
- whether HMI also changed
- whether drive parameters changed
- whether machine behavior changed
Example:
Rev 1.3.0 — 2026-02-14 — J. Smith
Added debounce filtering to stacker panel detect sensor to prevent double count on oily panels. Updated HMI diagnostics page to show raw vs filtered sensor state.
That level of detail is extremely valuable later.
17. Change Control Standard
For larger roll forming projects, code changes should follow a change control pattern.
Document:
- requested change
- approved by
- implemented by
- tested by
- affected routines
- affected recipes
- affected HMI pages
- field validation result
Even if the process is lightweight, some structure is far better than none.
18. Commissioning Notes Standard
Commissioning often produces knowledge that never makes it back into the PLC project unless there is a proper standard.
This should include notes such as:
- final shear timeout value
- final cut compensation offset
- encoder scaling adjustments
- punch delay changes
- sensor filter times
- motion tuning notes
- known special setup steps
These should be captured in a commissioning notes section or linked engineering note file.
Otherwise, those details are often lost after startup.
19. Safe Forcing and Simulation Documentation Standard
If the project includes:
- commissioning flags
- simulation mode
- temporary bypass logic
- service mode behavior
then that must be documented clearly.
Document:
- which flags exist
- what each one bypasses
- what must never be bypassed
- how simulation mode behaves
- what prevents use in production
- what HMI indication is shown
This is important for safe service support.
20. Documentation for Diagnostics Logic
Good roll forming PLC projects often include start diagnostics and interlock tracing.
Document:
- how the “why didn’t it start” bits work
- how failure cause is selected
- how diagnostics are shown on HMI
- which bits are raw vs filtered vs permissive
This makes support much faster when troubleshooting remotely.
21. Documentation Format Recommendations
A practical roll forming documentation standard usually works best in three places:
Inside the PLC Project
For routine headers, logic comments, tag descriptions, and function block descriptions.
In an External Engineering Document
For architecture maps, sequence descriptions, revision notes, and I/O schedules.
In the HMI
For operator-facing alarm text, diagnostics labels, and subsystem names.
The strongest projects keep these consistent with each other.
22. What Good Documentation Looks Like in Practice
A future engineer should be able to open the project and answer these questions quickly:
- What PLC state is the machine in?
- Which routine handles the hydraulic shear?
- Which tag means filtered punch home?
- Why is the machine not ready?
- Which recipe parameters affect cut compensation?
- What changed in the last software revision?
- Where is the stacker panel count logic?
- Which alarm appears if the shear down sensor times out?
If the project does not allow that, the documentation standard is not strong enough.
23. Common Documentation Mistakes
Cryptic Tag Names
Tags like M123, B7, or Aux_2 are not useful.
No Routine Headers
Without routine headers, the program structure becomes hard to follow.
Comments Only on Difficult Code
Every major subsystem should be documented, not just the unusual parts.
No Revision Detail
If the revision history only says “updated code,” it is almost useless.
Documentation Not Updated After Changes
Outdated documentation is almost worse than no documentation because it misleads engineers.
No Clear Separation Between Raw and Processed Signals
This causes confusion during troubleshooting.
24. Best Practice Summary
A strong PLC code documentation standard for roll forming lines should include:
- clear project identity
- functional machine overview
- program architecture map
- disciplined tag naming
- routine headers
- meaningful logic comments
- documented sequences
- documented alarms
- clear revision history
- recipe documentation
- diagnostics documentation
- commissioning notes
The real test of the standard is simple:
Could another engineer support the line quickly without calling the original programmer?
If the answer is yes, the documentation standard is working.
FAQ — PLC Code Documentation for Roll Forming Lines
Why is PLC documentation especially important for roll forming machines?
Because roll forming lines combine interlocks, motion, hydraulic sequences, encoder tracking, recipes, and alarms, making the control logic complex and long-lived.
What is the most important part of PLC documentation?
There is not just one, but tag naming, routine headers, sequence descriptions, and revision history are among the most critical.
Should documentation be only inside the PLC project?
No. The best approach uses both in-project comments and external engineering documentation for architecture, revisions, and commissioning notes.
What should every alarm be documented with?
Each alarm should include a clear description, trigger condition, reset logic, priority, subsystem, and recommended operator action.
Why is revision history so important?
Because future engineers need to know what changed, when it changed, and why it changed, especially after field modifications.
What is the biggest documentation mistake in PLC projects?
One of the biggest mistakes is writing code that works but depends on the original programmer’s memory to understand it.