Homing program?

  • Hey guys!
    yesterday I had a conversation with another robot programmer and he told me a homing program is very important! But at that moment I didn't pursue his mention.
    But later yesterday I started questioning myself, how he would do it in that case...
    In my opinion a homing program is a subroutine that is called, in which it will directly move to home position. But I guess in a real "homing program" it will determine it's current position, and from there on decide the best way to it's home position without colliding with any object or something like that?
    Just curious! :toothy9:
    So... I stole his program out of the controller when no-one was looking :winking_face:
    It was an ABB robot, but that doesn't mean that it's not suitable for this discussion:
    it was like: if x axis is < 1000 then ... = 1000
    the same for y axis, and twice for z axis (+ and -)
    Couldn't go any further that day.. so that's all i have for now
    Maybe someone knows a bit more? :fine:
    Have a good day guys!

  • Yes indeed, I know that. but what if the robot needs to follow a specific path from it's current position (which can be anywhere) to it's home position?
    I a case where the robot has to travel over some barrier or obstacle... you can't just take the quickest way back with JMOVE or something like that, it would cause a crash!

  • Recovery programs have to be 'fool proof' in my opinion, many variables can cause them to go wrong, but when programmed right, can be very effective.
    - But what happens should a collision occur........do you really want to auto recover if there is a mechanical issue that disrupts zeroing or mechanical alignment?


    DEST command is useful for recovery process.
    Height checking also is not to bad - especially for pick and place, as most directions to recover are vertical (not in all cases though) - but should always have some reference to max joint angle so not to introduce motion out of range errors.....
    - Nice area to play around with........


    .PROGRAM recovery()
    ;========================================================
    ;Program obtains all joint angles (4 axis robot) based on current location.
    ;Creates a new joint angle location
    ;But adjusts JT2 by subtracting 25 degrees from original value.
    ;and adds 12 degrees to JT3 to the original value.
    ;Resulting in a new location that moves JT2 back and JT3 up........from current location.
    ;If not at home.
    ;Then moves home.
    ;========================================================
    IF SIG(-27) THEN ;if signal is off then robot is not home
    DECOMPOSE temp[1] = #HERE
    POINT .#temp = #PPOINT(temp[1],temp[2]-25,temp[3]+12,temp[4])
    JMOVE .#temp
    END
    HOME


    .PROGRAM recovery2()
    ;========================================================
    ;Program to check height(z) compared to home location height(z)
    ;If the z value of home location is more than current location, then
    ;creates a temp location(z) with the home(z) value and moves to it.
    ;If not, it automatically moves to home location.
    ;It will always move to home location.
    ;========================================================
    POINT home_copy1 = #HOME(1)
    IF DZ(home_copy1) > DZ(HERE) THEN; If Z of home is greater than Z of where I am.
    HERE temp; new location
    POINT/Z temp = home_copy1; replace z of home_copy1 with current z value.
    LMOVE temp; move now to new location which is current location but with Z value of home
    END
    HOME

  • Hi.


    I think that the problem planted cannot be solved in AS language, due to the controller does not have information about the obstacles (where and how are). This is a path planning problem and there are mathematical algorithms to solve it. You could use them in Mathlab, Phyton or similar structured languages but you need the information about the obstacles mentioned above in order to avoid them.


    :icon_mrgreen: :icon_mrgreen:

  • I've seen it done this way:


      • Robot performs a "standard" motion trajectory for it's application. Say the robot reaches deep inside a machine.

      • Various "safe points" are recorded along the trajectory.

      • For whatever reason, the robot is off it's normal trajectory, or wakes up out of sequence.

      • The robot uses standard position query methods to determine it's current location. This also includes an analysis of the arm configuration (lefty/righty, up/down, flip/noflip)

      • A comparison is made of it's current pose and the series of safe points. Moves to nearest safe point. Re-compares everything to verify it's pose is good.

      • Commence retraction from machine to a suitable re-start location.


    Can be done, but is a lot of work and still not 100%. I always found it easier to effectively train the operators how to recover from a crash or cold-start.

  • Here I have a homing program for a ABB robot, which only reaches linearly into machines, typical pick and place software.
    Not 100% sure I understand it, but it matches with Kwakisaki's 2nd recovery program, but then it's not only comparing it's height but also the X and Y value in relation to the WObj0 (which is the default work object in ABB)


    MODULE Home
    ! Send robot to home position
    ! ***************************************************
    PROC go_to_Home()
    ConfJ\On;
    ConfL\On;
    pActposhome := CRobT(\Tool:=Tool_1 \WObj:=Wobj0);
    IF pActposhome.trans.Z < 850 THEN
    pActposhome.trans.z := 990;
    MoveL pActposhome, v300, fine, Tool_1;
    ENDIF
    IF pActposhome.trans.Z > 1000 THEN
    pActposhome.trans.z := 1000;
    MoveL pActposhome, v300, fine, Tool_1;
    ENDIF
    IF pActposhome.trans.X > 1000 THEN
    pActposhome.trans.X := 750;
    MoveL pActposhome, v300, fine, Tool_1;
    ENDIF
    IF pActposhome.trans.Y > 800 THEN
    pActposhome.trans.Y := 400;
    MoveJ pActposhome, v300, fine, Tool_1;
    ENDIF
    MoveJ pHome, v300, z10, Tool_1;
    ENDPROC


    ! Send robot to base position 1 ( Product_pickup )
    ! **************************************************
    PROC Base_position_1()
    MoveJ pBase_1, SpdToolNoEmpty, z100, Tool_1;
    ENDPROC


    ! Send robot to base position 2
    ! *********************************
    PROC Base_position_2()
    MoveJ pBase_2, SpdToolNoEmpty, z200, Tool_1;
    ENDPROC


    ! Send robot to base position 3
    ! *********************************
    PROC Base_position_3()
    MoveL pBase_3, SpdToolNoEmpty, z200, Tool_1;
    ENDPROC


    ! Send robot to base position 4
    ! *********************************
    PROC Base_position_4()
    Movej pBase_4, SpdToolEmpty, z200, Tool_1;
    ENDPROC

    ! Send robot to base position 5
    ! *********************************
    PROC Base_position_5()
    MoveJ pBase_5, SpdToolEmpty, z200, Tool_1;
    ENDPROC

    ! Send robot to base position 6
    ! *********************************
    PROC Base_position_6()
    MoveJ pBase_6, SpdToolEmpty, z80, Tool_1;
    ENDPROC

    ! Send robot to base position 7
    ! *********************************
    PROC Base_position_7()
    MoveJ pBase_7, SpdToolEmpty, z80, Tool_1;
    ENDPROC
    PROC Calirb()
    MoveAbsJ [[0,0,0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]\NoEOffs, v1000, z50, Tool_1;
    ENDPROC

    ENDMODULE


  • Are we discussing ABB code and what it means?
    - If so, this will need to moved to ABB forum.


    Partly yes, but it's because I want something similar for the Kawasaki.
    Can we also teach something like working areas? I know you can use working areas to trigger a signal. but for guidance back to a home position?
    I want the operator to press one of the buttons located on around the working cell>robot finishes the "putaway" cycle and then moves to home.
    Then it releases the gate locks and the gates can be opened. But there's one button for each door, opening independently so I think this is done through our PLC. Maybe it's more simple than I thought but it's about safety so I'm gonna put a little more study into this haha!

  • Quote

    Can we also teach something like working areas? I know you can use working areas to trigger a signal. but for guidance back to a home position?


    You can 'monitor' for those signals to determine which workspace the robots TCP is currently in and therefore call in a recovery program specific for the workspace.
    - But you cant drive to a workspace because it is made up of upper co-ordinates and lower co-ordinates.
    - Workspace is a dedicated signal, not dedicated location as the location is relative to the BASE, which can be moved around.


    Why not just:
    - Monitor for the input (PC Program).
    - If seen, set a cell entry request flag
    - Then in the main program and when it finishes, check for the cell entry request flag and move to pre-set via locations to home.
    - Wait there for cell start input on side of cell of input and safety gates closed, reset the flag and continue.

Advertising from our partners