Summary
The logic features operate as follows.
Initial Processing
This is the initial state of the logic program execution engine. After the logic program execution engine has been initialized, the logic state changes to "loading."
Loading
The logic program is read from the memory. It checks whether the logic program has been loaded normally and remedies the error if not loaded normally. Once the program has been loaded normally, it will stop.
If [Run] is selected for the Power-ON action, the run command will be executed. When changing to the "running" state, the I/O is initialized.
Stop
The logic is in the paused state. Upon receiving a command ([Logic Reset], [Run], [Single Scan], [Continue], or [Pause]), the state will change accordingly.
The [Logic Reset] command starts "loading". Symbol variables are initialized. When it is a retentive variable and the power is off or the logic of the display unit is reset, the most recent data is maintained. However, if the logic is reset with the online monitor (mode that runs a program in the logic on the GP-Pro EX) or #L_Command, the variable is initialized with the initial value for logic features in GP-Pro EX.
Volatile variables are cleared to zero on [Run] or [Single Scan] commands. The [Run] command starts "running". The [Single Scan] command runs the logic program once.
First Scan
Reads I/O, runs the initialized logic program, and then writes the I/O.
Running
The logic program execution engine is running. The engine reads the I/O, runs the logic program, writes the I/O, and updates the system variables (#L_AvgLogicTime, #L_AvgScanTime, and so on).
The [Logic Reset] command starts "loading".
The [Stop] command stops the logic.
The [Pause] command pauses the logic.
Pause
The logic program execution engine is paused. To prevent the I/O watchdog time-out, I/O write/read is executed. However, since the logic program has not run, the output state remains unchanged. Upon receiving a command, the state will change accordingly.
The [Logic Reset] command starts "loading".
The [Single Scan] command runs the logic program once.
The [Stop] command stops the logic. The [Continue] command starts "running".
Development Process
The scan runs as follows.
Scan Time Adjustment
The scan time is adjusted every 64 scans. The scan times for the fixed scan time mode and CPU scan percentage mode are as follows.
Fixed Scan Time Mode
Scan Time = (#L_AvgLogicTime x 100)/ 50 (Models that can use logic GP-33** Series: Models except 30: 50)
CPU Scan Percentage Mode
Scan Time = (#L_AvgLogicTime x 100) / #L_PercentScan
For more details on Scan Time, see the following.
30.14.3.2 Logic Scan Time
For the details of #L_AvgLogicTime, #L_PercentScan, refer to the following.
A.2 System Variables