Blacklisting and whitelisting
With version 1.12, it is possible to use black or whitelisting for PLC symbols. With black or whitelisting, PLC symbols can be explicitly hidden or shown for use in the HMI. For this, you can tag the corresponding variables in the PLC with an attribute pragma. In the default case, blacklisting is active, which means that you have access to all variables of the PLC that are not explicitly hidden for the HMI. On the configuration page of the ADS extension, you can switch between black and whitelisting (Use whitelisting).
The following attribute pragmas are available for black or whitelisting in the TwinCAT HMI:
{ attribute 'TcHmiSymbol.Show' }
{ attribute 'TcHmiSymbol.ShowRecursively' }
{ attribute 'TcHmiSymbol.Hide' }
{ attribute 'TcHmiSymbol.ReadOnly' }
{ attribute 'TcHmiSymbol.BLOB' }
Use:
- TcHmiSymbol.Show: If a variable has this attribute, it will be displayed in the HMI in case of whitelisting. With this attribute only the first level is displayed (example: only the struct, but not the sub-elements). The attribute has no effect on blacklisting.
- TcHmiSymbol.ShowRecursively: If a variable has this attribute, it is displayed with all sub-elements in the HMI in the case of whitelisting (e.g. structure or function block with all sub-elements). Variables in the sub-elements that are blacklisted with TcHmiSymbol.Hide are not displayed.
- TcHmiSymbol.Hide: If a variable has this attribute, it will not be displayed in the HMI in case of blacklisting. All variables without an attribute are displayed. If the attribute is used with a structure, all sub-elements are also hidden in the HMI, even if they are tagged with TcHmiSymbol.Show.
- TcHmiSymbol.ReadOnly: If a variable has this attribute, the variable with all sub-elements cannot be written in the HMI.
- TcHmiSymbol.BLOB: If a variable has this attribute, the data is transferred to the server and the client in binary form (reduction of packet size). The data must be converted in the client itself.
Blacklisting overrides whitelisting. With blacklisting, all variables are visible in the HMI, except variables with the attribute TcHmi-Symbol.Hide. With whitelisting, no variables are visible in the HMI except variables with the attributes TcHmiSymbol.Show and TcHmiSymbol.ShowRecursively. |
Available from version 1.12. |