Applied Motion RS-232 User Manual

Page 294

Advertising
background image

294

920-0002 Rev. I
2/2013

Host Command Reference

Example 3: read absolute position

opcode

0x88 read 32 bit abs posn/enc posn, from Table 2

operand 1

from Table 2, indicates abs posn

return value

0x87654321

Type 2 Command Message Payload

Type 2 Response Message Payload

byte 0

0

reserved

byte 0

0

reserved

byte 1

2

message type

byte 1

2

message type

byte 2

88

opcode

byte 2

88

opcode

byte 3

1

operand

byte 3

1

operand

byte 4

0

not used

byte 4

87

read data MSB

byte 5

0

not used

byte 5

65

read data 2nd MSB

byte 6

0

not used

byte 6

43

read data 2nd LSB

byte 7

0

not used

byte 7

21

read data LSB

Example 4: read encoder position

opcode

0x88 read 32 bit abs posn/enc posn, from Table 2

operand 0

from Table 2, indicates enc posn

return value

0x12345678

Type 2 Command Message Payload

Type 2 Response Message Payload

byte 0

0

reserved

byte 0

0

reserved

byte 1

2

message type

byte 1

2

message type

byte 2

88

opcode

byte 2

88

opcode

byte 3

0

operand

byte 3

0

operand

byte 4

0

not used

byte 4

12

read data MSB

byte 5

0

not used

byte 5

34

read data 2nd MSB

byte 6

0

not used

byte 6

56

read data 2nd LSB

byte 7

0

not used

byte 7

78

read data LSB

Example 5: read Q user register 3

opcode

0x9F read 32 bit Q register, from Table 2

operand 0x33 from Reg Code Table, indicates register ‘3’

return value

0x12345678

Type 2 Command Message Payload

Type 2 Response Message Payload

byte 0

0

reserved

byte 0

0

reserved

byte 1

2

message type

byte 1

2

message type

byte 2

9F

opcode

byte 2

9F

opcode

byte 3

33

operand

byte 3

33

operand

byte 4

0

not used

byte 4

12

read data MSB

byte 5

0

not used

byte 5

34

read data 2nd MSB

byte 6

0

not used

byte 6

56

read data 2nd LSB

byte 7

0

not used

byte 7

78

read data LSB

Advertising
This manual is related to the following products: