Chapter 3 and 4
Chapter 3 and 4
INSTITUTE OF TECHNOLOGY
Department of Electrical Engineering
Course name: Industrial automation (ECEg5201 )
Chapter 3: Basic of PLC Programming
Part I
•Revision to fundamental logic
gates
•Hardwired logic versus
programed logic
Revision to fundamental logic gates
• Many things can be thought of as existing in one of two states.
• These two states can be defined as “high” “low”,
or “on” or “off”, “yes” or “no”, and “1” or “0
• The counter file stores the counter status and counter data.
CONT…
• The control file stores the control element’s status and
data. R6:000-to-R6:999
• The integer file stores integer data values, with a range from 232,768
through 32,767.
N7:000-to-N7:999
The address N7:100 addresses word 100 of the integer file.
• The floating-point file element can store values in the range
from
61.1754944e-38 to 63.4028237e138.
The input image table file
• The input image table file is that part of the data memory allocated to
storing the on/off status of connected discrete inputs.
• Connection of an open and closed switch to the input image table file
through the input module:
• Processor continually
reads current input
status and updates
input image table file
Output Table File Operation
• The output image table file is that part of the program memory
allocated to storing the actual on/off status of connected
discrete outputs.
• Connections of pilot lights to the output image table file through the
output module:
• Processor continually
activates or deactivates
output status according
to output image table
file status.
Program Scan
• A single PLC operating cycle consisting of the input scan, program
scan, output scan, and housekeeping duties.
• The time it takes to complete a scan cycle is called the scan cycle time
and indicates how fast the controller can react to changes in inputs.
CONT…
CONT…
• The scan time is a function of the following:
The speed or clock frequency of the microprocessor system
The length of the ladder program
The type of instructions executed
The actual ladder true/false conditions
• The actual scan time is calculated and stored in the PLC’s memory.
• The scan is normally a continuous and sequential process of reading
the status of inputs, evaluating the control logic, and updating
the outputs.
CONT…
The scan process applied to a simple single rung program:
• The XIO instruction, which is also called the Examine-off instruction, looks
and operates like a normally closed relay contact.
• This instruction asks the PLC’s processor to examine if the contact is open.
• Where as XIC instruction asks the PLC’s processor to examine if the contact
is closed.
CONT…
• Examine If Open (XIO) instruction
CONT…
• The symbol for the Output Energize (OTE) instruction is shown
in Figure below.
• The OTE instruction looks and operates like a relay coil and
is
associated with a memory bit.
• This instruction signals the PLC to energize (switch on) or de-energize
(switch off ) the output.
Instruction
• This address indicates what PLC input is connected to what
Addressing
input device and what PLC output will drive what output device.
addressing format for an Allen Bradley SLC 500 controller
Branch Instructions
• Branch instructions are used to create parallel paths of input condition
instructions.
• This allows more than one combination of input conditions (OR logic)
to establish logic continuity in a rung.
CONT…
Parallel input
Parallel output
branches
branches.
Reprogrammed to
obtain the required
logic.
CONT…
Limitation of PLC programming
• only one output per rung and the output must be located at the end of
the rung.
• The only limitation on the number of rungs is memory size
• Another limitation to branch circuit programming is that the PLC will
not allow for programming of vertical contacts.
CONT…
• The processor examines the ladder logic rung for logic continuity
from left to right only. The processor never allows for flow from
right to left.
Hardwired Circuit
Hardwired Circuit
You simply
scroll down
the list until
you find the
processor you
are using and
select it.
CONT…
• I/O Configuration Screen
Hardwired
Programmed
CONT…
• Motor seal-in circuit implemented using an Allen-Bradley
Pico controller.
Latching Relay
• Electromagnetic latching relays are designed to hold the relay closed
after power has been removed from the coil.
• Latching relays are used where it is necessary for contacts to stay
open and/or closed even though the coil is energized only
momentarily.
position.
• The unlatch or release coil is
momentarily energized to
CONT…
• Electromagnetic latching relay circuit