PLC attribute functionality
PLC attributes can be used to configure the TwinCAT Process HMI control and pass some current data to its elements from an FB created by the user. Two actions are necessary for this:
- add the PLC attributes in the FB
- map the FB to the control
![]() | Naming FBs with PLC attributes To work correctly, user FB names should not contain DataAssembly names from the MTP Specification (Part 3), i.e. “BinVlv”, “AnaView”, etc. as part of them. These names are a part of MTP Runtime Library FB names, for example, FB_MTP_BinVlv, FB_MTP_AnaView (see manual for the TF8400 | MTP Runtime). |
PLC attributes can be divided into two types:
- Configuration PLC attributes: define some properties and behavior of the control when the TwinCAT HMI page starts.
- Data PLC attributes: define variables which represent values of the control elements when the TwinCAT HMI page is running.
In this chapter, a list of the attributes is given. Detailed information on how to use the attributes in the PLC program is given in the Using PLC attribute functionality chapter.
![]() | Using [ ] in the code templates Text enclosed in square brackets [ ] in templates for code means a placeholder which should be changed to relevant text. |
The full attribute name is 'TcHmi.ProcessLibrary.[Attribute Name]', where:
TcHmi.ProcessLibraryis a fixed part.[Attribute Name]can contain only one name (i.e. RestoreBounds) or several names in hierarchical order, separated by ‘.’ (i.e. FaceplateControl.TargetFile).
