Structure the AC500 program as a fixed call order in PLC_PRG: Input_Mapping, Mode_Logic, Sequence, Alarms, Motor_Logic, Output_Mapping, then HMI_Mapping. Inside each POU, one network does one job and has a comment. Use prefixes such as DI_, DO_, Cmd_, Sts_, Alm_ and HMI_ for every tag, and pack values for the HMI or Modbus into words in the memory (%MW) area or symbolic HMI tags.
- One POU per job, called in a fixed order from PLC_PRG
- One network = one function, with a comment that says why
- Prefixes tell you where a tag comes from and who may write it
- HMI and Modbus read packed words, not hundreds of loose bits
“Network mapping” in a PLC program means two things: how the networks (rungs) and POUs are organised, and how internal data is mapped out to the network, meaning the HMI and other devices. Both are what separate a training exercise from a maintainable machine program.
Step 1: Split the Program into Mapped POUs
Click any POU to see what belongs in it.
Step 2: Apply a Tag Naming Standard
| Prefix | Meaning | Written by | Example |
|---|---|---|---|
| DI_ / DO_ | Physical digital input / output | Hardware / Output_Mapping only | DI_Start_PB, DO_Motor_Run |
| AI_ / AO_ | Analog input / output (raw) | Hardware / Output_Mapping | AI_Speed_Raw |
| Cmd_ | Command from logic | Motor_Logic, Sequence | Cmd_Motor_Run |
| Sts_ | Status for display | Logic | Sts_Auto_Mode |
| Alm_ | Latched alarm bit | Alarms only | Alm_MPCB_Trip |
| HMI_ | Command or value exchanged with HMI | HMI or HMI_Mapping | HMI_Start_Cmd |
| Par_ | Setpoint / parameter | HMI, retained | Par_RunOn_Time |
| T_ / C_ | Timer / counter instance | Declared once | T_Warn, C_Parts |
Tag name builder
Pick a prefix and type the device and function. The builder checks the rules and writes the declaration line.
Step 3: Organise Networks Inside Each POU
- Start each POU with a network that only holds a comment: purpose, author, version.
- One network, one output: never drive two unrelated coils from one network.
- Write the comment as the reason: “Stop motor if contactor feedback missing for 2 s”, not “Motor rung”.
- Group networks with comment headers: Inputs used / Interlocks / Outputs.
- Keep networks in the order they act: conditions before the result that uses them.
| Network | Motor_Logic content | Comment example |
|---|---|---|
| 001 | Header | Motor_Logic v1.2: combines manual, auto and alarms into motor commands |
| 002 | Cmd_Motor_Run | Run forward if manual jog forward OR auto step 30, and no motor alarm |
| 003 | Cmd_Motor_Rev | Reverse only in manual jog; blocked while forward is commanded |
| 004 | Sts_Motor_Running | Running = command AND contactor feedback, for HMI and tower lamp |
Step 4: Map Data to the HMI and Network as Words
An HMI or a Modbus master reads blocks of words far more efficiently than hundreds of single bits. Pack bits into words in HMI_Mapping, and keep a word map document that the HMI engineer uses too.
| Word | Bit / value | Content | Direction |
|---|---|---|---|
| HMI_Status_Word | bit 0 | Sts_Auto_Mode | PLC → HMI |
| bit 1 | Sts_Manual_Mode | PLC → HMI | |
| bit 2 | Sts_Motor_Running | PLC → HMI | |
| bit 3 | Sts_Batch_Done | PLC → HMI | |
| HMI_Alarm_Word | bit 0–7 | Alm_ bits (Lab 13) | PLC → HMI |
| HMI_Command_Word | bit 0 | HMI_Start_Cmd (pulse) | HMI → PLC |
| bit 1 | HMI_Stop_Cmd (pulse) | HMI → PLC | |
| bit 2 | HMI_Reset_Cmd (pulse) | HMI → PLC | |
| HMI_Part_Count | INT | C_Parts.CV | PLC → HMI |
| Par_RunOn_Time | INT (s) | Run-on preset | HMI → PLC |
(* HMI_Mapping: pack status bits into one word *)
HMI_Status_Word.0 := Sts_Auto_Mode;
HMI_Status_Word.1 := Sts_Manual_Mode;
HMI_Status_Word.2 := Sts_Motor_Running;
HMI_Status_Word.3 := Sts_Batch_Done;
HMI_Part_Count := C_Parts.CV;
(* unpack HMI command bits, then clear them so they act as pulses *)
HMI_Start_Cmd := HMI_Command_Word.0;
HMI_Command_Word := 0;ABB CP600 panels can use symbolic tags imported from the PLC project, which is easiest. For Modbus TCP/RTU access from other devices, place the words in the CPU's Modbus-mapped %MW area and document the register numbers. On AC500 V2 the %MW area uses segment.offset notation (for example %MW1.0); check the CPU's Modbus address table before fixing register numbers.
Practice Exercise
Reorganise your Labs 7–11 logic into the POU structure of Fig. 1 without changing behaviour. Prove it by running the Lab 11 checklist again. Then add HMI_Status_Word and check its value online while you operate the kit.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Output ignores HMI command | HMI_Mapping runs after Motor_Logic | Call HMI_Mapping (unpack) before logic or split pack/unpack |
| HMI button acts twice | Command bit not cleared | Clear command words after reading them |
| Wrong bit on HMI | Bit numbering differs (0- vs 1-based) | Agree a word map; test each bit |
| Tag renamed, HMI broken | HMI used old symbol name | Re-import symbols in the HMI project |
Frequently asked questions
How should I organise an ABB AC500 ladder program?
Use PLC_PRG only to call POUs in a fixed order: input mapping, mode, sequence, alarms, motor logic, output mapping and HMI mapping. Keep one function per network with a clear comment.
What is a good PLC tag naming convention?
Use a prefix for the source and owner of the tag (DI_, DO_, Cmd_, Sts_, Alm_, HMI_, Par_), then the device and function, with underscores and no spaces.
Why pack bits into words for the HMI?
Words transfer faster and keep the HMI–PLC interface small and documented. One alarm word can carry 16 alarm bits.
What does %MW mean on an AC500 PLC?
%MW is the memory word area. It is used for internal data and, on AC500, is the area that Modbus masters can read and write. Check your CPU's Modbus address table for the exact mapping.