Input Binding Format

<< Click to Display Table of Contents >>

Manual > Screen Creation Guide > Binding > Manual Settings Tab >

Input Binding Format

Input Binding Format

There are three ways to format the input binding:

 

1) "IN: Tag name"

 

This is the simplest example. You write the tag name directly, such as "IN:U01.F01.T01". When the tag value changes, the tag value is automatically reflected in the property.

 

example)

 

IN:U01.F01.T01

 

 

hint

You can also specify other property names that your control has in the bind condition by enclosing the property name in "$".

 

IN:$Property name$

 

 

 

2) "IN: Formula"

 

The following calculation formulas can be written in the bind formula. Function calls are also possible.

 

Example 1)

 

Set the property to the average value of tags U01.F01.T01 and U01.F01.T02.

 

IN:(U01.F01.T01 + U01.F01.T02) / 2

 

 

Example 2)

 

Here is an example of using functions. The Math.Ave function sets the average value of each tag to a property.

 

IN:Math.Ave(c(U01.F01.T01, U01.F01.T02, U01.F01.T03))

 

 

3) "IN:Condition"

 

You can also write a conditional expression in the bind format. For example, you can switch the value set in a property depending on the evaluation of a tag value. The "B.In" function is provided as a function specifically for binds to define conditional expressions. This section explains how to write a conditional expression using the B.In function.

 

The B.In function returns the result value that corresponds to the judgment condition by passing a combination of the judgment condition and its result value as a parameter. There is no particular upper limit to the number of combinations of judgment conditions and result values, and they can be described by enumerating judgment condition 1, result value 1, judgment condition 2, result value 2, ..., default value (the value when none of the judgment conditions are met).

 

Below are some concrete examples:

 

Example 1)

 

If you define the following bind format for the FillColor property, the property will be set to "#FF0000" (red) when U01.F01.T01 is ON, and to "#000000" (black) otherwise (when it is OFF).

 

IN:B.In("",T,U01.F01.T01,"#FF0000","#000000")

 

Example 2)

 

If the following bind format is defined for the Text property, the string "TRIP" will be set if U01.F01.T01 is greater than 10, "ALARM" will be set if it is less than or equal to 10 and greater than 5, and "NORMAL" will be set in all other cases.

 

IN:B.In("",T,U01.F01.T01 > 10,"TRIP",U01.F01.T01 > 5,"ALARM","NORMAL")

 

Example 3)

 

If the following bind format is defined for the FillColor property, the property will be set to blinking red (blinking at #FF0000 and #800000) when U01.F01.T01 is greater than 10, and green (#00FF00) in all other cases. It is also possible to define a function for the B.In parameter, and below the blinking process is implemented using the "B.BF" function (bind function for blinking process).

 

IN:B.In("",T,U01.F01.T01 > 10,B.BF("@FAST","#FF0000","#800000"),"#00FF00")

 

 

hint

The B.In function allows you to specify the display format of the number format and date format as a filter. Specify the filter string in the first argument and the application condition in the second argument. For example, you can flexibly define the number of decimal places to display, whether to display comma separators, etc.

For details, see the description of the "B.In" function.

 

hint

The input binding can omit "IN:".For example, "U01.F01.T01" will be interpreted as "IN:U01.F01.T01" ("OUT:" and "INOUT:" cannot be omitted).

 

hint

You can also specify other property names that your control has in the bind condition by enclosing the property name in "$".

 

IN:B.In("",T,U01.F01.T01 > $_Limit1$,$_TripLabel$,U01.F01.T01 > $_Limit2$,$_AlarmLabel$,$_NormalLabel$)

 

 

 

Input Binding Format (Old Format)

Here we will explain the format for conditional judgment using the old format.

 

Conditional expressions in the old format are expressed with curly braces "{ }" and commas, as follows:

 

{Condition 1}{Condition value 1}, {Condition 2}{Condition value 2}, … ,{default}{ Default value}

 

The process goes like this: first {Condition 1} is evaluated, and if it is TRUE, {Condition Value 1} is set to the property. If {Condition 1} is FALSE, then {Condition 2} is evaluated, and if {Condition 2} is TRUE, {Condition Value 2} is set to the property. In this way, when multiple conditions are specified, the conditions are evaluated in order from the left, and if none of the conditions are met, the {Default value} is set. You can also use formulas and functions in the conditions and condition values.

 

If the truth value of a condition is expressed as a number, the result of the condition is"Non-zero" status is TRUEand the result of the condition is"0" is FALSEFor example, if you use the numeric tag #D0 as the condition and set it as {#D0}, any value other than 0 for #D0 will be considered TRUE, and that condition value will be set in the property.

 

Below are some concrete examples:

 

Example 1)

 

If you define the following bind format for the FillColor property, when U01.F01.T01 is ON, the property will be set to "#FF0000" (red), and otherwise (when it is OFF), the property will be set to "#000000" (black).

 

IN:{U01.F01.T01}{"#FF0000"},{default}{"#000000"}

 

Example 2)

 

If the following bind format is defined for the Text property, the string "TRIP" will be set if U01.F01.T01 is greater than 10, "ALARM" will be set if it is less than or equal to 10 and greater than 5, and "NORMAL" will be set in all other cases.

 

IN:{U01.F01.T01 > 10}{"TRIP"},{U01.F01.T01 > 5}{"ALARM"},{default}{"NORMAL"}

 

 

hint

The old format is for Ver5 and earlier, and can be used in Ver6 and later for compatibility with older versions, but we recommend using the B.In function when defining conditional expressions for Ver6 and later. The B.In function allows for more flexible definitions, such as the ability to format numbers and dates, and nest functions (for example, writing B.In further).

 

attention

When specifying a conditional expression in the old format, be sure not to forget the comma (,) that separates the conditions. In the case of {A}{AA},{B}{BB}, a comma (,) is required between {AA} and {B}.