Binding Properties to Tags
A Tag binding is a very straight-forward binding type. It simply binds a property directly to a Tag. This sets up a subscription for that Tag, and every time the chosen Tag changes, the binding is evaluated, pushing the new value into the bound property.
If you choose a Tag in the tree, and not a specific property of that Tag, the Value property is assumed.
Drag and Drop
You can quickly bind a Tag by dragging it from the Tag Browser into a component or into the component property. In the Property Editor, the properties that have the new bindings will display in bold font along with a binding icon.
Binding to a Component
Ignition automatically creates the Tag bindings to several of the component properties when you choose to bind a Tag to a component by dragging and dropping . In addition, some of the bindings will be bidirectional or they may be expression bindings. How Ignition handles the binding depends on the disparity between the datatypes of the Tag and the target component. For example, binding a numerical Tag to a label component will result in an expression binding that formats the number to a string.
Binding to a Component Property
Ignition automatically creates a Tag binding to the property that you dropped the Tag on to resulting in the property binding to the value of the Tag. In addition, it is possible to bind the Tag attributes to the component's property. For example, the Tag's Engineering High Limit attribute could be bound to the capacity property of a cylindrical tank component.
Tag bindings can be made bidirectional simply by checking the Bidirectional checkbox at the bottom of the Property Binding window. A Tag can be set as a bidirectional binding, if it has a read/write permission and if the user has the security permission to write to the Tag. The Fallback Delay is the amount of time that the value will remain at the written value, waiting for a Tag change to come in. If no Tag change comes in within the allotted time (specified in seconds), the property will fall-back to the value as it was before the write. This is needed, because sometimes even if a write succeeds, another write or ladder logic in a PLC might have written something different, even the old value, in which case no Tag change event will be generated. As a rule of thumb, the fallback delay should be twice the Tag's scan class rate.
Bindings and Tag Properties
Aside from binding a property to a Tag's value, you can also bind to properties on a Tag, such as Tooltip or AlarmActiveAckCount. This is useful when you don't need the value of the Tag, but rather the state, or some other configuration on the Tag.
Here we see two boolean Memory Tags. Each Tag has an alarm that will go active when the value on the Tag is high.
The simplest approach involves a Tag Binding. This can be achieved by simply dragging-and-dropping the Tag Property onto a Window, component, or component property: similar to creating a standard Tag Binding, except we're using a property on the Tag instead of the Tag's value. The resulting Tag Binding would look like the image below. Note that the property name has been appended to the path below the Choose Tag tree:
- No labels