Block diagram
When generating a TwinCAT object from MATLAB® or Simulink®, the block diagram (Target for Simulink®) or the MATLAB® code (Target for MATLAB®) can optionally be exported as well. In this case, the block diagram or the MATLAB® code can be displayed in the TwinCAT development environment under the Block Diagram tab of the TcCOM instance:

Using this control, you can navigate through the entire structure of the block diagram or view the underlying MATLAB® code, and also view and change parameter values, display signal values and curves, and debug through the module using breakpoints in debugging mode. The control is designed such that it can also be used in a separate visualization.
The version number of the block diagram can be viewed by right-clicking in the control and selecting About TC3 BlockDiagram. Alternatively, you can view the version number in the Windows Control Panel under Programs and Features (entry: Beckhoff TwinCAT 3 BlockDiagram).
Installation
TwinCAT 3.1 Build 4024
The TwinCAT Block Diagram Setup is executed with the TwinCAT 3 XAE or Full Setup and does not have to be executed separately. The TwinCAT Block Diagram Setup is also supplied via the TE14xx TwinCAT Tools for MATLAB®.
TwinCAT 3.1 Build 4026
Install the following workload via the TwinCAT Package Manager:
Command line: tcpkg install TwinCAT.XAE.BlockDiagramClassic