Page 57

Petruzella_ProgrammableLogicControllers__5e

• I/O updates occur asynchronously to the scan of the logic. With a ControlLogix processor two separate 32-bit unsynchronized processes go on simultaneously— that is, asynchronously. This means that the module can update the input tag from the field and write the output tag to the field at any point (or at several points) during the processor’s execution of the ladder rungs. The result is more efficiency and control over when the input field device data are updated in the input tag and when the output data resulting from the solved logic are sent to the output modules and their respective field devices. Creating Ladder Logic Although other programming languages are available, ladder logic is the most common programming language for PLCs. The instructions in ladder logic programming can be divided into two broad categories: input and output instructions. The most common input instruction is equivalent to a relay contact and the most common output instruction is the equivalent of a relay coil (Figure 15-27). When creating ladder I/O bit instructions, the following rules apply: • All input instructions must be to the left of an output instruction. • A rung cannot begin with an output instruction if it also contains an input instruction. This is because the controller tests all inputs for true or false before deciding what value the output instruction should be. • A rung does not need to contain any input instructions, but it must contain at least one output instruction. If the Data Bit is: Logic 0 Logic 1 XIC instruction is: False True XIC Inputs If the Data Bit is: Logic 0 Logic 1 346 Part 2  Bit-Level Programming • When a rung has only one output instruction it will always be true. • The last instruction on a rung must always be an output instruction. • The XIC, or Examine If Closed contact instruction, checks to see if the input has a value of one. If the input is one, the XIC instruction returns a true value. • The XIO, or Examine If Open contact instruction, checks to see if the input has a value of zero. If the input is zero, the XIO instruction returns a true value. • The OTE or Output Energize coil instruction sets the tag associated with it to true or one when the rung has logic continuity. When true it can be used to energize an output device or simply set a value in memory to one. ControlLogix PACs support multiple outputs on one rung. CLX controllers allow the use of serial logic that does not conform to traditional electrical hardwired circuits or ladder logic. For example, both of the rungs shown in Figure 15-28 are valid in RSLogix 5000. However the series connection of outputs would not work if wired that way in an equivalent electrical circuit or programmed that way in RSLogix 500. In both instances in RSLogix 5000, instructions tagA and tagB must be true to energize output tag1 and tag2. In ControlLogix output instructions can be placed between input instructions as illustrated in Figure 15-29. In this example instructions tagA and tagB must be true to energize output tag1. Instructions tagA and tagB and tagC must all be true before output tag2 is set to energize. XIO instruction is: OTE instruction is: Figure 15-27  Contacts and coil instructions. True False XIO Output OTE If the Data Bit is: Logic 0 Logic 1 False True Parallel outputs tag1 tag2 tagA tagB Series outputs tagA tagB tag1 tag2 Figure 15-28  Parallel and series outputs. tagA tagB tag1 tagC tag2 Figure 15-29  Output instruction placed between input instructions.


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above