Operation Modes
Virtual PLC CPU operates under three distinct states. Each mode defines how the logic engine interacts with the project and the hardware.
Mode Definitions
| Mode | Status | Description |
|---|---|---|
| Stop | 🔴 Inactive | The PLC is idle and the logic program is loaded but not executed. |
| Run | 🟢 Active | The PLC is executing the logic program cyclically through the Scan Cycle. |
| Busy | 🟡 Processing | Active during program transfers. Automatically switches to Stop once the process finishes. |
The PLC Scan Cycle (Run Mode)
When the CPU is in Run Mode, it executes a repetitive process known as a Scan. This cycle is critical for ensuring real-time response and consists of the following phases:
- Input Status Update: The CPU reads the physical/virtual status of all inputs.
- Logic Execution: The application program is processed sequentially using the previously read input data.
- Diagnostics & Comm: The system performs internal integrity checks and manages communication tasks.
- Output Update: The results of the logic execution are written to the outputs, and the cycle restarts.
:::info Cycle Time The total duration of the scan depends on the program size, the number of I/Os, and the volume of communication required. :::
Busy Mode Behavior
This is a transient state. It is triggered exclusively when the EasyPLC Editor transfers a new logic program to the Virtual PLC CPU.
- During this state, the CPU is locked for writing.
- Once the transfer is successfully completed, the system defaults to Stop Mode for safety, awaiting a manual or commanded start.