Thanks Duke
- 3.1.18 is not released yet - where are the instructions for building from source?
- 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 ...