Jump to content
Ultimaker Community of 3D Printing Experts

Help to modify gcode


Recommended Posts

Posted · Help to modify gcode

Hello All, 

i want to modify gcode of initial settings of the start position of extruder. i add a pen holder to make my printer a plot machine.. 

i need to position yhe extruder +10mm in Y axis. (please check the photo)

 

here is a sample of my gcode

;FLAVOR:UltiGCode
;TIME:195
;MATERIAL:396
;MATERIAL2:0
;NOZZLE_DIAMETER:0.3
;MINX:37.631
;MINY:90.184
;MINZ:0.1
;MAXX:185.369
;MAXY:132.846
;MAXZ:1.1
;Generated with Cura_SteamEngine 4.11.0
M82 ;absolute extrusion mode
G0 F3000 Y50 ;avoid prime blob
G92 E0
G92 E0
G10
;LAYER_COUNT:1
;LAYER:0
M107
G1 F600 Z1.1
G0 F12000 X139.459 Y96.255 Z1.1
;TYPE:SKIRT
G1 F600 Z0.1
G11

 

if you can help me that would be fantastic..

 

prb.jpg

  • Link to post
    Share on other sites

    Posted · Help to modify gcode

    You can't really fix this in gcode because the printer must home and to home the Y axis it needs to move all the way to the left until the limit switch is tripped.  So you have only 2 choices that I can think of:

    1) Move the pen to the right side of the print head

    2) Move the Y limit switch to the right by about 1cm.

     

    In your photo, on top of your printer, in the rear left corner there are 2 button-head screw heads visible.  Very close together.  Those  are for the Y limit switch.  If you look under neath where those screws go you can see the limit switch.  You might be able to bend the limit switch by the width of your pen.  Careful or you may break the metal tab but if you only bend it once or twice it should survive.

     

    Or you could drill two new holes 1cm to the right of the existing and remount the limit switch (aka end stop switch) 1cm to the right.

  • Link to post
    Share on other sites

    Posted · Help to modify gcode

    Thank you for the tips, i will try the first option first...  its strange that i couldnt do it in g code.i think this device working how its designed and dont want modify these base settings. i appreciated..

  • Link to post
    Share on other sites

    Posted · Help to modify gcode

    The Y axis (and X and Z axes) doesn't know where it is until it hits that limit switch.  So it MUST hit that limit switch before you can start moving things around.

     

    I take it back.  You can actually skip the homing procedure.  It's extra work.  You need to switch your machine settings from "ultigcode" to "marlin".

     

    You need to slice something and then hand edit the gcode and remove the G28 command (home).

     

    You need to manually home the 3 axes (put the X,Y, and Z axis where you want 0,0,0 to be) before you start printing.  That will probably work.

     

    BUT if you accidentally forget any of these steps you could break the pen.  Or at least get a lousy drawing.  Or if you are going through the controls and forget and do something like a "level bed" or some other command from the menu on the printer, it will likely try to home the axes.

  • Link to post
    Share on other sites

    Posted · Help to modify gcode
    2 hours ago, gr5 said:

    You need to switch your machine settings from "ultigcode" to "marlin".

     

    That's the crucial step.

     

    G-code-flavor "Ultimaker 2" signals the printer that the firmware is responsible for the start position, not a G-code. So change that to "Marlin" first.

    Once you have done that you can modify the start position in the start script. The default start script for "Marlin" contains useful comments -> should be a doable task.

     

    "Homing" in the back left corner seems to be still possible - so no further action needed for this task (as far as i can see).

     

  • Link to post
    Share on other sites

    Posted · Help to modify gcode
    47 minutes ago, tinkergnome said:

     

    "Homing" in the back left corner seems to be still possible - so no further action needed for this task (as far as i can see).

     

    Oh! I'm a dope! I misunderstood.  @babursaglam said the problem was in the Y direction but I was thinking he meant the X direction (hitting left side of printer).  So no need to modify printer!  The G28 (home command) should work fine and no hardware changes are necessary. 

     

    In this case tinkergnome's solution is best.

  • Link to post
    Share on other sites

    Posted · Help to modify gcode

    oh! great news. Thank you for your precious help, i will check the tips..  btw i did some other modifcations on the pen holder design. its much close to hotend boundary.. so i did dome tests with ball point pen and stabilo pen. 

    here are the results so far.

    bruce.jpg

    • Like 2
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • The Ultimaker Showcase — October 14. What's new?
        Your dear friends at Ultimaker have some exciting news and insights for you!
         
        • 0 replies
      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 8 replies
    ×
    ×
    • Create New...