User manual

TMCM-1140 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-27) 48
www.trinamic.com
3.6.24 SCO (set coordinate)
Up to 20 position values (coordinates) can be stored for every axis for use with the MVP COORD command.
This command sets a coordinate to a specified value. Depending on the global parameter 84, the
coordinates are only stored in RAM or also stored in the EEPROM and copied back on startup (with the
default setting the coordinates are stored in RAM only).
Please note that the coordinate number 0 is always stored in RAM only.
Internal function: the passed value is stored in the internal position array.
Related commands: GCO, CCO, MVP
Mnemonic: SCO <coordinate number>, 0, <position>
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
30
<coordinate number>
0… 20
0
<position>
-2
31
… +2
31
Reply in direct mode:
STATUS
VALUE
100 OK
don’t care
Example:
Set coordinate #1 of motor to 1000
Mnemonic: SCO 1, 0, 1000
Binary:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Instruction
Number
Type
Motor/
Bank
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$01
$1e
$01
$00
$00
$00
$03
$e8
Note:
Two special functions of this command have been introduced that make it possible to copy all coordinates
or one selected coordinate to the EEPROM.
THESE FUNCTIONS CAN BE ACCESSED USING THE FOLLOWING SPECIAL FORMS OF THE SCO COMMAND:
SCO 0, 255, 0 copies all coordinates (except coordinate number 0) from RAM to
the EEPROM.
SCO <coordinate number>, 255, 0 copies the coordinate selected by <coordinate number> to the
EEPROM. The coordinate number must be a value between 1 and
20.