Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Resolved:Macro string errors since update to 3.5.1

    Scheduled Pinned Locked Moved Solved
    General Discussion
    6
    10
    340
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • clegg78undefined
      clegg78
      last edited by clegg78

      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:
      2735f785-146f-45a8-9ef6-b2acbc1730d8-image.png

      This is the place the script is being called:
      6112e067-2d10-43c2-a376-7c8248c8b5d5-image.png

      I am confused at the line 9 column 6 reference though, there arent any intented columns in the macro:
      f9999163-8d47-443e-a77a-ceef39dc75a0-image.png

      what am I missing here?

      A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        bad command g seems to indicate that the . isn't getting picked up correctly. Can you try retyping it in the DWC editor?

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @clegg78
          last edited by

          @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

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          clegg78undefined 1 Reply Last reply Reply Quote 0
          • clegg78undefined
            clegg78 @droftarts
            last edited by

            @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
            

            A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

            clegg78undefined 1 Reply Last reply Reply Quote 0
            • clegg78undefined
              clegg78 @clegg78
              last edited by

              @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.

              A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

              dc42undefined 1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @clegg78
                last edited by dc42

                @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.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                1 Reply Last reply Reply Quote 0
                • oliofundefined
                  oliof
                  last edited by

                  since the error begins with macros/ instead of /macros I would look for invisible characters after P"

                  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?

                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                  clegg78undefined 1 Reply Last reply Reply Quote 0
                  • clegg78undefined
                    clegg78 @oliof
                    last edited by

                    @oliof @dc42

                    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.

                    A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

                    gloomyandyundefined 1 Reply Last reply Reply Quote 0
                    • gloomyandyundefined
                      gloomyandy @clegg78
                      last edited by gloomyandy

                      @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.

                      clegg78undefined 1 Reply Last reply Reply Quote 2
                      • clegg78undefined
                        clegg78 @gloomyandy
                        last edited by clegg78

                        @gloomyandy

                        That was it!!
                        98e5a1ef-b040-4570-9f12-bf331d30ccb1-image.png

                        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.

                        A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

                        1 Reply Last reply Reply Quote 1
                        • dc42undefined dc42 marked this topic as a question
                        • dc42undefined dc42 has marked this topic as solved
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA