Resolved:Macro string errors since update to 3.5.1
-
The answer was stop.g being run and it had a M98 call in it without quotes.
I have macros at the start and end of my print jobs, and since going to 3.5.1 I am getting some odd errors with the macros at the end of the print job:
This is the place the script is being called:
I am confused at the line 9 column 6 reference though, there arent any intented columns in the macro:
what am I missing here?
-
bad command g seems to indicate that the
.
isn't getting picked up correctly. Can you try retyping it in the DWC editor? -
@clegg78 Hard to tell, because you posted screen grabs rather than actual text (which is much preferred and easier to debug), but it looks like you're using curly quotes
“
rather than straight quotes"
in the M98 command. You must use straight quotes.Ian
-
@droftarts
They seem like straight double quotes;WIPE_END M486 S-1 M106 S0 ;TYPE:Custom ; filament end gcode ;Call Unload/End Script M98 P"/macros/jobscripts/EndJob.g" M73 P100 R0 ; EXECUTABLE_BLOCK_END
Then this is the actual script:
;Script for S3D to end the job ;powerdown all heaters M104 S0 T0 ; turn off extruder M104 S0 T1 ; turn off extruder M104 S0 T2 ; turn off extruder M104 S0 T3 ; turn off extruder M140 S0 ; turn off bed G1 E-.5 F200 ; Slight Retract to clear the nozzle T-1 P0; Unload all tools, dont run the tool end script ;Turn off all part cooling fans M106 P0 S0 M106 P1 S0 ;Reset the filament sensors if they were disabled or changed for specific print jobs: ;Magnetic Filament Sensor - Reapply default Settings M98 P"/macros/jobscripts/FilamentSensor.g" M98 P"/macros/jobscripts/Chamberfan.g" ;Code to undo the MM and other tools M579 U1 ; Unset the mirroring config for the U Axis if using Tool3 ;Reset Extrusion % M221 S100 D0 ; E0 Extrusion M221 S100 D1 ; E1 Extrusion ;Move the Heads out of the way M913 X50 Y50 U50 Z50 ; set lower power G91 ; Relative positioning G1 Z3 F6000 ; drop Z by 3mm G90 ;X Y motors to 50% of their normal current for homing G1 X-210 Y165 U201 F8000 ;move X/Y/U M913 X100 Y100 U100 Z100; set X Y motors to100% of their normal current for homing ;Reset any tool Z offset scripts G10 P0 Z0 G10 P1 Z0 M84 ; disable motors ;Reset LEDs M106 P6 S0 M106 P7 S0 M106 P5 S0 ; shutdown Pause LED if lit
-
@clegg78 I did more testing and it doesnt matter which slicer exports the gcode (Orca, PS, S3D) The very weird thing is that is runs the entire script it errors on. So it's not like it doesn't run it, the script executes completely. So, for now, its just an annoyance error, since it all seems to be operating as expected. But still very curious.
-
@clegg78 is the end gcode (the M98 line) being repeated in the form of a comment later in that gcode file? As the macro call is working, perhaps the lines you posted are not the ones provoking the error message.
-
since the error begins with
macros/
instead of/macros
I would look for invisible characters afterP"
Changing that macro call to begin with the sdcard, i.e.
M98 P"0:/macros/...", does the error message change when you do add
0:` in front? -
I'll try changing it to the 0: item again, I think I tried that and it had no effect.
the scripts are cited later in the gcode as commented code output by the slicer:
; filament_start_gcode = ";Set Bed temp\nM140 S100\nM190 S100\n\n;Set Hot End temp\nM109 S265 T0\n\n;Call Tool 0 start script\nM98 P\"/macros/jobscripts/ChamberFanHighTemp.g\"\nM98 P\"/macros/jobscripts/Start_T0.g\"\n; Filament gcode\nM106 S0 P0\nT0" ; filament_toolchange_delay = 0 ; filament_type = PA-CF ; filament_unload_time = 0 ; filament_unloading_speed = 90 ; filament_unloading_speed_start = 100 ; filament_vendor = "MH NyonX" ; filament_wipe = 1 ; filament_wipe_distance = 0.5 ; filament_z_hop = 0.25 ; filament_z_hop_types = Normal Lift ; filename_format = {input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode ; filter_out_gap_fill = 0 ; first_layer_print_sequence = 0 ; flush_into_infill = 0 ; flush_into_objects = 0 ; flush_into_support = 1 ; flush_multiplier = 0.3 ; flush_volumes_matrix = 0 ; flush_volumes_vector = 140,140 ; full_fan_speed_layer = 0 ; fuzzy_skin = none ; fuzzy_skin_first_layer = 0 ; fuzzy_skin_point_distance = 0.8 ; fuzzy_skin_thickness = 0.3 ; gap_fill_target = everywhere ; gap_infill_speed = 100 ; gcode_add_line_number = 0 ; gcode_comments = 0 ; gcode_flavor = reprapfirmware ; gcode_label_objects = 1 ; has_scarf_joint_seam = 0 ; head_wrap_detect_zone = ; high_current_on_filament_swap = 0 ; hole_to_polyhole = 0 ; hole_to_polyhole_threshold = 0.01 ; hole_to_polyhole_twisted = 1 ; host_type = duet ; hot_plate_temp = 100 ; hot_plate_temp_initial_layer = 100 ; independent_support_layer_height = 1 ; infill_anchor = 400% ; infill_anchor_max = 20 ; infill_combination = 0 ; infill_direction = 45 ; infill_jerk = 9 ; infill_wall_overlap = 30% ; inherits_group = "0.28mm Extra Draft @MyRRF";"My Generic PA-CF";"MyRRF 0.4 nozzle" ; initial_layer_acceleration = 1000 ; initial_layer_infill_speed = 105 ; initial_layer_jerk = 9 ; initial_layer_line_width = 0.5 ; initial_layer_min_bead_width = 85% ; initial_layer_print_height = 0.25 ; initial_layer_speed = 70 ; initial_layer_travel_speed = 100% ; inner_wall_acceleration = 5000 ; inner_wall_jerk = 9 ; inner_wall_line_width = 0.45 ; inner_wall_speed = 100 ; interface_shells = 0 ; internal_bridge_flow = 1 ; internal_bridge_speed = 150% ; internal_solid_infill_acceleration = 100% ; internal_solid_infill_line_width = 0.5 ; internal_solid_infill_pattern = zig-zag ; internal_solid_infill_speed = 200 ; ironing_angle = -1 ; ironing_flow = 10% ; ironing_pattern = zig-zag ; ironing_spacing = 0.15 ; ironing_speed = 30 ; ironing_type = no ironing ; is_infill_first = 0 ; layer_change_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] ; layer_height = 0.25 ; line_width = 0.5 ; machine_end_gcode = ;Call Unload/End Script\nM98 P\"/macros/jobscripts/EndJob.g\" ; machine_load_filament_time = 0 ; machine_max_acceleration_e = 3000,5000
I retyped out the line from scratch and it still throws the error for some reason.
-
@clegg78 Do you have a stop.g file? It seems strange that the error message says the error is on line 9, the call you showed seems to be much later than line 9. In 3.5.1 stop.g will be called automatically (at the end of the job), so if there is an error in that file, this may be the first time you have seen this.
-
That was it!!
At some point I put that script in there as well. I didnt realize Stop.g gets called at the end of every job now.
-
-