Variables with range specifications are not checked for changes in variable values that result
from the execution of instructions in the user program. To check the range of values for a variable
that are set from execution of the user program, use instructions that perform range checks.
You cannot perform any checks beforehand if you set data with arithmetic processing results. In
this case, check the range of values after arithmetic processing (e.g., ADD).
Make sure that the initial value is within the range specified for the Range Specification. If the ini-
tial value field on the Sysmac Studio is left blank, an initial value of 0 is used. This applies even if
a range that does not include 0 is set for a Range Specification.
This section describes the variable attributes other than the Data Type.
The variable name is used to identify the variable. Each variable in a POU must have a unique name.
However, you can declare local variables with the same variable name in different POUs. These are
treated as two separate variables.
Refer to 6-3-12 Restrictions on Variable Names and Other Program-related Names for restrictions on
variable names.
6-3-8 Variable Attributes
Variable Name
Variable Table
Variable i
Variable x
ChkRange
EN
In
Val
MOVE
Variable name Data type
Variable x INT(10 .. 100)
Variable i
Variable
EN
In Out
ENO
Variable A
Variable tmp
ChkRange
EN
In
Val
Variable AVariable tmp
MOVE
Variable tmp
ADD
EN
In1
In2
Variable Table
Variable name Data type
Variable A INT(10 .. 100)
If the results of the arithmetic
processing are within the range, set
variable A to the value.
EN
In Out
ENO
ENO