TcBaseModuleRegistered2

TcBaseModuleRegistered2 1:

FUNCTION_BLOCK TcBaseModuleRegistered2 EXTENDS TcBaseModule
VAR_OUTPUT
    objID : OTCID;
END_VAR

Description

If something is inherited from this object, a TcCOM object can be created from a function block. The object is automatically registered at the object server and ramped up to OP state. The own object ID is provided at the output.

Methods which are additionally implemented and are to be offered via this object must have a return value of the type HRESULT and must be implemented in a thread-safe manner. For more information, refer to chapter 'Multi-task data access synchronization in the PLC'. How to create this TcCOM object and use it globally in the TwinCAT system is explained in detail in an example for TcBaseModuleRegistered. The TcBaseModule base class implements the ITComObject interface, which in turn expands the ITcUnknown interface.

ITComObject Interface

The ITComObject interface is implemented by every TwinCAT module. It makes functionalities available regarding the state machine and Information from/to the TwinCAT system.

Requirements

TwinCAT version

Hardware

Libraries to be integrated

TwinCAT 3.1, Build 4024

x86, x64, ARM

Tc3_Module >= v3.3.23.0