InduSoft Web Studio provides several features to increase your productivity when designing, developing, deploying, and maintaining HMI/SCADA applications. The “Custom Properties” (also known as “Mnemonics”) allow you to re-use graphical Symbols or even entire screens and dynamically assign different data sources (tags) to them based on the current context.
5. Definition
Custom Properties (also known as Mnemonics)
are place holders (aliases) that can configured to
screen scripts, screen animations and objects
properties.
6. Goal / Benefit
Custom Properties allows you to configure
generic Symbols or generic screens, and assign
values, tags, or expressions to their properties
dynamically during the runtime. Therefore, you
can re-use your “templates” of symbols and
screens, improving productivity and enhancing
overall consistency and quality.
8. Syntax
#CustomPropertyName:CustomPropertyValue
Where:
CustomPropertyName = Identifier (alias name) of the
custom property.
CustomPropertyValue = Actual (default) value of the
custom property. It can be a literal value (numeric or
alphanumeric), a tag, or even an expression between
parentheses. It can also be omitted (no default value),
so there is no default value for the custom property, but
its value can still be set dynamically during the runtime.
9. Runtime behavior
During the runtime, only the CustomPropertyValue
is used and the remaining text from the
aforementioned syntax is ignored. Examples:
Custom Property
(full syntax)
Custom Property Name
(alias used as identifier)
Custom Property Value
(used during the runtime)
#MyNumValue:10 MyNumValue 10
#MyTextValue:”ABC” MyTextValue “ABC”
#MyTag:Second MyTag Second
#MyExpression:(Minute*10) MyExpression (Minute*10)
11. $Open() built-in function
Pass Mnemonic values through the function:
Syntax: $Open(ScreenName, X1, Y1, X2, Y2, Resize, ID, CustomPropertyList)
Example: $Open("Popup", -1, -1, -1, -1, 0, 0, "#MyNumber:10 #MyText:""ABC""")
Pass Mnemonic values through an external file:
Syntax: $Open(ScreenName, X1, Y1, X2, Y2, Resize, ID, FileName)
Example: $Open("Popup", -1, -1, -1, -1, 0, 0, “MyMnemonic1")
Remarks: The text file must be saved on the Web sub-folder of the project, with the
extension “.mne”. Each Custom Property must be configured in a different line of the file,
as illustrated below:
13. Tag Fields
Replace Custom Property value partially using tag fields
configured on the objects and animations.
Assume you have a screen where you configure the following syntaxes on different objects:
#MyTag:Minute
#MyTag:Minute->Min
#MyTag:Minute->Max
#MyTag:Minute->Unit
$Open("MyScreen", -1, -1, -1, -1, 0, 0, "#MyCustomProperty:Second")
This function will replace values as indicated in the following table:
Custom Property configured on the
objects and animations
Custom Property passed by the built-in function $Open()
Actual value executed during the
runtime
#MyCustomProperty:Minute #MyCustomProperty:Second Second
#MyCustomProperty:Minute->Min #MyCustomProperty:Second Second->Min
#MyCustomProperty:Minute->Max #MyCustomProperty:Second Second->Max
#MyCustomProperty:Minute->Unit #MyCustomProperty:Second Second->Unit
14. Class Tags
Replace Custom Property value partially using class tags on
the objects and animations
Assume you have a screen where you configure the following syntaxes on different objects:
#MyTag:MyTagA.MemberX
#MyTag:MyTagA.MemberY
#MyTag:MyTagA.MemberZ
$Open("MyScreen", -1, -1, -1, -1, 0, 0, "#MyCustomProperty:MyTagB")
This function will replace values as indicated in the following table:
Custom Property configured on the objects
and animations
Custom Property passed by the built-in function
$Open()
Actual value executed during the
runtime
#MyCustomProperty:MyTagA.MemberX #MyCustomProperty:MyTagB MyTagB.MemberX
#MyCustomProperty:MyTagA.MemberY #MyCustomProperty:MyTagB MyTagB.MemberX
#MyCustomProperty:MyTagA.MemberZ #MyCustomProperty:MyTagB MyTagB.MemberX
15. Array Tags
Replace Custom Property value partially using array tags
Assume you have a screen where you configure the following syntaxes on different objects:
#MyTag:MyArray[1]
#MyTag:MyArray[2]
#MyTag:MyArray[3]
$Open("MyScreen", -1, -1, -1, -1, 0, 0, "#MyCustomProperty:NewArray")
This function will replace values as indicated in the following table:
Custom Property configured on the objects
and animations
Custom Property passed by the built-in function
$Open()
Actual value executed during the
runtime
#MyCustomProperty:MyArray[1] #MyCustomProperty:NewArray NewArray[1]
#MyCustomProperty:MyArray[2] #MyCustomProperty:NewArray NewArray[2]
#MyCustomProperty:MyArray[3] #MyCustomProperty:NewArray NewArray[3]