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

From HITEC_HELP
Jump to navigation Jump to search
Line 3: Line 3:


Node ID 와 Actuator ID 를 설정해야 합니다. ( [[CanServo/ID/modes]] 참조 )
Node ID 와 Actuator ID 를 설정해야 합니다. ( [[CanServo/ID/modes]] 참조 )
NODE: 아래 SEQ 값은 0~31 까지 순차적으로 증가시킵니다.


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

Revision as of 10:01, 17 April 2024

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

Node ID 와 Actuator ID 를 설정해야 합니다. ( CanServo/ID/modes 참조 ) NODE: 아래 SEQ 값은 0~31 까지 순차적으로 증가시킵니다.

1. Set a Register Value

  • CAN ID = 8003F200
  • CAN DATA = <Actuator ID>, <ADDR>, < 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>, 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 Actautor ID
  • CAN DATA = <Actuator ID>, <ADDR>, < DATA LO BYTE >, < DATA HI BYTE >

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.