Binding Properties
Property Binding is perhaps the most important concept to understand when designing a project using the Vision module. It is primarily through property binding that you bring windows to life, and have them do useful things. A property binding simply links one component's property to another on the same window.
When you initially place a component on a screen, it doesn't really do anything. Changing its properties in the Designer will make it look or act different, but it has no connection to the real world and this is what property binding adds.
Property binding, as its name suggests, lets you bind a property to something else, and that something else could be:
-
An OPC Tag
-
The results of a SQL query executed against a remote database
-
Some other component's property
-
An expression involving any of these things
-
The results of a Python script
-
and so on...
For example, bind the Value property of an LED Display to an OPC Tag, and voilà - the value property will always be the value of that tag - creating a dynamic display. Bindings can also work the other way, using a bidirectional binding. Bind the value of a numeric text box to a tag, and that tag will be written to when someone edits the value in the text box.
The power of property bindings comes from the variety of different binding types that exist, and the fact that you can bind nearly any property of a component to anything else. Want its foreground to turn red when an alarm is above a certain severity? Bind its LED Lit (glyphForeground) color to a tag's AlertCurrentSeverity property. Want it to only appear if a supervisor is on shift? Bind its visible property to the result of a SQL query that joins a personnel table with a shift table. The possibilities are, quite literally, endless.
Property Binding Types
A property can have many different types of binding, for example it can have a Tag or an Expression binding. The following is a list of the different binding types for a property:
-
Tag
-
Indirect Tag
-
Tags Historian
-
Property
-
Expression
-
Database Browse
-
SQL Query
-
Cell Update
-
Function
In this section ...