Control an SFC Child Program
These are possible qualifiers that can be applied to an action block for handling a child program:
|
Code |
Description |
|---|---|
Child (N); |
Starts the child program when the step is activated and stops (kills) it when the step is deactivated. |
Child (S); |
|
Child (R); |
|
Alternatively, use these statements in an action block programmed in ST language.
In this table, prog represents the name of the child program:
|
Code |
Description |
|---|---|
GSTART (prog); |
|
GKILL (prog); |
|
GFREEZE (prog); |
Suspends the execution of a child program. |
GRST (prog); |
Restarts a program suspended by a |
Use the GSTATUS function in expressions.
This function returns the current state of a child SFC program:
|
Code |
Description |
|---|---|
GSTATUS (prog) |
Returns the current state of a child SFC program: 0: program is inactive 1: program is active 2: program is suspended |
-
-
When a child program is started by its parent program, it keeps the inactive status until it is executed (further in the cycle).
If a child program is started in an SFC chart,GSTATUSreturns 1 (active) on the next cycle.




