
Chapter 5. Application instructions
5-106
5.15 Flag instructions
5.15.1 STC, CLC
STC, CLC
(Set / Reset the
carry flag)
FUN(002) STC
FUN(003) CLC
Applicable
CPU
All CPUs
Available Device
Flag
Instructions
M
P
K
L
F
T
C
S
D
#D Integer
Steps
Error
(F110)
Zero
(F111)
Carry
(F112)
STC
CLC
1
O
1) Functions
-
STC : Turns the carry flag (F112) on when the input condition is switched on.
-
CLC : Turns the carry flag (F112) off when the input condition is switched on.
-
Execution conditions
2) Program example
-
Program that set the carry flag (F112) when M0000 is on.
-
Program that reset the carry flag (F112) when M0001 is on.
STC
CLC
Input condition
STC, CLC
Executed per scan
Executed per scan
S T C
M0000
C L C
M0001