# Data Binding

In addition to setting fixed values directly for the settings (properties) of a function or object, you can define values indirectly associating with other properties.

The property values are synchronized with each other between the property and the associated other properties. This feature allows for dynamic and flexible screen design. The ability to associate a property with other property is called "Data Binding".

When describing Data Binding, the properties to be set and their associated properties are referred to as "Binding Target" and "Binding Source" respectively.

Note: The Data Binding support depends on each property. You can check the Data Binding supports from the "Data Binding Support:" section in the each property information.

Hide Show

1. Data Binding Use Cases
2. Types of Binding Sources
3. Data Binding "Direction"
4. Converts the value of a Binding Source (Converter)

## Data Binding Use Cases

As an example of Data Binding, a Date/Time Display [Current Value] property is associated with a property that contains the date/time of the display unit. In this case, the [Current Value] property is the Binding Target and the property containing the date and time is the Binding Source.

On the display unit, the Date/Time Display shows the display unit's date and time. Changing a value in the Date/Time Display can also change the display unit's date and time.

1. In the [Date/Time Display] properties, click the square icon (called "Property Marker") next to [Current Value] and select [Target].
2. In the property selector select the Binding Source property. Select 'Target01' from [Source Object], and then select 'DateAndTime.DateTime' from [Source Property].
3. Click [OK]. The source property appears in the [Current Value] field.
4. Select [Two Way] from [Direction].

When you set up Data Binding, the Binding Source associated with a Binding Target is displayed as a period-delimited string as follows.

Object |
Variable |

a. Source Object

b. Source Property

## Types of Binding Sources

Binding Sources are categorized by usage. When you set up the Binding Source, you also select the type first. The following shows usage of each type.

Type | Usage
[ Alarm] | Specify properties for common alarm settings, alarm groups, alarms, and operation logs.
[ Variable] | Specify the variable and its properties.
[ Local Variable] | Specify the local variable and its properties.
[ Graphical Objects] | Specify properties for screens, content, layout objects, shapes, and parts.
[ Target] | Specify the properties of the target settings.
[ Equipment] | Specify the properties of the Equipment settings.
[ Recipe] | Specify the properties of recipe controls, recipe families, recipe groups, recipes, and recipe data.
[ Language Table Text] | Specify the Language Text ID.
[ Language Table ID] | Specify the Language Text ID indirectly by selecting variable.
[ Language Table Local ID] | Specify the Language Text Local ID indirectly by selecting a local variable.

## Data Binding "Direction"

Data Binding allows you to choose the direction in which the property values are reflected between the Binding Target and the Binding Source.

Direction | Description
[Two Way] | The value is reflected in both directions between the Binding Target and the Binding Source.
[One Way] | The value is reflected from the Binding Source to the Binding Target, but the value is not reflected from the Binding Target to the Binding Source. Note: Clear the checkbox if the Binding Target object has the [Enable Input Mode] property. If the checkbox is selected, an error is displayed.

Set the direction in the Property selector window where you select the Binding Source.

## Converts the value of a Binding Source (Converter)

The converter allows you to convert the Binding Source value to reflect the Binding Target by any rule. For example, if you use a scale converter that converts a Binding Source value to 1/100th, if 500 is entered in the Binding Source, the Binding Target will reflect 5.

The Expression converter and Range converter support only [One Way] in the [Direction].

Note: For more information about Converter, refer the following.
Types of Converters