@fcwilt said in Error: unknown variable 'global.magprobestatus':
global magprobestatus = "unknown"
Thanks You, that did it!
@fcwilt said in Error: unknown variable 'global.magprobestatus':
global magprobestatus = "unknown"
Thanks You, that did it!
@jay_s_uk
#############################################################
; AutoZ - Automatic probe offset adjustment
;
; to use autoz, please place the following near the end
; of your slicer start gcode
; M98 P"/macros/autoz/autoz.g" <<< Place in slicer
;##################################################################
;##################################################################
; prepare
;##################################################################
M98 P"/macros/autoz/autoz_settings.g" ; Load your settings
M98 P"/macros/autoz/scripts/autoz_globals.g" ; Load autoz framework
G29 S2 ; Disable mesh
M290 R0 S0 ; Reset baby stepping
;##################################################################
; Probe the nozzle on teh Z-pin
;##################################################################
;G1 E-5 F1000
M98 P"/macros/autoz/scripts/autoz_move_up.g" ; large z hop incase the nozzle is low and you have a high pin
M400
M98 P"/macros/autoz/scripts/autoz_goto_zpin.g" ; go to the z pin
M400
M98 P"/macros/autoz/scripts/autoz_adjust_safe_zdrive.g" ; set z drive safe physics
M400
M98 P"/macros/autoz/scripts/autoz_probe.g" K1 H5 A4 S0.004
M400
if !exists(global.macrocallresult)
echo "Call to macro failed. Aborting"
abort
;end if
var nozzleheight = {global.macrocallresult}
echo "nozzleheight: ", {var.nozzleheight}
M98 P"/macros/autoz/scripts/autoz_restore_zdrive.g" ; restore the z drive to the state before autoz
M400
M98 P"/macros/autoz/scripts/autoz_move_up_small.g" ; move up 2mm
M400
;##################################################################
; Load the magprobe
;##################################################################
M98 P"/macros/autoz/scripts/autoz_move_up.g"
M400
M98 P"/macros/magprobe_attach.g" ; pick up and verify clicky
M400
M98 P"/macros/autoz/scripts/autoz_goto_zpin_magprobe_offset.g" ; move the clicky probe switch body over the z pin
M400
M98 P"/macros/autoz/scripts/autoz_adjust_safe_zdrive.g" ; set z drive safe physics
M400
;##################################################################
; Probe magprobe body on the Z-pin
;##################################################################
M98 P"/macros/autoz/scripts/autoz_probe.g" K1 H5 A4 S0.004
M400
if !exists(global.macrocallresult)
echo "Call to macro failed. Aborting"
abort
;end if
var magprobeheight = {global.macrocallresult}
echo "magprobeheight: ", {var.magprobeheight}
;##################################################################
; Probe the bed
;##################################################################
M98 P"/macros/autoz/scripts/autoz_move_up.g" ; hop to clear the switch
M400
M98 P"/macros/autoz/scripts/autoz_goto_bedcenter.g" ; go to the center of the bed
M400
M98 P"/macros/autoz/scripts/autoz_probe.g" K0 H5 A4 S0.004
M400
if !exists(global.macrocallresult)
echo "Call to macro failed. Aborting"
abort
;end if
var bedheight = {global.macrocallresult}
echo "bedheight: ", {var.bedheight}
;##################################################################
; Calculate probe offset
;##################################################################
var nozzleswitchoffset = {var.magprobeheight - var.nozzleheight + global.switchoffset}
echo "nozzleswitchoffset: ", {var.nozzleswitchoffset}
var probeoffset = {var.bedheight - var.nozzleswitchoffset}
echo "probeoffset: ", {var.probeoffset}
;##################################################################
; Set probe offset as baby step offset
;##################################################################
M290 R0 S{var.probeoffset}
M400
;##############################################
; Finish up
;##############################################
M98 P"/macros/autoz/scripts/autoz_restore_zdrive.g" ; restore the z drive to the state before autoz
M98 P"/macros/autoz/scripts/autoz_move_up.g" ; small z hop
M400
M98 P"/macros/magprobe_dock.g" ; unload the clicky probe
M98 P"/macros/autoz/scripts/autoz_goto_bedcenter.g" ; go to the center of the bed
;##############################################
; Done
;##############################################
I have recently updated to 3.5.4 from 3.4.6 and the DWC keeps loosing its connection while running the pre print macros and an error message pops up in the control screen when this happens. The message reads,
Connection interrupted, attempting to reconnect...
Operation failed (Reason: Service Unavailable)
I think this happens when it reads the following line in the macro,
M98 P"/macros/autoz/scripts/autoz_probe.g" K1 H5 A4 S0.004
Are the variables allowed at the end of the M98 line? The pre print macros continue and the print job finishes without any other issues.
@oliof Thanks for your help but I'm going to stick with 3.4.6 for now and try to simplify and rewrite my macros at a latter time.
@droftarts
These macros run when individually run.
; Macro print start
; reset baby stepping
M290 S0.00 R0
G28
M98 P"/macros/magprobe_do_QGL.g"
G28 Z
G1 Y270
M98 P"/macros/nozzle_scrub.g"
M98 P"/macros/autoz/autoz.g"
; Final settings before print actually start
T0 ; select tool 0
G21 ; set units to mm
M83 ; set extruder to relative mode
G92 E0.0 ; reset extruder position
M220 S100 ; reset speed multiplier
M98 P"/macros/magprobe_dock.g"
echo "Print will now start"
@droftarts;
This is my startup script.
M104 S140 ; PreHeat nozzle
M109 S140 ; wait for extruder temp
M98 P"/macros/start_print.g"
M104 S[extruder0_temperature] T0 ; set extruder temp
M109 S[extruder0_temperature] T0 ; wait for extruder temp
G1 X20 Y10 Z0.2 F3000 ; get ready to prime
G92 E0 ; reset extrusion distance
G1 X250 E25 F600 ; prime nozzle
This is the G-Code I am trying to print, it heats the bed and then aborts.
G-Code generated by Simplify3D(R) Version 5.1.2
; Jan 25, 2024 at 10:48:44 AM
G90
M82
M106 S0 P0
M140 S105
M190 S105
M104 S140 T0 ; PreHeat nozzle
M109 S140 T0 ; wait for extruder temp
M98 P"/macros/start_print.g"
M104 S220 T0 ; set extruder temp
M109 S220 T0 ; wait for extruder temp
G1 X20 Y10 Z0.2 F3000 ; get ready to prime
G92 E0 ; reset extrusion distance
G1 X250 E25 F600 ; prime nozzle
; process Process 1
; layer 1, Z = 0.2200
T0
G92 E0.00000
G1 E-2.00000 F2100
; feature skirt
; tool H0.2200 W0.480
G1 Z0.2200 F1800
G1 X105.424 Y127.392 F15000
G92 E0.00000
G1 E2.00000 F2100
G92 E0.00000
G1 X127.902 Y136.843 E1.37821
I moved back to 3.4.6 and everything works fine. I went through the change log for 3.5.0 and I don't see anything that would cause it not to work on my printer. Any ideas what might have changed between the two versions to cause the print to abort after heating the bed. For some reason I am unable to upload my code or file to this site.
@oliof Which file should I include?
probe-screw-5sc.gcode I just updated to 3.5.0-rc2 from 3.4.6, I have a 6HC with 1LC v1.3 everything was running fine on 3.4.6 but now the print aborts just after the bed reaches temp. I am using Simplify3D. The error message is
Cancelled printing file 0:/gcodes/probe-screw-5sc.gcode, print time was 0h 1m
'abort' command executed
@droftarts I don't see IO_1.out on the toolboard but there is IO_0.out. It may be safer to just run them back to the 6HC unless there is someone that has successfully connected them to the toolboard.