Pyuarm USB errors and skipping moves

uArm Serial No.: (the No. at the bottom of each uArm reading “UARM-XXXXXXXXXX”)

Firmware Version: 2.2.1

Operation System: Win(10)

uArm Controlling Method: Python - pyuarm 2.2.5.3

Given code:
import pyuarm
import time
import math
speed = 300

def uarm_sweep_x(spd):
for x in range(-10, 10):
uarm.set_position(x*10, 150, 150,spd)
time.sleep(1)

if name == “main”:

uarm = pyuarm.get_uarm()
uarm.set_buzzer(1500,.2)
uarm_sweep_x(speed)
uarm.set_buzzer(1500,.2)

I had to add the time.sleep(1) or I get no motion at all. With this delay I get error messages:
pyuarm - INFO - pyuarm version: 2.2.5.3
pyuarm - INFO - Connecting from port - COM4…
pyuarm - INFO - Connected…
pyuarm - INFO - Firmware Version: 2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#9 G0 X-100 Y150 Z150 F300\n’, received error from robot:
pyuarm - ERROR - Communication| ERROR: send b’#11 G0 X-90 Y150 Z150 F300\n’, received error from robot: $10 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#13 G0 X-80 Y150 Z150 F300\n’, received error from robot: $12 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#15 G0 X-70 Y150 Z150 F300\n’, received error from robot: $14 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#17 G0 X-60 Y150 Z150 F300\n’, received error from robot: $16 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#19 G0 X-50 Y150 Z150 F300\n’, received error from robot: $18 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#21 G0 X-40 Y150 Z150 F300\n’, received error from robot: $20 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#23 G0 X-30 Y150 Z150 F300\n’, received error from robot: $22 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#25 G0 X-20 Y150 Z150 F300\n’, received error from robot: $24 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#27 G0 X-10 Y150 Z150 F300\n’, received error from robot: $26 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#29 G0 X0 Y150 Z150 F300\n’, received error from robot: $28 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#31 G0 X10 Y150 Z150 F300\n’, received error from robot: $30 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#33 G0 X20 Y150 Z150 F300\n’, received error from robot: $32 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#35 G0 X30 Y150 Z150 F300\n’, received error from robot: $34 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#37 G0 X40 Y150 Z150 F300\n’, received error from robot: $36 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#39 G0 X50 Y150 Z150 F300\n’, received error from robot: $38 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#41 G0 X60 Y150 Z150 F300\n’, received error from robot: $40 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#43 G0 X70 Y150 Z150 F300\n’, received error from robot: $42 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#45 G0 X80 Y150 Z150 F300\n’, received error from robot: $44 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#47 G0 X90 Y150 Z150 F300\n’, received error from robot: $46 OK V2.2.1
pyuarm - ERROR - Communication| ERROR: send b’#49 M210 F1500 T0.2\n’, received error from robot: $48 OK V2.2.1
Press any key to continue . . .

I am very new to UArm so please forgive my very elementry questions.

The OK from UArm seems to be getting behind the last command sent:
Does the UArm buffer commands I send to it or do I have to wait for it to finish moving before sending the next command? If I have to wait is there a better way to know if it is done besides just waiting with time.sleep?

Also the z plane is very sloped in the y direction and it seems to have a bubble or arch in the x direction

I would greatly appreciate any help you could give. Thanks

UFACTORY Website:
www.ufactory.cc
uArm User Facebook Group
Contact Us:
English Channel
中文通道

Sorry Here is another piece of code that I forgot to post. It works better with the delays but still eventually creates the same errors. Also while testing noticed that the first error message looks different than the others. It has no $number returned. Don’t know if it is important but it is consistently this way. Thanks

import pyuarm
import time
import math
speed = 300

def uarm_sweep_x(spd):
time.sleep(.5)
for x in range(-10, 10):
uarm.set_position(x*10, 150, 150,spd)
while (uarm.is_moving() == True):
time.sleep(.1)

if name == “main”:

uarm = pyuarm.get_uarm()
uarm.set_buzzer(1500,.2)
uarm_sweep_x(speed)
uarm_sweep_x(speed)
uarm_sweep_x(speed)
uarm.set_buzzer(1500,.2)

We’ll fix this bug and publish a new pyuarm library on the dev branch on our github next week.
The new library will be compatible only with Python 3.x
Sorry for the trouble.

I am having similiar issue from end of January, you have replied me in the exact same way. Today is 29th of March and we still have the same problem. Can you give more details?

The new library has already been uploaded at the beginning of March.

Sorry for not making an announcement.