TwinCAT Input and Output modules
TwinCAT-specific input and output function blocks can optionally be used in Simulink®. Another valid way is to use the standard input ports (In) and output ports (Out) of Simulink®. This is usually also the best practice way, unless the additional functions of the TwinCAT input and output modules described below are required.
Additional functions of the TC Module blocks
If you use the input function blocks (TC Module Input) and output function blocks (TC Module Output) provided by Beckhoff, you will benefit from the following additional functionalities, compared to the standard Simulink® input and output ports:
- You can also define signals and buses from subsystems directly as inputs or outputs for TcCOM, without first transferring the signals/buses from the subsystem to the top system. Sample: Subsystem inputs and outputs.
- You can optionally store an automatic mapping to other TcCOM or I/Os in the block parameters so that the mapping is executed automatically directly when the TcCOM is instantiated, see Automatic mapping.
- You can select individually between Mapping and DataPointer for the connection type of each TC Module Inputs/Outputs. You can make all Standard Input Ports accessible via mapping, for example, and make others accessible via the TC Module Inputs via DataPointer, see DataArea or DataPointer.
Sample: Shared memory between TcCOM instances. - You can influence the Symbol Name, i.e. change the name and hierarchy of the input or output in the process image, for example, see Symbol Name.
- You can equip signals and buses with specific Symbol Properties, see Symbol properties.
- You can use initial values for inputs. To do this, set the Value of the TC Module Inputs to any value, see Initial values.
Initial values can also be implemented for Standard Input Ports, see Option Input: Initial values under TC TcCom Interfaces. |
When using automatic mapping, please note that if the TcCOM is instantiated more than once in TwinCAT, you will end up with a mapping conflict which you must resolve by manual mapping. This option is therefore not recommended for multiple instantiations.