User manual

PD-1021 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-30) 45
www.trinamic.com
3.5.25 GCO (get coordinate)
This command makes possible to read out a previously stored coordinate. In standalone mode the
requested value is copied to the accumulator register for further processing purposes such as
conditioned jumps. In direct mode, the value is only output in the value field of the reply, without
affecting the accumulator. 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 desired value is read out of the internal coordinate array, copied to the
accumulator register and -in direct mode- returned in the “value” field of the reply.
Related commands: SCO, CCO, MVP
Mnemonic: GCO <coordinate number>, 0
Binary representation:
INSTRUCTION NO.
TYPE
MOT/BANK
VALUE
31
<coordinate number>
(0… 20)
0*
(don't care)
* Motor number is always 0 as only one motor is involved
Reply in direct mode:
STATUS
VALUE
100 OK
(don't care)
Example:
Get motor value of coordinate 1
Mnemonic: GCO 1, 0
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
$1f
$01
$00
$00
$00
$00
$00
Reply:
Byte Index
0
1
2
3
4
5
6
7
Function
Target-
address
Target-
address
Status
Instructio
n
Operand
Byte3
Operand
Byte2
Operand
Byte1
Operand
Byte0
Value (hex)
$02
$01
$64
$0a
$00
$00
$00
$00
Value: 0
Note:
Two special functions of this command have been introduced that make it possible to copy all
coordinates or one selected coordinate from the EEPROM to the RAM.
THESE FUNCTIONS CAN BE ACCESSED USING THE FOLLOWING SPECIAL FORMS OF THE GCO COMMAND:
GCO 0, 255, 0 copies all coordinates (except coordinate number 0) from the
EEPROM to the RAM.
GCO <coordinate number>, 255, 0 copies the coordinate selected by <coordinate number> from the
EEPROM to the RAM. The coordinate number must be a value
between 1 and 20.