Property Binding
  • 05 Feb 2024
  • PDF

Property Binding

  • PDF

Article summary

In the Property Binding section, an input source is linked to a property of the selected control. In general, simply linking an input source to a property accomplishes much of the work. Yet in some cases, additional configuration of the binding must occur to achieve the desired result. Adjusting the value type and read mode of the source and applying format masks and converters are means of further customizing displays.

Property: Shows the property being bound to and its object type. Open the dropdown menu to select from a list of the element’s properties. Properties that have binding configured are shown at the top of the list, separated by hyphens. When multiple properties have binding, a double asterisk (**) appears next to the property field as a visual indicator.

PARCgraphics Designer filters the list of available properties to only show the most logical choices, but the entire list of the control’s properties can be exposed by checking the box to the left.

Source: Specifies the input source.

Default: Uses the default source.

UTag: Use UTag as the input source. If selected, a field to specify the UTag appears. Configuration of the UTag is the same here as in the default source section.

None: No input source. If an input source has been specified, clicking this will sremove the source information from the XAML.

Type: In addition to tag values, PARCgraphics Designer can use other tag attributes as the input source.

Value: Use tag’s value.

Timestamp: Use tag value’s timestamp.

Quality: Use tag value’s quality (string).

ItemValueCollection: Not applicable.

UTag: The full UTag, including any tag switches.

DisplayId: The short tag name.

Description: The tag’s description. If modified in the UTag source configuration, uses that value.

Units: The tag’s units. If modified in the UTag source configuration, uses that value.

PlotMin: The tag’s plot min. If modified in the UTag source configuration, uses that value.

PlotMax: The tag’s plot max. If modified in the UTag source configuration, uses that value.

All: Not applicable.

Converters: Used to modify an input source’s value before evaluating the final output. Open the drop-down menu and select a converter type. Multiple converters may be used, and if so they are evaluated in the order they are specified.

When a converter is selected, a new field for the converter value appears. Click the red “X” to remove a converter.

Format: Applies a format mask to the value. Legacy feature replaced by the Mask field.

Expression: Applies an expression to the value. Uses the same syntax as expressions in PARCview’s Script Editor.

Map: Maps a value or range of values to a discrete output. For example, a tag’s values might be split into three ranges that correspond to the colors red, yellow, and green, or tag values of 0 and 1 could be mapped to the text “ON” and “OFF”. When binding to a brush-type property, a map converter is automatically provided.

Source: Specifies the data type of the input source. Select from the drop-down menu. In general, “Double” corresponds to numeric values, and “String” to text values.

Min Column: The lower bounding value.

Op Column: The logical connective, where “x” is the value of the input source.

Max Column: The upper bounding value.

Target Result: The resultant property value if the row’s logical statement equates to True. When mapping to a brush-type property, the target result field contains a color picker.

Note that in the case of defining equivalence statements, both a Min and Max Source do not need to be specified. In other words, setting the Min Source to “0”, using “= x =” as the connective, and leaving the Max Source blank would work fine.

Mask: Applies a format mask the final output. Format masks are primarily used to determine the number of significant figures that will be displayed for a numeric value. The syntax is 0’s for forced digits and #’s for unforced digits. This table demonstrates how various numeric masks (left column) would affect different values (top row):

0.00

.02

20

20.0471678

0.00

0.00

0.02

20.00

20.05

##.##

.02

20

20

#.0

.0

.0

20.0

20.0

00.##

00

00.02

20

20

Format masks can also be used to append a string of text to a value by adding text within single quotes to the end of a numeric mask. This is often used to show the units of the value. For example, a mask of 0.00‘ GPM’ would force only two digits of precision after the decimal and append the text ‘ GPM’ (note the space to leave a gap).

Value: The fallback value if the property-to-source binding of an element fails to produce an output. This value is linked to the corresponding value on the Properties panel.

Alarm: Define alarm behavior for the selected property. When alarm conditions are true, the property’s value will change depending on the configured alarm behavior. Select an existing alarm definition from the drop-down menu and then click the plus sign to apply the alarm. If (New Alarm) is selected, a new alarm definition will be created. Configure the alarm in the Alarms section or on the Alarms Panel.

Alarm Behavior: After an alarm has been applied, define the alarm behavior when the alarm conditions are true. Alarm behavior is based on applying specified property values. This can either be a static property value or a set of property values that cycle based on specified intervals. Click the plus sign next to the alarm name to add additional interval start times. Use multiple intervals to achieve a “blinking” effect, for example alternating between two or more colors or two or more text values, etc. Click the red “X” to remove the applied alarm.

Start: If 00.00, value for the selected property when the alarm conditions are first met. If more than one interval start time, enter a value, in seconds, to define the delay between property value changes. Click the red “X” to remove the interval start time.

Value: The property value to apply at the interval start time.

Duration: The total duration of the alarm behavior cycle.


Was this article helpful?

What's Next