Back to tutorials
PLC Instructions

PLC Alarm Programming - Advanced Alarm Capturing in Ladder Logic RSLogix 500 Allen Bradley

By
Vladimir Romanov
Table of Contents

Introduction

In a recent post, we’ve covered the importance of properly defining alarms, faults & warnings within a PLC routine. Although we went over the basics, an advanced practice would require us to go a step above what we’ve defined by implementing ladder logic which would capture the first fault which occurred. The purpose of this logic would be to notify the operator or engineer which fault came first as in many cases, an array of faults would be triggered after the first one.

For example, if the tank reaches a critical level, the system is shut down, valves are opened and you now have alarms for temperature, pressure & level. You’d want to know that the problem was initially caused by the tank overfilling so that you can rectify the issue.

Assigning Unique Fault Codes

A unique fault code should be assigned to every single fault, alarm, and warning. These values are needed to properly troubleshoot the system, describe faults as they occur and keep track of what’s going on. Making sure that this is in place at the very beginning will save a lot of time down the road.

We’ve assigned fault codes to our faults in the previous program, but we do need to store them within a register in order to identify which one is which. It’s possible to do this with a string, but it’s much more difficult to manipulate and isn’t recommended. A common practice is to create a simple spreadsheet which lists all the faults, warnings and alarms of a system along with the identifier assigned to each one. Here’s a screenshot of one of my spreadsheets.

PLC Alarm Programming - Advanced Alarm Capturing in Ladder Logic RSLogix 500 Allen Bradley

You may note that the spreadsheet above is slightly more complex than what we’ve implemented in the previous tutorial. It’s used for a system which has multiple areas of operation thus required me to track which fault would shut down an area. This is an advanced practice which you’ll get to as you program Programmable Logic Controllers.

Identifying which Fault Occurred First

As mentioned above, we will use the unique identifier to capture the first fault which occurred. By utilizing a simple MOV Instruction, we can transfer the appropriate ID into a register which stores the fault. The example below illustrates the MOV Instruction which is executed once the fault is triggered. The comparison instruction EQU allows us to store the value only when the fault register is set to 0. This is important as once we capture the fault, the register is no longer equal to 0 and thus our logic prevents another fault which contains the same logic to store the ID once it’s triggered.

PLC Alarm Programming - Advanced Alarm Capturing in Ladder Logic RSLogix 5000 Allen Bradley

Resetting the Fault Register

We’ve captured the fault, but we need to reset the register once the system is back into operation. This can be easily achieved through the use of the “system reset” which we’ve configured previously. Here’s the logic which does exactly that:

PLC Alarm Programming - Advanced Alarm Capturing in Ladder Logic RSLogix 500 AB

Conclusion

Knowing how to work with Faults, Alarms and Warnings is an important skill when it comes to Programmable Logic Controllers. Although different situations will require different solutions, it’s always good to have a strong base on how to set these up; they are present in every single application.

In many circumstances, you’d want to know which fault occurred first and triggered all the other ones. This would allow the operator or engineer to troubleshoot the system much easier as the source of the problem is known. To create this logic, you can leverage a fault register paired with a MOV instruction which stores the unique ID of the fault.

Video Tutorial

Back to tutorials

Related Tutorials

Advanced

PowerFlex 525 Parameter, Input and Output Programming Tutorial in RSLogix Studio 5000

The PowerFlex 525 series of Variable Frequency Drives from Allen Bradley is highly utilized and respected within the automation field. The drives are compact, versatile and easy to use. We’ve written an extensive tutorial on how to get started with these drives in a previous tutorial; it covers how to initialize the drive, connect it to an EtherNet/IP based PLC and how to set the right parameters. In this tutorial, we’re looking to expand on the concepts and demonstrate a way to access and utilize the multiple Input and Output options available on the drive. The reason you may want to utilize the IO is to save money on purchasing external components, integrate instrumentation into your drive and save floor space, wiring and cost. We’ve seen the need to integrate closely related sensors into a PowerFlex 525 application; this would be the right way to do it.

By
Vladimir Romanov
Advanced

Publishing MQTT Data Using Opto 22 groov EPIC PAC

MQTT is a communication protocol that has taken off in the IIoT community. It’s a light-weight, efficient protocol that works through a publisher / broker / subscriber model. It creates an easy way for field devices to communicate and retrieve data from a single location. In this article, we’ll go over MQTT and dive into an example of how you can publish data using a groov EPIC PAC and retrieve the data using a MQTT client.

By
Vladimir Romanov
Intermediate

HMI Design - Best Practices for Effective HMI Screens

HMI Design is the practice of building HMI screens that are intuitive to the end user, pleasing to the eye and are efficient to operate. As control systems within manufacturing are migrated from traditional push button designs to primarily operated from HMI displays, HMI Design has become trivial to any new installation.Although there is a wide range of HMI based systems, the basic principles of good design remain the same. Different industries may dictate different patterns of layout for their systems, but the good practices remain.

By
Vladimir Romanov