PLC API 6 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 Blocks Auxiliary blocks 6.1 FB_SimClock Clock block with variable pulse width. TS1110 57 Version: 1.0 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 Name Description FB SimDelayedLatch [} 59] _ Delayed latch FB SimPosMotor [} 63] _ Position-controlled simulation motor FB SimSimpleVeloMotor [} 64] _ Simple velocity-controlled simulation motor FB SimVeloMotor [} 65] Velocity-controlled simulation motor Name Description FB SimClock [} 57] _ Clock block FB SimDelay [} 58] _ Delay block FB SimDerivative [} 60] _ Derivative block FB SimIntegral [} 61] _ Integral block FB SimPastCpuCounterTicks [} 62] _ Timing block FB SimRamp [} 60] Ramp block