Industry News Display
2018-03-21 Control Engineering
Two faults happening at the same time in ladder logic is extremely unlikely, but there are different situations and scenarios users need to be cognizant of and plan for accordingly.
By: Frank Lamb, Automation Primer
When it comes to ladder logic, a question that has come up is whether two faults can happen at the same time. Often, one fault may cause another; an example might be a fault causes an “air dump," which prevents another cylinder from reaching end of stroke. The logic (right) shows if a normally-closed system fault bit is placed in series with the fault logic for an individual fault, it prevents multiple faults from occurring.
Even if two faults somehow happen during the same scan (highly unlikely, scans are typically on the order of 30 to 50ms max), the first fault would prevent the second from happening. So proper programming can easily isolate the initial cause.
Still, on larger “zoned” machines which have multiple fault registers, sections of a machine or system may operate independently of each other. If there's only one human-machine interface (HMI), all of the faults still need to be recorded and enunciated. In this case there needs to be a fault register for each cell or station. On the “fault history” screen of a typical HMI, each register would have a separate trigger, so multiple faults would appear on the list.
What if there is a single information banner and want to put multiple messages on the screen? This requires code designed to search the fault and information registers and then scroll them across the banner or message display. The logic below shows a method of doing this.
This code is from a template, which used a spreadsheet to generate “cells” populated with standard code to serve as a starting point for a program. Each cell generates its own faults, info, and warnings. Three separate message categories that are searched and scrolled on three different banners on each screen of the HMI.
There are typically 20 to 40 cells on a large machine or system, so the search for messages covers 60 to 120 different registers, each of which may contain 10 or more messages, categorized by bits of a double integer. This allows for thousands of possible messages to be searched and displayed on just three banners.
This template is for Allen-Bradley ControlLogix, but it is easy to reproduce on most major programmable logic controller (PLC) platforms. It is even easier using any of the structured text languages. Do-while and for-next loops are common in these languages, which is a bit more difficult in ladder logic. Another method of doing this uses the file search and compare (FSC) instruction.
Frank Lamb is the founder of Automation Consulting LLC, and is a member of the Control Engineering Editorial Advisory Board. This article originally appeared on Automation Primer's blog. Automation Primer is a CFE Media content partner. Edited by Chris Vavra, production editor, Control Engineering, firstname.lastname@example.org.