Smartgripper Vaccuum implementation in SearchL instruction

Can someone please help me with an issue I am facing with the vacuum function of my Smartgripper used in a project involving an Abb YuMi IRB14000 robot?

I am unsure of how to work with the SignalGI variable, which seems to be a requirement for my Smartgripper. I have tried using the SearchL or the Stop commands, but they do not seem to work with SignalGI.

The following instruction is getting error, because the SearchL command requires a 0/1 signal from a SignalDi input, but the "hand_ActualPressure2_L" is the SignalGi variable which I have because of the Smartgripper by default, and is not compatible with the SearchL command. 

            SearchL \Stop, hand_ActualPressure2_L, p10, p20, v50, GripperL;

So my currently working solution involves moving the robot 1 mm in a While loop 
To pick up an object, I am using SignalGI as a condition in the loop, but I am aware that this is not the most optimal approach.

            MoveL p10, v100,fine,GripperL;            g_VacuumOn2;            WHILE hand_ActualPressure2_L > 88 DO                MoveL Offs(endpos, 0,0, -1 * Z_position), v30, z0, GripperL;                TPWrite ( ValToStr(hand_ActualPressure2_L) );                WaitTime 0.1;                Z_position := Z_position + 1;            ENDWHILE

 Any advice or guidance on this matter would be greatly appreciated. 
Thank you for your help!


  • DenisFR
    DenisFR ✭✭✭
    I think you can trig a routine with ISignalGI connected to hand_ActualPressure2_L.
    In this routine you can check its value then set a PERS bool that you use into SearchL.

  • See if that fixes it...

    PERS bool conditionOk:=FALSE;
    VAR intnum sig1int;

    PROC main()
         CONNECT sig1int WITH iroutine1;
         ISignalGI gi1, sig1int;

         WHILE TRUE DO
             IF conditionOk conditionOk:=FALSE;

    TRAP iroutine1
         IF hand_ActualPressure2_L <= 88 ConditionOk:=TRUE;

    PROC BuscaObj()
         SearchL \Stop, conditionOk=TRUE, p10, p20, v50, GripperL;

    Test and mark UP if it solved.