Configuring and installing the PLC library
Configuring the type and variable prefixes
You can configure your individual type and variable prefixes to be used in the created PLC library at Code Generation > TC PLC Library. By default, the variable prefixes are generated according to this convention (see Identifiers for variables and intances).
Enter the desired prefixes as pipe-seperated list.
Installing the PLC library
As described above, you can configure which function blocks (PLC-FB and/or TcCOM-Wrapper-FB) should be included in your PLC library. In order to use the created function blocks in the PLC, the corresponding PLC library must be installed on your TwinCAT engineering system.
Situation 1:
- You use the Target for Simulink® on the same PC on which you want to program your PLC.
- 1. Create a PLC library and install it directly on your local engineering system from Simulink®.
- 2. To do this, select the appropriate checkboxes at TC PLC Library:
- After a successful build, the new version of the PLC library is directly available in the local TwinCAT XAE.
Situation 2:
- You want to use the PLC library on any TwinCAT XAE systems.
- 1. Create a TMX archive.
- 2. Copy the TMX archive to a TwinCAT engineering system of your choice.
- 3. Install the PLC library when unpacking the TMX archive.
- The library contained in the archive is available in TwinCAT XAE.