Modules | Module-to-module communication Transition: SAFEOP to OP (SO) The state transition from SAFEOP to OP, the state OP, and the transition from OP to SAFEOP take place in the real-time context. System resources may no longer be allocated. On the other hand, resources can now be requested by other modules, and modules can register with other modules, e.g. in order to obtain a cyclic call during tasks. This transition should not be used for long-running tasks. For example, file operations should be executed during PS. State: OP In OP state the module starts working and is fully active in the meaning of the TwinCAT system. Transition:
OP to SAFEOP (OS) This state transition takes place in the real-time context. All actions from the SO transition are reversed, and all resources requested during the SO transition are released again. Transition: SAFEOP to PREOP (SP) All actions from the PS transition are reversed, and all resources requested during the PS transition are released again. Transition: PREOP to INIT (PI) All actions from the IP transition are reversed, and all resources requested during the IP transition are released again. The module signs off from the ObjectServer and usually deletes itself (see "Service life").
6.2 Module-to-module communication | Module-to-module communication TcCOM modules can communicate with one another. This article is intended to provide an overview of the various options. There are four methods of module-to-module communication: IO Mapping (linking of input/output symbols) IO Data Pointer Method calls via interface ADS These four methods will now be described. IO Mapping (linking of input/output symbols) The inputs and outputs of TcCOM modules can be linked by IO Mapping in the same way as the links to physical symbols in the fieldbus level. To do this, data areas are created in the TMC editor [ } 119] that describe the corresponding inputs/outputs.
These are then linked in the TwinCAT solution. Mapping is used to provide or transfer data from one module to another. Data consistency is ensured by synchronous or asynchronous mapping, which is carried out after or before the actual cyclic program sequence. The implementing language (PLC, C++, Matlab ® ) is irrelevant. The following sample shows the implementation: TwinCAT 3 46 Version: 1.19.1