1. Home
  2. Docs
  3. TIA Portal
  4. Plc Alarm Library

Plc Alarm Library

For whom is this solution?

This solution was made to replace the normal call of the “Program_Alarm” block and to add a management FC instead. This has the following advantages:

  • No hardware limitation of the “Program_Alarm” instances (e.g.: max. 800 with 1517-CPU).
  • Messages can be grouped together.
  • Collective messages are generated automatically
  • A list of used alarms can be generated, which can be used for easy creation of documentation on the PLC-Alarm WebApp.
  • No bit necessary to remember the state until acknowledgement

General structure

There are basically three elements that are needed to make this system work:

DB: “PLC-Alarm-Handler-DB”:
This DB is the link for all blocks and stores all alarm states and manages other evaluations.

  1. DB: “PLC-Alarm-Handler-DB”:
    This DB is the link for all blocks and stores all states and manages other evaluations.
  2. FC: “PLC-Alarm”:
    If the block “Program_Alarm” was used before, this block is used now. This is still feeded with additional values such as error number and message class and passes these values on to the DB, where these are read out then again by “PLC-Alarm-Handler”…
  3. FB. “PLC-Alarm-Handler”:
    Here all values are read out from the DB and the messages are activated by the known “Program_Alarm” blocks. In addition, collective messages are created and other helpful information.
Gerneral structure of the PLC Alarm Tia Portal solution

Limitations

This solution has some limitations, but when you know them it should be no problem:

  • The “MessNo” on the input of the FC must not be changed during the PLC is running. Otherwise the FC do not find the entry any more to acknoledge it.
  • The message number has to be higher than “0”. Zero is no alarm/warning/inforamtion for the Handler

Features

Collective message

By the here selected structure it can be found out very simply whether, and how many, messages/warnings/alarms are pending in a zone. This is done by loops in the FB (PLC-Alarm-Handler) and the result is stored in the DB (PLC-Alarm-Handler-DB) under the following variables:

Messages:
“PLC_Alarm_Handler_DB”.Message[ZoneNumber].Active -> True if at least one message in this zone is active
“PLC_Alarm_Handler_DB”.Message[ZoneNumber].Amount -> Number (UInt) of pending messages in the selected zone

  • Messages:
    “PLC_Alarm_Handler_DB”.Message[ZoneNumber].Active -> True if at least one message in this zone is active
    “PLC_Alarm_Handler_DB”.Message[ZoneNumber].Amount -> Number (UInt) of pending messages in the selected zone
  • Warnings:
    “PLC_Alarm_Handler_DB”.Warning[ZoneNumber].Active -> True if at least one warning is active in this zone.
    “PLC_Alarm_Handler_DB”. Warning [ZoneNumber].Amount -> Number (UInt) of pending warnings in the selected zone.
  • Alarms:
    “PLC_Alarm_Handler_DB”.Alarm[ZoneNumber].Active -> True if at least one alarm is active in this zone.
    “PLC_Alarm_Handler_DB”. Alarm [ZoneNumber].Amount -> Number (UInt) of pending alarms in the selected zone.

Articles

How can we help?