January 1, 2021

#22 - Running a project TIA's Portal emulator with safe CPU and HMI

In this post we will make a simple Safety application on the TIA Portal, simulate the CPU with the PLCSIM emulator and add an HMI for viewing and sending commands. An advantage of TIA Portal is the possibility to program the PLC and HMI in the same project with the same program. 

The PLC part is similar to the previous post (PLC_1 CPU 1511F-1 PN). To add the HMI to the project, just click on "Add new device" and choose the device, in this case a KTP900 Basic PN. 

PLC: Programming can be done in LAD (ladder) or FBD (function block diagram). Personally, I prefer to use FBD to make the logic of the Safety part, since this language is still widely used for programming Safety controllers from other brands, such as PILZ and Bihl-Wiedemann.


For status logic and HMI visualization I prefer to use LAD. In the TIA Portal to switch from LAD to FBD, or vice versa, just click on the block with the right button, for example FB1> Switching programming language> LAD or FBD.

HMI:
Create the tags on the HMI connecting with the PLC tags and draw the graphics on one of the screens. 

Screen with buttons, texts, indicators and drawings to represent a part of the production line:

The indicators are configured to change color according to the Status (Fault, Idle, Stop and Run).

The buttons are configured with Press Events (SetBit) and Release (Reset Bit).

To simulate the PLC with the PLCSIM and the HMI with the SIMATIC WinCC Runtime Simulator, it is necessary to click on the Start Simulation button.


No comments:

Post a Comment