🔹This course is from 2023 and is now free. You can still access it ad free at https://liambee.me
if you become a member or purchase the course.
🔹Download all course materials for free here:
https://liambee.me/codesys-structured...
Hi everyone and welcome to the final lesson in the example project. In this session we look at the output mapping layer, which is the last step in the structured workflow. Compared to the input mapping, this part is extremely simple, but it completes the full cycle from inputs, through process logic and structures, to physical outputs.
The purpose of the output mapping layer is straightforward. Every device in the project has a structure and that structure contains the control elements for that device. For example, our quarter turn valve has data.control open output and data.control close output. These represent the requests coming from the structured logic to energise the actual hardware outputs.
The output mapping program simply connects those structure values to the physical output network. In this project the hardware layer is Modbus TCP, so the mapping links each structure’s control output to the appropriate Modbus coil. If this were real IO instead of Modbus, the mapping would link to the PLC’s output modules instead.
We also retain a small simulation layer exactly as we did for inputs. If simulation is active, we never send real outputs to the field. This guarantees safety during commissioning and prevents pumps, valves or other devices from being driven accidentally when you are only intending to simulate behaviour. When simulation is active, all physical outputs are forced to a safe state.
Once simulation is switched off, the real requested outputs from the structures flow straight through to the IO layer and out onto the network or the hardwired output modules.
At this point you have now seen the complete structured workflow. Inputs come in through a clean mapping layer, simulation is handled consistently, structures carry all process information, managers process that data, alarms are handled globally and efficiently, and the final control decisions leave the PLC through this output mapping layer.
That is the entire structured architecture. Everything is predictable, reusable, scalable and easy to follow. By separating inputs, process logic and outputs, and by housing all information inside typed structures, the whole project becomes easier to maintain and far harder to break.
If you have made it through this section of the course, take the time to download the project, run it in simulation and step through the flow from end to end. This final lesson completes the full loop.
#AlwaysLearning #Automation #Codesys #PLC #HMI