xArm-Python-SDK icon indicating copy to clipboard operation
xArm-Python-SDK copied to clipboard

Running gcode in Studio and with Python run_gcode_file() is not the same (Lite6)

Open mroglic opened this issue 1 year ago • 1 comments

When trying to run this gcode file, I got different results when running in xarm studio and with Python SDK:

G21       ; mm
G1 Z300 ; pen up
G1 X280 Y10 
G1 Z300 ; pen up
G1 X255 Y-15
G1 Z80 ; pen down
G1 X255 Y-15 ; line start
G1 X255 Y-15 ; line end
G4 P 12 ; dwell for 12 sec
G1 X255 Y-15 ; line start
G1 X255 Y-94 ; line end
G4 P 12 ; dwell for 12 sec
G1 X255 Y-94 ; line start
G1 X255 Y-173 ; line end
G4 P 12 ; dwell for 12 sec
G1 Z300 ; pen up

When running from xarm studio, the code works fine with dwell commands, but when sending the same file via run_gcode_file(), those commands are skipped. Also, this code consists of three lines, which studio executes well, but again, running run_gcode_file() executes just the first two lines.

Firmware and Studio Version are both 2.3.0. Python SDK Version: 1.13.19

mroglic avatar May 02 '24 15:05 mroglic

Hi Mroglic,

run_gcode_file is for our internal use, it doesn’t support the dwell command. We will add a new interface for the user on the next official release, and will let you know once we added it.

Best regards,

MinnaZhong avatar May 06 '24 10:05 MinnaZhong