Professional Documents
Culture Documents
During execution of the program, PLC must know, in real-time, when the external
devices controlling the process changes their states
For each operating cycle, the processor reads all inputs, takes these values then
energizes or de-energizes the outputs according to the user program
The PLC operating cycle consists of the input scan, program scan, output scan,
and housekeeping duties
Time taken to complete a scan cycle is called scan cycle time and indicates how
fast the controller can react to changes in the input
where Y represents an expression that process a new value for variable X, and :=
is the assignment symbol.
− The variable retain the assigned value until another assignment change the value
− Other examples are
The first letter is I for input memory location, Q for output memory location, or M
for internal memory.
The second letter is X for bit, B for byte (8 bit), W for word (16 bits), D for double
word (32 bits), or L for long word (64 bits).
AT is used to fix the memory location for a variable. Thus,
Conditional statements
− The IF statement:
indicate that if the fluid temp variable is ON, the actions following that line in the
program are to occur.
− CASE is used to give the condition that selected statements are to be executed if
a particular integer value occurs else some other selected statements
− The variables, i.e. signals from sensors and output signals to be used in a
program
− Each rung must start with an input(s) and must end with atleast one output.
Input is with reference to control action such as closing the contacts of a switch,
while output is with reference to devices connected to the output of a PLC.
− Electrical devices are shown in their normal condition. i.e., normally closed or
normally closed.
AND-gate
− Output is not energized unless two normally open switches are both closed
− Example of an AND gate is the interlock control system for machine tool: The
machine can only be operated if both the safety guard is in position and and
power switch is ON.
− Used in sequential circuits to make level and edge triggered flipflops, which are intern used in
memory devices (most kinds of ROM and RAM), shift registers etc.
Explanation
− If input A contact closes, there will be an output.
− When the output is energized, other sets of contacts associated with O/P a closes
− These contacts forms OR logic gate system with the input contacts
− Then, even if input A opens, the circuit will still maintain the output energized
− The only way to release the output is by opening the NC closed contact B.
Graphical function block declaration The function block TMR and SR are
standard IEC function blocks.
DB_ON is the name of an instance of
the SR function block type
The S input is driven by Q output from
the function block DB_ON which has
an instance of function block type TMR
When using Boolean signals, negated
inputs of functions and function blocks
is shown using small circle at the input
point
In an FBD network a cross-diagram
connector can be used to aid in
readability and avoidance of graphical
connections that are difficult to draw
Connector has no significance as far as
program behavior is concerned
Actions
− Two actions can be connected to each
step
− The step without action is regarded as
the standby until the next transition
condition is 1
− The action consists of IL or LD of PLC
language and the action is executed
while the step is active
− The qualifier is used to control the
action
− If the action is changed from active to
inactive status, the contact output
executed at the action will be 0, but
R, S, function and function block
output retains the status before
inactive status
Action qualifier
− Action qualifier is used whenever the
action is used
− The execution point/time of the action
relating to the step is defined
according to the selected qualifier.
− The action qualifiers are classified as: