omron — A2W_Pushbutton_Brochure_EN_201805_A47IE01

2 - 2 - 4 Differences between Variable, Expression, and Value The title of the field in which a variable is assigned for an object varies from [Variable] to [Expression] to [Value], depending on the object or item. The indication of [Variable] is mainly used by the objects such as Data Edit or Button that write values. You can only set a variable in this field. The indication of [Expression] is mainly used by the objects such as Data Display or Lamp that read values, in the fields for specifying startup conditions or display targets. You can set arithmetic expressions in addition to variables. The indication of [Value] is mainly used by the objects that write fixed values or variable values.

While you can only set a variable in the [Variable] field, you can also enter an arithmetic expression in this field. Thus, you can enter a value obtained by adding a fixed value to a variable value. Variable: Only a variable can be set. Value: As is the case with Expression, an arithmetic expression can be entered in addition to variables. * In the example below, the value obtained by adding Variable “SampleB” and Variable “SampleC” is stored in Variable “SampleD”. [Expression] is mainly used in the [Properties] tab, and [Value] in the [Events and Actions] tab. The figure on the left shows the settings on the [Events and Actions] tab for a Label object.

In [Expression] and [Value], you can use exponentiations and remainders besides the four arithmetic operations. 14 Expression: An arithmetic expression can be entered in addition to variables.