PLC API
If a PLC is to be simulated via the TwinCAT Simulation Manager, the original PLCs and the simulation PLC must contain the TcSimManager.lib.
Global Variables
TcSimManager.lib contains the universal DWORD 'dwSimState', through which the PLCs are informed about the current state of the simulation.
VAR_GLOBAL
dwSimState : DWORD;
END_VAR
Flag | Description |
---|---|
0 | Simulation mode on / off The flag is set by the TwinCAT Simulation Manager when the switchover to the simulation mode has been successful. At this point the mode can be read by the PLC. |
1 - 31 | Reserved |
Blocks
Name | Description |
---|---|
Delayed latch | |
Position-controlled simulation motor | |
Simple velocity-controlled simulation motor | |
Velocity-controlled simulation motor |
Auxiliary blocks
Name | Description |
---|---|
Clock block | |
Delay block | |
Derivative block | |
Integral block | |
Timing block | |
Ramp block |