EasyManua.ls Logo

WR BEAR - Page 25

WR BEAR
37 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
[PyBEAR | WARNING] :: Read response timed out. Re-sending the same packet.
b) Read from multiple registers
This function is previously known as get bulk status/config(), which is verbally mislead-
ing since this is in fact not using bulk communication protocol. get bulk status/config()
is now depreciated.
CAUTION
Will not work for ID, Mode, Baudrate, Watchdog timeout and Torque Enable
CAUTION
Multiple registers on a BEAR can be visited within one frame of communication using:
get_status/config((ID1, reg1, reg2...), (ID2, reg1, reg2 ...) ...)
Multiple target motors can be visited but PyBEAR will go through them one-by-one.
Do not use get status() with config registers, nor to use get config() with status regis-
ters
CAUTION
The function return format is:
[([data_from_motor1], error_code_of_motor1),
([data_from_motor2], error_code_of_motor2)...]
Example:
# Read present_iq and present_velocity from BEAR 1 and 2,
# and read present_velocity from BEAR 3
bear.get_status((1, 'present_iq', 'present_velocity'),
(2, 'present_iq', 'present_velocity'),
(3, 'present_velocity'))
# Read p_gain_position from BEAR 1, 4
bear.get_config((1, 'p_gain_position'), (4, 'p_gain_position'))
If bad connection happens and nothing is heard from the BEAR actuator(s) or the return
packets are damaged, PyBEAR automatically retries the read function, and a warning is
generated:
[PyBEAR | WARNING] :: Read response timed out. Re-sending the same packet.
25