Page 29

Petruzella_ProgrammableLogicControllers__5e

Bit number Symbol Examine if closed (XIC) Examine-on 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 I:1/4 I:1/4 Instruction interpreted as true 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 I:1/4 I:1/4 0 Instruction interpreted as false Figure 5-20  Examine If Closed (XIC) instruction. Status relay contacts. Instead, they operate as commands that examine the value (0 or 1) of a bit of data to determine its true or false logical condition. The symbol for the Examine If Closed (XIC) instruction is shown in Figure 5-20. The XIC instruction is also called the Examine-on instruction. Associated with each XIC instruction is a memory bit linked to the status of an input device or an internal logical condition in a rung. This instruction asks the PLC’s processor to examine if the contact is closed. It does this by examining the bit at the memory location specified by the address in the following manner: • The memory bit is set to 1 or 0 depending on the status of the input (physical) device or internal (logical) relay address associated with that bit. • A 1 corresponds to a true status or on condition. • A 0 corresponds to a false status or off condition. • When the Examine-on instruction is associated with a physical input, the instruction will be set to 1 when a physical input is present (voltage is applied to the input terminal), and 0 when there is no physical input present (no voltage applied to the input terminal). • When the Examine-on instruction is associated by address with an internal relay, then the status of the bit is dependent on the logical status of the internal bit with the same address as the instruction. Sensor 1 Sensor 2 Sensor 3 Sensor 4 Sensor 5 Ladder diagram (LD) program SOL 1 IF Sensor_1 AND Sensor_2 THEN SOL_1 := 1; ELSEIF Sensor_3 AND Sensor_4 AND NOT Sensor_5 THEN SOL_1 := 1; END_IF; Structured text (ST) program Figure 5-19  PLC ladder and equivalent structured text program. Structured text is a high-level text language primarily used to implement complex procedures that cannot be easily expressed with graphical languages. Structured text uses statements to define what to execute. Figure 5-19 illustrates how structured text and ladder diagram programming could be used to produce the same logical output. For this application, the objective is to energize SOL 1 whenever either one of the two following circuit conditions exists: • Sensor 1 and Sensor 2 switches are both closed. • Sensor 3 and Sensor 4 switches are both closed and Sensor 5 switch is open. 5.4  Bit-Level Logic Instructions The ladder diagram language is basically a symbolic set of instructions used to create the controller program. Bitlevel symbolic instructions fall into two separate categories: instructions that examine data and instructions that control data. Each symbolic instruction is a command to perform a specific operation. These ladder instruction symbols are arranged to obtain the desired control logic that is to be entered into the memory of the PLC. Representations of contacts and coils are the basic symbols of the logic ladder diagram instruction set. The three fundamental symbols that are used to translate relay control logic to contact symbolic logic are Examine If Closed (XIC), Examine If Open (XIO), and Output Energize (OTE). Each of these instructions relates to a single bit of PLC memory that is specified by the instruction’s address. While the XIO and XIC are represented by symbols that resemble a normally-open and normally-closed relay contact, they do not operate like Basics of PLC Programming  Chapter 5 83


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above