beckhoff TC170x — 7.2 Interface ITcRTimeSimulation

API | External Control (ADS) 7 API | API 7.1 External Control (ADS) | External Control (ADS) An interface is available for TwinCAT 3 Usermode Runtime - External Control to enable access from external programs via ADS. This interface consists of several parts: Query the state The current state can be queried via this interface. Values of the RtMode: enum RtMode { RtMode_None = 0, RtMode_Normal = 1, RtMode_Simulation = 2, RtMode_ExternalTick = 3, RtMode_Invalid = -1 } Starting the ticks This interface can be used to specify a number of ticks that the TwinCAT 3 Usermode Runtime should execute.

7.2 Interface ITcRTimeSimulation | Interface ITcRTimeSimulation The ITcRTimeSimulation interface provides the interface for accessing the TwinCAT 3 Usermode Runtime from the real-time program (in PLC / C++). This can be used to query and change the status. Syntax TCOM_DECL_INTERFACE("460AD091-0352-4002-9C5E-C8AE7A1AFE56", ITcRTimeSimulation) TC170x 18 Version: 1.6.1 ADS Port Index Group Index Offset Access Data type Description Note 200 0x00000001 (RTADSGRP SYSDATA) _ 0x00000032 (RTADSOFF S SYSDATA _ TICK MOD _ _ E) R ULONG Returns the current RtMode. If the value is 3 ( RtMode Externaltick ), the _ calculation can be triggered by starting the tick.

ADS Port Index Group Index Offset Access Data type Description Note 200 0x00000001 (RTADSGRP SYSDATA) _ 0x00000031 (RTADSOFF S SYSDATA _ TICKNOW) _ W Int Number of ticks that the Usermode Runtime should execute. Return value indicates whether the command can be processed, then ADSERR NOERR. _