Professional Documents
Culture Documents
ANDHRA PRADESH
Name : K . Sambaiah
Designation : H.A.E.I.E.S
Branch : Applied Elect.&Instru. Engg.
Institute : GMRP, KARIMNAGAR.
Year/semester : VI Semester
Subject : Industrial Electronics, PLC and SCADA
Subject code : AEI-602
Topic : PLC Programming
Duration : 100 mts
Sub topic :Siemens PLC instruction set &
programming concept-1
Teaching aids : ppts, Diagrams
AEI602.61 to 62 1
Objectives
AEI602.61 to 62 2
Instruction Set
Control Instructions Description
AEI602.61 to 62 3
You can vary the count value with in this
range by using the following counter
instructions.
AEI602.61 to 62 4
L LOAD CURRENT COUNTER VALUE INTO ACCU 1
FORMAT
L<counter>
AEI602.61 to 62 5
FR – ENABLE COUNTER
FORMAT
FR < COUNTER>
AEI602.61 to 62 6
Description
Writes - - - - - 0 - - o
AEI602.61 to 62 8
DESCRIPTION
• L <counter> loads the current count of the addressed
counter as an integer into ACCU
STATUS WORD
AEI602.61 to 62 9
LC LOAD CURRENT COUNTER VALUE INTO
ACCU1 AS BCD
FORMAT
LC< counter>
Writes - - - - - - - - -
R – RESET COUNTER
FORMAT
R <counter>
Writes - - - - - 0 - - 0
AEI602.61 to 62 12
S – SET COUNTER PRESET VALUE
FORMAT
S <counter>
Data type Memory area Description
Address
CU – COUNTER UP
FORMAT
CU<counter>
Data type Memory Description
Address area
AEI602.61 to 62 14
DESCRIPTION
• CU < counter> increments the count of the
addressed counter by 1 when RLO transitions
from “0” to “1”& the count is less than “999”.
• When the count reaches its upper limit of
“999”incrementing stops.
• Additional transitions of RLO have no effect &
overflow OV bit is not set.
STATUS WORD
AEI602.61 to 62 15
CD – COUNTER DOWN
FORMAT CD <counter>
AEI602.61 to 62 16
Description
• CD< counter> decrements the count of the
addressed counter by “1”
• When RLO transitions from “0” to “1” & the count is
greater than “0”.
• When the count reaches its lower limit of “0”,
decrementing stops.
• Additional transitions of RLO have no effect the
counter will not count the negative values.
STATUS WORD
BR CC 1 CC 0 OV OS OR STA RLO /FC
Writes - - - - - 0 - - 0
AEI602.61 to 62 17
T TRANSFER
FORMAT
T<address>
AEI602.61 to 62 18
Description
• <address> transfers (copies) the contents of ACCU 1 to the
destination address if the master control relay is switched
on (MCR =1).If MCR=0, then the destination address is
written with 0.
AEI602.61 to 62 19
STATUS WORD
BR CC 1 CC 0 OV OS OR STA RLO /F
C
Writes - - - - - - - - -
AEI602.61 to 62 20
CALL SFC FORMAT CALL FC n
Note
AEI602.61 to 62 21
DESCRIPTION
AEI602.61 to 62 22
CALL SFB
FORMAT
CALL SFB n1, DBn2
DESCRIPTION
AEI602.61 to 62 23
CALL SFB Instruction
AEI602.61 to 62 24
Status word
Writes - - - - 0 0 1 - 0
AEI602.61 to 62 25
CALL SFC FORMAT CALL SFC n
NOTE :
• If your working in the STL editor, the reference
AEI602.61 to 62 26
CALL SFC FORMAT CALL SFC n
AEI602.61 to 62 27
STATUS WORD
AEI602.61 to 62 28
Data Memory Description
Address type area
• DESCRIPTION
When the RLO transitions from “0” to”1”,FR<timer>
clears the edge detecting flag that is used to
starting the address timer.
AEI602.61 to 62 29
• A change in the RLO bit from “0” to “1” in front of an
enable instruction
Writes - - - - - 0 - - 0
AEI602.61 to 62 31
SUMMARY
AEI602.61 to 62 32
Quiz
1. S instruction is a
AEI602.61 to 62 34