8-100Trio BASIC Commands
System Parameters and Commands
Trio Motion Technology
FLASHVR
Type:
System Function
Syntax:
FLASHVR([variable number])
Description:
Stores a single
VR()
global variable into permanent flash memory. VR variables
stored in this way will have their value restored to the current value when the unit
is powered up again. This feature is provided on controllers which do not feature
battery backed ram
VR()
storage. Each
FLASHVR
command generates a write to a
block of flash eprom. After 8000 block writes the flash sector will be erased. The
controller writes into a second sector during the erase. Each sector can be erased
over 1,000,000 times. It is therefore possible to use the FLASHVR() command many
hundreds of millions of times. It does however have a finite life and cannot easily
be replaced. Programmers MUST allow for this fact.
Note:
The FLASHVR function is provided on controllers without batteries such as the
MC202. However the FLASHVR(-1) and FLASHVR(-2) functions can be used with all
Motion Coordinator’s. These functions write a whole block of data to flash memory
and the programmer must ensure that they are only used occasionally.
The
FLASHVR
command can also be used to store the TABLE memory. By using the
command
FLASHVR(-1),
the entire contents of the TABLE memory will be written
to the flash memory.
To revert to the standard power-up mode, i.e. not reading the values from the
eprom, you should use the command
FLASHVR(-2)
Parameters:
Example 1:
VR(25)=k
FLASHVR(25)
Example 2:
FOR v=1 to 10
FLASHVR(v)
NEXT v
Example 3:
FLASHVR(-1)’ Store TABLE memory to flash eprom
variable number:
The variable to be stored into flash