Flexible Alarms Creator Code
Create Wincc Flexible alarms from Data Blocks of Simatic Manager
Status: Beta
Brought to you by:
felipito
README ------ Start situation --------------- You have a Data Block (DB) with BOOL variables that are set when the PLC application requests to display an event (alarm/warning) in the HMI (panel). For this purpose, the events must be created in Wincc Flexible, but this is unfortunately a time-consuming task due the following limitations: - For discrete alarms it's not possible to use tags of type BOOL as trigger tag. Only tags of type WORD can be used - For selecting a BOOL in a WORD tag, a trigger bit must be defined. This bit must be swapped. Here an example: In the PLC the bit DB15.DBX0.0 sets an event. In Flexible this bit is inside the WORD tag DB15.DBW0 with the trigger bit of position EIGHT, and not ZERO (as expected) - As only WORD tags can be used for the events, additional tags must be created. Every time that new alarms are added, new WORD tags must be created too. - When the DB structure is changed, the bit position of all the events must be reorganized. Sure, this doesn't apply when the DB doesn't change but this is just a limitation and inflexible Solution -------- Generate a SCL source file from the DB and use this file for creating two files (alarms and tags) that can be imported in WinccFlex. The file for the alarms will consider the swapping of the bit position and will use the comment from the SCL file as event text. On the other side, the required WORD tags will be created too, so that they can be imported too.