Working with the PLC library
In addition to the TcCOM object, a PLC library can also be created. This PLC library contains two different types of function blocks:
- The function block FB_<modelname> in the folder POU contains the full functionality of the Simulink® model, i.e. the source code is directly anchored in the FB. This FB is called PLC-FB in the following.
- The subfolder POU/TcCOM Wrapper contains FBs that are wrappers for a TcCOM object, i.e. the functionality is not directly in the FB but is outsourced to an instance of a TcCOM. The wrappers are called TcCOM-Wrapper-FB in the following.
Brief overview
- Create PLC project:
- Load PLC library:
- View content of the PLC library:
- Instantiate function block FB_<modelname> (PLC-FB) and use in PLC code:
- Alternatively: use TcCOM Wrapper FB and use it in the PLC code: