3. Instructions
1138
CS/CJ/NSJ Series Instructions Reference Manual (W474)
SFCON/SFCOFF
Applicable Program Areas
Operands
Cyclic Task
N: &0 to &31 (Correspond to cyclic tasks 0 to 31.) For CJ2 CPU Units, &0 to &127 are available.
Extra Task
N: &8000 to &8255 (Correspond to interrupt tasks 0 to 255.)
Flags
Function
z SFCON(789)
The SFC task specified by N is started. If an ended task is started, it is executed from the initial step. If
a paused task is started, it is executed from the status that existed before it was paused.
z SFCOFF(790)
The SFC task specified by N is ended. The status of all outputs is held. When execution is restarted
with the SFCON(789) instruction, the task is executed from the initial step.
Instruction Mnemonic Variations
Function
code
Function
SFC ON SFCON --- 789
Restarts execution of an SFC task that was ended
or paused using one of the other SFC Task Con-
trol Instructions.
SFC OFF SFCOFF --- 790
Ends execution of an SFC task. The status of all
outputs is held. When execution of the SFC task is
restarted, it is executed from the initial step.
Symbol
SFCON SFCOFF
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK Not allowed OK
Operand Description Data type Size
N SFC task number --- 1
Operand Task name
&0 to &127 Cyclic tasks 0 to 127
&8000 Extra task 0 (interrupt task 0)
&8001 Extra task 1 (interrupt task 1)
... ...
&8255 Extra task 255 (interrupt task 255)
Name Label Operation
Error Flag P_ER • OFF if the specified task does not exist.
• OFF if the instruction is executed in the interrupt tasks.
N: SFC task number
SFCON(789)
N
N: SFC task number
SFCOFF(790)
N