RobotStudio event

MoveL until a certain force is reached?

Hello,

I am currently working on a new solution and would like to know if it is possible to very slowly push into an object using MoveL until a certain force is reached?

The force should not be high, but just enough to really make sure that the tool is touching the object before continuing running the program.

Is this possible, or am I better of just using vision for the coordinates?

Thank you for your help!

Answers

  • Hi...
    You could use a combination of functions to achieve the result. I don't know if this is the best way, as there are very good force and torque tools on the market, but here is a possible solution.

    Use the 'SearchL' instruction, for the stop parameter use a persistent 'pers1' that will be set if the 'GetMotorTorque' function returns the torque you want.

    Something like...

    Create a service task...
    ! Task T_Service
    MODULE ModuleServ
        PERS bool pers1:=FALSE;
    
        PROC main()
            WHILE TRUE DO
                WaitTime 0.1;
    
                IF GetMotorTorque(2)>100 THEN
                    pers1:=TRUE;
                ELSE
                    pers1:=FALSE;
                ENDIF
            ENDWHILE
        ENDPROC
    ENDMODULE<br>

    In the main task...
    ! Task T_ROB
    MODULE ModuleMain
        CONST robtarget P_1:=[[1460.18,0.03,891.70],[1.7032E-05,-1.20961E-05,-1,-3.00855E-05],[-1,0,-2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
        CONST robtarget P_2:=[[1460.18,0.03,191.70],[1.7032E-05,-1.20961E-05,-1,-3.00855E-05],[-1,0,-2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
            
        PERS bool pers1;
        
        PROC main()
             SearchL pers1,P_1,P_2,v100,tool0;
        ENDPROC
    ENDMODULE

    Maybe it needs changes, but that's the idea, test it and get feedback.