Start point

I have tripod printer. By gravity the tripod goes without power down to the bed.
So I would like a menu point to send the head of the tripod to a certain point to lay down the head on a holder.
Is something there that I missed?
Can I add that to the menu?
Thanks!

Comments

  • You have to modify firmware for this. Add a new menu entry in uimenu.h with a new action and implement it in ui.cpp in the okAction function as one case. There you can use 

    case YOUR_ACTION_CODE:
    GCode::executeFString(PSTR("G28\nG1 X0"));
    break;

    to execute your custom script.
  • I have added in UI.cpp
    ...
            break;
        case UI_ACTION_START:
            GCode::executeFString(PSTR("G28/nM104 S0/nG90/nG1 Z200/nG1 X-99 Y56/nG1 Z83/M84"));
            break;
        case UI_ACTION_ZPOSITION_NOTEST:
            Printer::setNoDestinationCheck(true);
    ...

    for uimenu.h I have no idea what to do!!
    In that area the entry should be:
    ...
    UI_MENU_ACTION2C(ui_menu_zpos_fast_notest,UI_ACTION_ZPOSITION_FAST_NOTEST,UI_TEXT_ACTION_ZPOSITION_FAST2);
    #endif
    UI_MENU_ACTION2C(ui_menu_epos,UI_ACTION_EPOSITION,UI_TEXT_ACTION_EPOSITION_FAST2);
    UI_MENU_ACTION2C(ui_menu_start,UI_ACTION_START,"Startpoint");
    :::
    /*
    ?ui_menu_start? what should be here?
    Thanks for your help!
  • I am also currently studying this question!
    I need a menu "install filament"
    execution of the item from the menu to be performed:
    Here's a code example
    Gcod "m109 s230\nG92 E0\nG1 E-50 f1000"
    until I do it is not derivable, need help!
    may have an example of the menu changes?

    it really would help!


  • Now in 0.92 the file looks different so my proposal on top is now different:

    ui,cpp:
    ...
            case UI_ACTION_SET_ORIGIN:
                if(!allowMoves) return false;
                Printer::setOrigin(0, 0, 0);
                break;
            case UI_ACTION_START:
                GCode::executeFString(PSTR("G28/nM104 S0/nG90/nG1 Z200/nG1 X-99 Y56/nG1 Z83/M84"));
            break;
            case UI_ACTION_DEBUG_ECHO:
    ...

    does that makes sense?
    for the uimenu.h I need some help...
  • I finally misused another function: Set Origin.

    in ui.cpp:
    (to write all in one line with /n as separation did not work)
           case UI_ACTION_SET_ORIGIN:
                //if(!allowMoves) return false;
                //Printer::setOrigin(0, 0, 0);
                GCode::executeFString(PSTR("G28"));
                GCode::executeFString(PSTR("M104 S0"));
                GCode::executeFString(PSTR("M140 S0"));
                GCode::executeFString(PSTR("G90"));
                GCode::executeFString(PSTR("G1 X-99 Y56 Z89"));
                GCode::executeFString(PSTR("M84"));
            break;

    and in ui.menu:
    //old call
    //UI_MENU_ACTIONCOMMAND_FILTER(ui_menu_quick_origin,UI_TEXT_SET_TO_ORIGIN,UI_ACTION_SET_ORIGIN,0,MENU_MODE_PRINTING)
    //new call - Ablage appears now instead of Set Origin in the menu
    UI_MENU_ACTIONCOMMAND_FILTER(ui_menu_quick_origin,"Ablage",UI_ACTION_SET_ORIGIN,0,MENU_MODE_PRINTING)
  • edited November 2014
    BTW:
    if I add in my editor (notepadd++) \r (= CR) to the \n then it works in one line:
    example:
    #define PAUSE_START_COMMANDS "G28\n\rG90\n\rG1 Z300\n\rG1 X99 Y56"

    (oops maybe I am wrong: I have to check again \n or /n ! the example atleast is working)
  • It's \n
    No need to delete action "ui_menu_quick_origin" just duplicate with new name and see where it gets added. Below that list is a counter that needs to be increased as well and voila, you have a new entry.
Sign In or Register to comment.