140
Command, function and parameter description
Section 6-3
Description:
The FLASHVR command is used to store VR or Table variable data into the
Flash memory. After the data has been stored, at each power up the VR and
Table data will be restored to the values held in Flash memory. Storing the
data in Flash memory for this Unit is required as data in RAM is not contained
when power is down. The command will write either a single VR variable or
the entire Table array.
Although the Table array is updated correctly with the Flash memory data at
start-up, the Table pointer (TSIZE parameter) is zero. To able to access the
Table data, a write operation needs to be performed to the Table variable with
address one higher than the highest variable used.
Note
1.
When the entire Table array is restored from Flash memory at start-up, the
Table has not yet been initialised. To initialise the Table for the range used
in the application, write a value to the Table variable with address one
higher than used. From that moment the Table variables can be accessed.
2.
Each FLASHVR command generates a write to a block of the Flash mem-
ory. Although this memory allows numerous writes and erases, it has a lim-
ited life cycle. Programmers should be aware of this fact and use the
command as limited as possible.
Arguments:
address
The address of the VR variable. Range: [0, 250]. To write the Table data into
the following options are used
FLASHVR(-1)
Write entire Table array
FLASHVR(-2)
Cancel update of Table data at start-up
See also:
EPROM
6-3-79
FOR TO STEP NEXT
Type:
Structural Command
Syntax:
FOR
variable
=
start
TO
end
[
STEP
increment
]
<commands>
NEXT
variable
Description:
The FOR ... NEXT loop allows the program segment between the FOR and
the NEXT statement to be repeated a number of times.
On entering this loop, the
variable
is initialized to the value of
start
and the
block of commands is then executed. Upon reaching the NEXT command, the
variable
is increased by the
increment
specified after STEP. The STEP value
can be positive or negative, if omitted the value is assumed to be 1.
While
variable
is less than or equal to
end,
the block of commands is repeat-
edly executed until
variable
is greater than
end,
at which time program execu-
tion will continue after NEXT.
Precautions:
FOR ... NEXT statements can be nested up to 8 levels deep in a BASIC pro-
gram.
Arguments:
variable
Any valid BASIC expression.
start
Any valid BASIC expression.
end
Any valid BASIC expression.
increment
Any valid BASIC expression.
See also:
REPEAT, WHILE