P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 785 of 909
Variable
Bytes*
ab[...]
1
aw[...]
2
al[...]
4
a-z, aa-zz,
aaa-zzz
4
af[...]
8
*Required per each variable unit
When using the data EEPROM, it is important to note that the only the data values are stored.
The association of these values to any variable is not retained. Therefore, the only way to
retrieve this data is by keeping track of the EPTR value. Also, note the following:
l
If the data memory access is out of range, the syntax error flag (Bs) will be set.
l
The user program will not continue until all bytes have been saved to EEPROM.
l
When the EEPROM is busy with a read or write, status word 2, bit 13 will be indicated
(1).
EXAMPLE:
(Storing and retrieving a single 32-bit standard variable)
a
=123456789
'Assign a value to the variable "a"
EPTR
=100
'Set EEPROM pointer to 100
V
ST(a,1)
'Store into EEPROM (EPTR incremental
'to 104 automatically)
EPTR
=100
'Set EEPROM
to 100 again
VLD
(b,1)
'Load from location 100 into the variable "b"
Rb
'Report result will be: 123456789
EXAMPLE:
(Storing and retrieving a single 16-bit standard variable)
aw
[0]=32000
'Assign a value to the 16-bit "array word"(0)
EPTR
=100
'Set EEPROM pointer to 100
VST
(aw[0],1)
'Store into EEPROM (EPTR incremental
'to 102 automatically)
EPTR
=100
'Set EEPROM to 100 again
VLD
(aw[1],1)
'Load from location 100 into the variable aw[1]
Raw[1]
'Report result will be: 32000
EXAMPLE:
(Storing and retrieving a single 8-bit standard variable)
ab
[0]=126
'Assign a value to the 8-bit "array byte"(0)
EPTR
=100
'Set EEPROM pointer to 100
VST
(ab[0],1)
'Store into EEPROM (EPTR incremental
'to 101 automatically)
EPTR
=100
'Set EEPROM to 100 again
VLD
(ab[1],1)
'Load from location 100 into the variable ab[1]
Rab[1]
'Report result will be: 126
Part 2: Commands: VST(variable,number)
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...