Difference between revisions of "CanServo/POSITION-32/en"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (Created page with "You can check the position value ( TURN x 16384 + POSITION ) including the number of rotations as a 32-bit value. Since 32 bit = 4 bytes, 2 bytes are divided into 2 registers....") | |||
| Line 1: | Line 1: | ||
| Servo Position = (signed)TURN x 16384 + (unsigned)POSITION | |||
| 2 Registers | |||
| * Low 2 byte = 0x1A | |||
| ** High 2 byte = 0x1C | ** Value = Low Word of Position | ||
| * High 2 byte = 0x1C | |||
| ** Value = High Word of Position | |||
| <pre> | |||
| // Host: C style: | |||
| int16_t H = (int16_t) read_register(0x1C); | |||
| uint16_t L = (uint16_t) read_register(0x1A); | |||
| int32_t get_position = H x 65536 + L; | |||
| </pre> | |||
Latest revision as of 16:33, 29 September 2021
Servo Position = (signed)TURN x 16384 + (unsigned)POSITION
2 Registers
- Low 2 byte = 0x1A
- Value = Low Word of Position
 
- High 2 byte = 0x1C
- Value = High Word of Position
 
// Host: C style: int16_t H = (int16_t) read_register(0x1C); uint16_t L = (uint16_t) read_register(0x1A); int32_t get_position = H x 65536 + L;