Jump to content

Help to modify gcode


babursaglam

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

    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
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...