Difference between revisions of "CanServo/Protocol/DroneCAN/ReadWriteRegister"

From HITEC_HELP
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 3: Line 3:


Node ID 와 Actuator ID 를 설정해야 합니다. ( [[CanServo/ID/modes]] 참조 )
Node ID 와 Actuator ID 를 설정해야 합니다. ( [[CanServo/ID/modes]] 참조 )
NODE: SEQ 값은 0 에서 31 을 넘어서 증가하는 것이 표준입니다.
NOTE: ID1,ID2 설정시에는 Target Actuator ID = 0 으로 합니다.


1. Set a Register Value
1. Set a Register Value


* CAN ID = 8003F200
* CAN ID = 8003F200
* CAN DATA = <Actuator ID>, <ADDR>, < DATA LO BYTE >, < DATA HI BYTE >, SEQ
* CAN DATA = <Actuator ID>, < ADDR of Register >, < DATA LO BYTE >, < DATA HI BYTE >, SEQ
* Actuator ID = 0 (ALL), or 1~127
* Actuator ID = 0 (ALL), or 1~127
* ADDR >= 4
* ADDR >= 4
Line 20: Line 24:


* CAN ID = 8003F200
* CAN ID = 8003F200
* CAN DATA = 0x80+<Actuator ID>, <ADDR>, 0, 0, SEQ
* CAN DATA = 0x80+<Actuator ID>, < ADDR of Register >, 0, 0, SEQ
* Actuator ID = 0 (ALL), or 1~127
* Actuator ID = 0 (ALL), or 1~127
* ADDR >= 4
* ADDR >= 4
Line 32: Line 36:


* CAN ID = 0803F3xx
* CAN ID = 0803F3xx
* xx = Servo's Actautor ID
* xx = Servo's Node ID
* CAN DATA = <Actuator ID>, <ADDR>, <DATA LO BYTE>, <DATA HI BYTE>
* CAN DATA = <Actuator ID>, < ADDR of Register >, < DATA LO BYTE >, < DATA HI BYTE >
* 주의: 이 포맷은 DroneCAN 표준 포맷이 아닙니다.


ex) 0003F307 07 0A 10 00
ex) 0003F307 07 0A 10 00

Latest revision as of 10:14, 17 April 2024

이 프로토콜은 actuator.ArrayCommand 와 actuator.Status 을 일부 수정합니다.

Node ID 와 Actuator ID 를 설정해야 합니다. ( CanServo/ID/modes 참조 )

NODE: SEQ 값은 0 에서 31 을 넘어서 증가하는 것이 표준입니다.

NOTE: ID1,ID2 설정시에는 Target Actuator ID = 0 으로 합니다.

1. Set a Register Value

  • CAN ID = 8003F200
  • CAN DATA = <Actuator ID>, < ADDR of Register >, < DATA LO BYTE >, < DATA HI BYTE >, SEQ
  • Actuator ID = 0 (ALL), or 1~127
  • ADDR >= 4

ex) 8003F200 07 6A 01 00 C0

  • Set value 0x0001 to register 0x6A of Servo 7.
  • Target Actuator ID = 7
  • Addr = 0x6A
  • Data = 0x0001

2. Get a Register Value

  • CAN ID = 8003F200
  • CAN DATA = 0x80+<Actuator ID>, < ADDR of Register >, 0, 0, SEQ
  • Actuator ID = 0 (ALL), or 1~127
  • ADDR >= 4

ex) 8003F200 80 0A 00 00 C0

  • Get value of register 0x0A from all servo.
  • Target Actuator ID = 0 (ALL)
  • Addr = 0x0A

3. Return Packet.

  • CAN ID = 0803F3xx
  • xx = Servo's Node ID
  • CAN DATA = <Actuator ID>, < ADDR of Register >, < DATA LO BYTE >, < DATA HI BYTE >
  • 주의: 이 포맷은 DroneCAN 표준 포맷이 아닙니다.

ex) 0003F307 07 0A 10 00

  • Actuator ID = 7
  • Addr = 0x0A
  • Data = 0x0010

4. SAVE and RESET

  • SAVE: Set Value 0xFFFF to Target Servo's Register 0x70.
  • SERVO RESET: Set Value 0x0001 to Target Servo's Register 0x46.