Working with the TcCOM module
Using TcCOM objects in TwinCAT 3
- 1. Insert a new TcCOM object.
- 2. Select the corresponding TcCOM object:
- 3. Create a new cyclic task of type TwinCAT Task.
- 4. Assign the newly created task to the newly created TcCOM object. To do this, go to the instance of the TcCOM object and select the Context tab.
- You can now activate the configuration. In order to connect the TcCOM object with other modules in your TwinCAT solution beforehand, you can use the process image to create mappings.
You can view the MATLAB® code on the Block Diagram tab and observe and scope values on the fly. See MATLAB code representation.
You can also call the TcCOM object from the PLC via the TcCOM wrapper FB or even instantiate it dynamically. For more, see: Calling a TcCOM object from the PLC.
Besides working with a TcCOM object, you can also use the functions created in MATLAB® directly as a PLC function block (PLC-FB) without having to worry about a TcCOM object. See: Working with the PLC library.
Further Information