uArm Swift Prop not responding to commands

Hi

I started using my arm for the first time today, and I’m using the Python pyuf library.

The arm doesn’t respond to some commands.

For example, I will issue

>>> swift.set_position(200, 0, 200, wait = True)
VERBOSE: swift/serial_ascii: <- #14 G0 X200 Y0 Z200
VERBOSE: swift/serial_ascii: -> $14 ok

then it moves. Then I will a couple more commands, then it will stop responding at some point. Then I do:

>>> swift.set_position(150, 0, 200, wait = True)
VERBOSE: swift/serial_ascii: <- #39 G0 X150 Y0 Z200
VERBOSE: swift/serial_ascii: -> $39 ok

It doesn’t move

>>> swift.set_position(200, 0, 200, wait = True)
VERBOSE: swift/serial_ascii: <- #40 G0 X200 Y0 Z200
VERBOSE: swift/serial_ascii: -> $40 ok

it moves

>>> swift.set_position(150, 0, 200, wait = True)
VERBOSE: swift/serial_ascii: <- #41 G0 X150 Y0 Z200
VERBOSE: swift/serial_ascii: -> $41 ok

it moves.

Note that the last one is a position it moved to, but it refused to move there 2 commands back.

uArm Serial No.: UARM-0505170733
Firmware Version: V3.1.16
Operation System: Win(7,8,9,10)/Mac/Linux
uArm Controlling Method: Python pyuf

The v3.1.16 firmware has some strange behavior after you send any unreachable point to the arm:
“200, 0, 200” may unreachable depends on arm current status, (check current status by command: P2400, status are: normal, laser, printing and universal holder, it may also found in the power on messages, I prefer to use word profile instead of status)

Please upgrade your firmware to version >= v3.1.18,
after that, the arm should return E22 and don’t move when position unreachable,
and the strange behavior should also gone.

If you still encounter any problem, please attach full verbose logs.

Thanks Duke

  1. 3.1.18 is not released yet - where are the instructions for building from source?
  2. I suspect there’s a bug in the code for determining “unreachable” locations, because the locations are definitely reachable.

I have added the P2400 as requested and full verbose logs as requested:

Case A: The 3rd coordinates is not accepted (i.e., it doesn’t move from 200,0,200 to 200,50,200:

Script:

>     import sys, os
>     from time import sleep
>     from math import pi, sin, cos, atan2
>     from subprocess import call

>     sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
>     from uf.wrapper.swift_api import SwiftAPI
>     from uf.utils.log import *

>     logger_init(logging.VERBOSE)
>     swift = SwiftAPI()

>     sleep(2)
>     print('device info: ')
>     print(swift.get_device_info())

>     swift.send_cmd_sync('P2400')
>     swift.set_position(200, 0, 150, wait=True)
>     sleep(2)
>     swift.set_position(200, 0, 200, wait=True)
>     sleep(2)
>     swift.set_position(200, 50, 200, wait=True)
>     sleep(2)

>     print('done ...')
>     while True:
>         sleep(1)

Output:

INFO: swift/serial_ascii: choose device: /dev/cu.usbmodem145141
INFO: swift/serial_ascii: /dev/cu.usbmodem145141:
INFO: swift/serial_ascii:   hwid        : "USB VID:PID=2341:0042 LOCATION=20-5.1.4"
INFO: swift/serial_ascii:   manufacturer: "Arduino (www.arduino.cc)"
INFO: swift/serial_ascii:   product     : "Arduino Mega 2560"
INFO: swift/serial_ascii:   description : "Arduino Mega 2560"
VERBOSE: swift/serial_ascii: -> start
VERBOSE: swift/serial_ascii: -> echo:Marlin 1.1.0-RC7
VERBOSE: swift/serial_ascii: -> echo: Last Updated: 2016-07-31 12:00 | Author: (none, default config)
VERBOSE: swift/serial_ascii: -> Compiled: Jul 24 2017
VERBOSE: swift/serial_ascii: -> echo: Free Memory: 2940  PlannerBufferBytes: 1232
VERBOSE: swift/serial_ascii: -> echo:Hardcoded Default Settings Loaded
VERBOSE: swift/serial_ascii: -> echo:Steps per unit:
VERBOSE: swift/serial_ascii: -> echo:  M92 X320.00 Y320.00 Z320.00 E84.88
VERBOSE: swift/serial_ascii: -> echo:Maximum feedrates (mm/s):
VERBOSE: swift/serial_ascii: -> echo:  M203 X500.00 Y500.00 Z500.00 E25.00
VERBOSE: swift/serial_ascii: -> echo:Maximum Acceleration (mm/s2):
VERBOSE: swift/serial_ascii: -> echo:  M201 X2000 Y2000 Z2000 E10000
VERBOSE: swift/serial_ascii: -> echo:Accelerations: P=printing, R=retract and T=travel
VERBOSE: swift/serial_ascii: -> echo:  M204 P25.00 R25.00 T100.00
VERBOSE: swift/serial_ascii: -> echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
VERBOSE: swift/serial_ascii: -> echo:  M205 S0.00 T0.00 B20000 X1.00 Z1.00 E5.00
VERBOSE: swift/serial_ascii: -> echo:Home offset (mm)
VERBOSE: swift/serial_ascii: -> echo:  M206 X0.00 Y0.00 Z0.00
VERBOSE: swift/serial_ascii: -> echo:PID settings:
VERBOSE: swift/serial_ascii: -> echo:  M301 P22.20 I1.08 D114.00
VERBOSE: swift/serial_ascii: -> echo:Filament settings: Disabled
VERBOSE: swift/serial_ascii: -> echo:  M200 D1.75
VERBOSE: swift/serial_ascii: -> echo:  M200 D0
device info: 
VERBOSE: swift/serial_ascii: <- #1 P2201
VERBOSE: swift/serial_ascii: -> $1 ok VSwiftPro
VERBOSE: swift/serial_ascii: -> @5 V1
VERBOSE: swift/serial_ascii: <- #2 P2202
VERBOSE: swift/ptc_ascii: report: @5 V1
VERBOSE: swift/serial_ascii: -> $2 ok V3.3.0
VERBOSE: swift/serial_ascii: <- #3 P2203
VERBOSE: swift/serial_ascii: -> $3 ok V3.1.16
VERBOSE: swift/serial_ascii: <- #4 P2204
VERBOSE: swift/serial_ascii: -> $4 ok V3.1.16
VERBOSE: swift/serial_ascii: <- #5 P2205
VERBOSE: swift/serial_ascii: -> $5 ok VD43639D85173
['SwiftPro', '3.3.0', '3.1.16', '3.1.16', 'D43639D85173']
VERBOSE: swift/serial_ascii: <- #6 P2400
VERBOSE: swift/serial_ascii: -> $6 ok V0
VERBOSE: swift/serial_ascii: <- #7 G0 X200 Y0 Z150
VERBOSE: swift/serial_ascii: -> $7 ok
VERBOSE: swift/serial_ascii: <- #8 G0 X200 Y0 Z200
VERBOSE: swift/serial_ascii: -> $8 ok
VERBOSE: swift/serial_ascii: <- #9 G0 X200 Y50 Z200
VERBOSE: swift/serial_ascii: -> $9 ok
done ...

Case B: I commented out the second set of coordinates, it does move from 200, 0, 150 to 200, 50, 200:

> import sys, os
> from time import sleep
> from math import pi, sin, cos, atan2
> from subprocess import call

> sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
> from uf.wrapper.swift_api import SwiftAPI
> from uf.utils.log import *

> logger_init(logging.VERBOSE)
> swift = SwiftAPI()

> sleep(2)
> print('device info: ')
> print(swift.get_device_info())

> swift.send_cmd_sync('P2400')
> swift.set_position(200, 0, 150, wait=True)
> sleep(2)
> # swift.set_position(200, 0, 200, wait=True)
> # sleep(2)
> swift.set_position(200, 50, 200, wait=True)
> sleep(2)

> print('done ...')
> while True:
>     sleep(1)

Output:

> INFO: swift/serial_ascii: choose device: /dev/cu.usbmodem145141
> INFO: swift/serial_ascii: /dev/cu.usbmodem145141:
> INFO: swift/serial_ascii:   hwid        : "USB VID:PID=2341:0042 LOCATION=20-5.1.4"
> INFO: swift/serial_ascii:   manufacturer: "Arduino (www.arduino.cc)"
> INFO: swift/serial_ascii:   product     : "Arduino Mega 2560"
> INFO: swift/serial_ascii:   description : "Arduino Mega 2560"
> VERBOSE: swift/serial_ascii: -> start
> VERBOSE: swift/serial_ascii: -> echo:Marlin 1.1.0-RC7
> VERBOSE: swift/serial_ascii: -> echo: Last Updated: 2016-07-31 12:00 | Author: (none, default config)
> VERBOSE: swift/serial_ascii: -> Compiled: Jul 24 2017
> VERBOSE: swift/serial_ascii: -> echo: Free Memory: 2940  PlannerBufferBytes: 1232
> VERBOSE: swift/serial_ascii: -> echo:Hardcoded Default Settings Loaded
> VERBOSE: swift/serial_ascii: -> echo:Steps per unit:
> VERBOSE: swift/serial_ascii: -> echo:  M92 X320.00 Y320.00 Z320.00 E84.88
> VERBOSE: swift/serial_ascii: -> echo:Maximum feedrates (mm/s):
> VERBOSE: swift/serial_ascii: -> echo:  M203 X500.00 Y500.00 Z500.00 E25.00
> VERBOSE: swift/serial_ascii: -> echo:Maximum Acceleration (mm/s2):
> VERBOSE: swift/serial_ascii: -> echo:  M201 X2000 Y2000 Z2000 E10000
> VERBOSE: swift/serial_ascii: -> echo:Accelerations: P=printing, R=retract and T=travel
> VERBOSE: swift/serial_ascii: -> echo:  M204 P25.00 R25.00 T100.00
> VERBOSE: swift/serial_ascii: -> echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
> VERBOSE: swift/serial_ascii: -> echo:  M205 S0.00 T0.00 B20000 X1.00 Z1.00 E5.00
> VERBOSE: swift/serial_ascii: -> echo:Home offset (mm)
> VERBOSE: swift/serial_ascii: -> echo:  M206 X0.00 Y0.00 Z0.00
> VERBOSE: swift/serial_ascii: -> echo:PID settings:
> VERBOSE: swift/serial_ascii: -> echo:  M301 P22.20 I1.08 D114.00
> VERBOSE: swift/serial_ascii: -> echo:Filament settings: Disabled
> VERBOSE: swift/serial_ascii: -> echo:  M200 D1.75
> VERBOSE: swift/serial_ascii: -> echo:  M200 D0
> device info: 
> VERBOSE: swift/serial_ascii: <- #1 P2201
> VERBOSE: swift/serial_ascii: -> $1 ok VSwiftPro
> VERBOSE: swift/serial_ascii: <- #2 P2202
> VERBOSE: swift/serial_ascii: -> @5 V1
> VERBOSE: swift/ptc_ascii: report: @5 V1
> VERBOSE: swift/serial_ascii: -> $2 ok V3.3.0
> VERBOSE: swift/serial_ascii: <- #3 P2203
> VERBOSE: swift/serial_ascii: -> $3 ok V3.1.16
> VERBOSE: swift/serial_ascii: <- #4 P2204
> VERBOSE: swift/serial_ascii: -> $4 ok V3.1.16
> VERBOSE: swift/serial_ascii: <- #5 P2205
> VERBOSE: swift/serial_ascii: -> $5 ok VD43639D85173
> ['SwiftPro', '3.3.0', '3.1.16', '3.1.16', 'D43639D85173']
> VERBOSE: swift/serial_ascii: <- #6 P2400
> VERBOSE: swift/serial_ascii: -> $6 ok V0
> VERBOSE: swift/serial_ascii: <- #7 G0 X200 Y0 Z150
> VERBOSE: swift/serial_ascii: -> $7 ok
> VERBOSE: swift/serial_ascii: <- #8 G0 X200 Y50 Z200
> VERBOSE: swift/serial_ascii: -> $8 ok
> done ...

Hi, did you manage to solve this problem now?
I was writing a controller for the arm and it shows some strange behaviours,
and during debugging I saw your thread…

I’m getting similar strange behavior. Has anyone solved this?

And just to give an example, all of a sudden this command:

swift.send_cmd_sync('_T10 G0 X125 Y0 Z-25 F5000')

will return:

ok E22 unreachable

When it was working perfectly fine just before.

Here’s another one it says “unreachable” on:

swift.send_cmd_sync('_T10 G0 X80 Y0 F5000')

Here are the full logs:

    setting up Swift...
uf.swift.serial_ascii: INFO: choose device: /dev/cu.usbmodem1411
uf.swift.serial_ascii: INFO: /dev/cu.usbmodem1411:
uf.swift.serial_ascii: INFO:   hwid        : "USB VID:PID=2341:0042 LOCATION=20-1"
uf.swift.serial_ascii: INFO:   manufacturer: "Arduino (www.arduino.cc)"
uf.swift.serial_ascii: INFO:   product     : "Arduino Mega 2560"
uf.swift.serial_ascii: INFO:   description : "Arduino Mega 2560"
uf.swift.serial_ascii: VERBOSE: -> start
uf.swift.serial_ascii: VERBOSE: -> echo:Marlin 1.1.0-RC7
uf.swift.serial_ascii: VERBOSE: -> echo: Last Updated: 2016-07-31 12:00 | Author: (none, default config)
uf.swift.serial_ascii: VERBOSE: -> Compiled: Oct 25 2017
uf.swift.serial_ascii: VERBOSE: -> echo: Free Memory: 2376  PlannerBufferBytes: 924
uf.swift.serial_ascii: VERBOSE: -> echo:Hardcoded Default Settings Loaded
uf.swift.serial_ascii: VERBOSE: -> echo:Steps per unit:
uf.swift.serial_ascii: VERBOSE: -> echo:  M92 X320.00 Y320.00 Z320.00 E84.88
uf.swift.serial_ascii: VERBOSE: -> echo:Maximum feedrates (mm/s):
uf.swift.serial_ascii: VERBOSE: -> echo:  M203 X2000.00 Y2000.00 Z2000.00 E25.00
uf.swift.serial_ascii: VERBOSE: -> echo:Maximum Acceleration (mm/s2):
uf.swift.serial_ascii: VERBOSE: -> echo:  M201 X2000 Y2000 Z2000 E10000
uf.swift.serial_ascii: VERBOSE: -> echo:Accelerations: P=printing, R=retract and T=travel
uf.swift.serial_ascii: VERBOSE: -> echo:  M204 P25.00 R25.00 T100.00
uf.swift.serial_ascii: VERBOSE: -> echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
uf.swift.serial_ascii: VERBOSE: -> echo:  M205 S0.00 T0.00 B20000 X1.00 Z1.00 E5.00
uf.swift.serial_ascii: VERBOSE: -> echo:Home offset (mm)
uf.swift.serial_ascii: VERBOSE: -> echo:  M206 X0.00 Y0.00 Z0.00
uf.swift.serial_ascii: VERBOSE: -> echo:PID settings:
uf.swift.serial_ascii: VERBOSE: -> echo:  M301 P22.20 I1.08 D114.00
uf.swift.serial_ascii: VERBOSE: -> echo:Filament settings: Disabled
uf.swift.serial_ascii: VERBOSE: -> echo:  M200 D1.75
uf.swift.serial_ascii: VERBOSE: -> echo:  M200 D0
cmd: set cmd_sync _T10 G0 Z15
uf.swift.serial_ascii: VERBOSE: <- #1 G0 Z15
uf.swift.serial_ascii: VERBOSE: -> @5 V1
uf.swift.ptc_ascii: VERBOSE: report: @5 V1
uf.swift.serial_ascii: VERBOSE: -> $1 ok
uf.swift.serial_ascii: VERBOSE: <- #2 G0 X80 Y0 F5000
uf.swift.serial_ascii: VERBOSE: -> $2 ok E22 unreachable