The Basics of PLC Programming - Part 3

Mon, 11/04/2019 - 14:15

In this installment of the Practicing PLC Technician Series, we continue our investigation into some of the ladder logic instructions that are based on real world field equipment familiar to the technicians of today.  We have covered virtual coils and contacts, as well as timer instructions used for time driven program segments. Here we will be taking a look at a simple Event Driven program segment using another staple of relay logic control systems, the drum sequencer.  This real world control device has an associated virtual ladder logic instruction.   

What’s an Example of an Event Driven Routine Segment?

An event driven routine segment  is one that is not synchronous meaning that  there is no fixed or timed duration associated with input or output changes.  In this type of scenario, a sequencer instruction might be utilized to walk/step through a series of actions required for a given “process” much in the way that a drum sequencer could be employed. A drum sequencer rotates and makes/breaks connections providing a pattern of control signals capable of driving field devices.  With 500 series PLC programming, the SQO, (sequencer output) instruction performs this same task.  The user defines a data table and populates it with the patterns to perform the given actions required for the “process”.  An external stimulus or “event” can be sensed and used to step through the data table. These external conditions are the “events” that drive the pointer through the lines of the data table containing the desired output states.  The behavior mirrors that of the real world “drum sequencer” often employed in relay logic control and would be considered an event driven program segment when employed in a ladder logic program.  This is in contrast to a time driven program segment, as there is no specific time interval associated with the occurrence of the stimulus or event.
 

How does the SQO output sequencer work?

In the ladder diagram below, we see an SQO sequencer instruction being stimulated by a single NO contact associated with input rack location I:1/0. When this input goes high, the sequencers pointer is moved to the next value in the data table defined for this instruction.  This in effect, provides a simple example of an event driven routine segment.  The field stimulus is asynchronous and can occur at any time.  This stimulus results in changes to output conditions as the data table word that the current pointer location references is sent to the location defined in the Destination field of this SQO instruction. (in this instance, output rack location O:2)

SQO Instruction

The pointer will move from through these locations, and when it reaches B3:4, it will wrap back to location B3:1.  The O:2 output will be passed each value stored from B3:1 to B3:4.  The maximum number of values that can be stored in any one data table is 255 as we need 1 location to be designated as the origin of the table and as we learned in our earlier discussion of data files, the B3 file can hold 256 words.

Take a look at this video animation  that illustrates the operation of an SQO while explaining how Masking is accomplished when sending a data table to a specified output location.  Masking is explained, and the operation of the sequencer pointer is illustrated.

In our next installment, we will investigate the operation of counters. We will also familiarize ourselves with the User’s Guide which contains information on the entire instruction set for the 500 series AB controllers.  All instructions available for this series of controllers have their parameters, and details defined in this guide and it is a significant resource asset to those wanting to familiarize themselves with PLC ladder logic programming.

If you like this post, check out our other posts in the Practicing PLC Technician Series.

We hope that this has been helpful as a student or practicing PLC technician. We are looking for other ideas for the Practicing PLC Technician Series. Please let us know if you have any ideas that you would like to see and send your thoughts to [email protected]

Add new comment