Configuration of Messages and Alarms in TIA Portal 15.1

Aisha
4 min readSep 28, 2020

This is a short tutorial on how to configure discrete and analog alarms with TIA Portal. There are many types of alarms delivered by the Tia portal such as discrete, analog, systems, and controller alarms. In this tutorial, we will cover both discrete & analog alarms.

The difference between the two:

A discrete alarm will check if the signal turns ON or OFF, 0 or 1 depending on that changes, it will release an alarm. Such as the trip signal, plc will monitor the signal if it changes to 1 then the alarm will be activated.

Analog alarm such in case monitoring certain values if it goes above or below the limit the alarm will be activated. The tank level is an example, the high-level tank alarm prevents overfilling of liquids by monitoring the level of the liquid if it goes over the normal level it will release an alarm.

  • Discrete alarm

When creating a discrete alarm have to use word data type, not Bool type, and set every single bit to a certain alarm signal. Where the word type is 16 bits we can assign 16 different alarms signal to it, slimier to the below figure.

1- So to do this, we have to create a variable with type WORD on the PLC function block.

#ALARM_WORD_1.X0 > alarm_word_1 is the variable’s name & X0 indicate to Bit number 0, X1 indicate to bit number 1, and so on.

2- Next, the PLC logic is pretty simple we need to tell the PLC if the condition is met, just release an alarm as shown below.

3- Drag the function block and drop it into the main/organization block, the main purpose of the organization block is to execute the user programs.

4- Compile and upload the logic to the CPU.

  • HMI alarms

To configure discrete alarms, go to HMI alarms > discrete alarms page > set an ID, text, and trigger bit. Trigger bit No. have to be the same as bit No. assigned on the PLC logic

Click on HMI alarms
Configure discrete alarms
  • Analog alarms

PLC can understand only digital values 0 and 1, but it can also handle analog signals through scaling and convert it from raw to physical values. Configure analog alarm is similar to the discrete, but instead to Word variable, we need to use the tag of the variable after scaling, and it could be of type Real/INT.

An example of the scaling procedure of analog input, 0- 27648 is analog signal range.

SCALE_ X “Scale” and NORM_X “Normalize” blocks can be used in scaling analog values. You can use the MIN and MAX parameters to define the limits of a value range that are applied to the scale, such as (0.0°C–100.0°C) in case of temperature.

Configure analog alarms

The trigger tag is the tag of the measuring value after scaling, the limit could be either the HMI tag or constant value. As seen in the above example, if pressure is higher than 150, then activate an alarm with the message “HIGH PRESSURE ALARM”. Limit mode also could be higher or lower depends on the application.

  • Test alarms in HMI

For the HMI screen, just drop & drag “alarms view” to your screen. The alarms view is the interface that shows all the alarms massages along with all its details.

All done, just upload the program to the PLC then, click Run time on the PC option.

  • Test discrete alarms
  • Test analog alarms

Finally, I hope you find this simple tutorial helpful. Thanks to everyone who read my posts. If you have any questions, suggestions on how to improve the post or you want to share more information about the topic discussed above, please don’t hesitate to contact me through Gmail or LinkedIn.

--

--

Aisha

Electrical Engineer KAU 2019 👩🏻‍🎓✨