Advertising

2 lines of details instead of 1 line? Help!

  • Hope some helpful soul can help me in here!Right now trying to figure out a program in a robot cell that works for 2 CNC machines. The problem is that instead of adding 2 rows of details, it only puts down 1 row of details. Which means that the machine operators are not able to. Have tried to figure out how to succeed in putting down 2 rows but stuck in total .. ||

    I have not worked with anyone else's program before, someone who wants to help me and explain how I can solve this in the most smooth way?Adds the program in the comments!/ Amanda

  • AD
  • PROC main()
    Initialize;
    InitPickVision;
    ! SetNextTarget;
    WHILE TRUE DO
    SoftDeact \Ramp:= 150;
    Top:
    CheckSystem;

    MoveRobotTo ZONE_INBELT;
    SetNextTarget;
    Pick;
    RefPosOut;
    !MoveRobotTo ZONE_CHIRON6;
    !DeBurr;
    MoveRobotTo ZONE_REGRIP;
    LeaveRegrip1;
    MoveRobotTo ZONE_INBELT;
    SetNextTarget;
    Pick;
    RefPosOut;
    !MoveRobotTo ZONE_CHIRON6;
    !DeBurr;
    MoveRobotTo ZONE_REGRIP;
    LeaveRegrip1;
    PickRegrip1;

    Kravloop:
    WaitTime 0.5;
                       
    IF Ch6WithRobot=1 AND Ch6Ready=1 AND Ch6Unclamped=1 AND bDetailsOnRegrip=FALSE AND bEmptingCell=FALSE THEN
      
    MoveRobotTo ZONE_CHIRON6;
    LoadUnloadCh6;
    Chiron6Loaded;
    MoveRobotTo ZONE_CHIRON6;
    MoveRobotTo ZONE_WASHER;
    WashDetail;
    MoveRobotTo ZONE_WASHER;
    MoveRobotTo ZONE_BELTOUT;
    PartOut;
    GOTO Top;
    !!!!!!!!!!!!!!!!!!!!!!!!!!!

    ELSEIF Ch7Ready=1 AND Ch7Unclamped=1 AND bDetailsOnRegrip=FALSE AND bEmptingCell=FALSE THEN
       
    MoveRobotTo ZONE_CHIRON7;
    LoadUnloadCh7;
    Chiron7Loaded;
    MoveRobotTo ZONE_CHIRON7;
    MoveRobotTo ZONE_WASHER;
    WashDetail;
    MoveRobotTo ZONE_WASHER;
    MoveRobotTo ZONE_BELTOUT;
    PartOut;
    GOTO Top;
    !!!!!!!!!!!!!!!!!!!!!!!!!!!

    ELSEIF Doutput(DOF_DetInCh7)=0 AND Ch7Ready=1 AND bEmptingCell=TRUE THEN
    !Villkor för att plundra chiron 7, tvätt samt lämna på utbana.
    MoveRobotTo ZONE_CHIRON7;
    LoadUnloadCh7;
    MoveRobotTo ZONE_CHIRON7;
    MoveRobotTo ZONE_WASHER;
    WashDetail;
    MoveRobotTo ZONE_WASHER;
    MoveRobotTo ZONE_BELTOUT;
    PartOut;
    Set DOF_DetInCh7;
                           
    !!!!!!!!!!!!!!!!!!!!!!!!!!!

    ELSEIF DOutput(DOF_DetInCh6T1)=0 AND Ch6Ready=1 AND bEmptingCell=TRUE THEN
    !Villkor för att plundra chiron 6, tvätt samt lämna på utbana.
    MoveRobotTo ZONE_CHIRON6;
    LoadUnloadCh6;
    MoveRobotTo ZONE_CHIRON6;
    MoveRobotTo ZONE_WASHER;
    WashDetail;
    MoveRobotTo ZONE_WASHER;
    MoveRobotTo ZONE_BELTOUT;
    PartOut;
    Set DOF_DetInCh6T1;
    !!!!!!!!!!!!!!!!!!!!!!!!!!!

    ELSEIF DOutput(DOF_DetInCh7)=1 AND Ch7Ready=1 AND Ch6WithRobot=1 AND Ch6Ready=1 AND DOutput(DOF_DetInCh6T1)=1 AND bEmptingCell=TRUE THEN
    MoveRobotTo ZONE_INBELT;
    bEmptingCell:=FALSE;
    AtGoHome;
    Reset DOF_DetInCh6T1;
    Reset DOF_DetInCh7;
    Stop;
           
    ENDIF
    GOTO Kravloop;
    ENDWHILE
    ENDPROC

  • PROC LoadUnloadCh6()
           
    MoveJ pViaChiron6,v7000,z200,tool0\WObj:=wobj0;

    ConfJ\On;
    ConfL\On;
    WaitDI Ch6DoorOpen,1;
    UnclampChiron6;
         
       
    !Rundningspunkter på väg in i maskin
    MoveJ [[176.12,-910.41,590.71],[0.999842,0.00950977,-0.00411877,-0.0144864],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v7000, z100, tGripper3\WObj:=wChiron6;
    MoveJ [[84.10,-175.03,171.80],[0.999708,-0.00171707,-0.00827346,0.0226394],[-2,-1,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v7000, z100, tGripper3\WObj:=wChiron6;
           
           
                   
    !Plundring av fixtur med Gripper 3
    MoveJ Offs(pLoadChiron6_1,0,0,100), v600, z10, tGripper3\WObj:=wChiron6;
    MoveL Offs(pLoadChiron6_1,0,0,50), v100, z0, tGripper3\WObj:=wChiron6;
    MoveL pLoadChiron6_1, v30, fine, tGripper3\WObj:=wChiron6;
           
    Grip3;
           
    MoveL Offs(pLoadChiron6_1,0,0,50), v200, z0, tGripper3\WObj:=wChiron6;
           
    !Rotation till blåsmunstycke och renblåsning av fixtur i positionerna nedan
    Set RenblasRobot;
    MoveJ [[305.25,140.85,371.92],[0.695391,0.12348,-0.697915,-0.118744],[-2,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v800, z20, tGripper3\WObj:=wChiron6;
    MoveJ [[304.67,-186.35,373.07],[0.695393,0.123471,-0.697912,-0.118757],[-2,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v800, z20, tGripper3\WObj:=wChiron6;
           
           
    MoveJ [[490.55,-184.49,373.06],[0.695396,0.123464,-0.697908,-0.118767],[-2,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron6;
    MoveJ [[468.75,30.10,372.38],[0.695395,0.123469,-0.697902,-0.118804],[-2,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron6;
    MoveJ [[314.25,30.88,372.29],[0.695416,0.123432,-0.69789,-0.118791],[-2,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron6;
    MoveJ [[314.81,151.89,372.37],[0.695429,0.123449,-0.697873,-0.118795],[-2,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron6;
           
    Reset RenblasRobot;
           
    !Rotera runt till Gripper 2 för att lämna detaljer i nästa position
           
           
    MoveJ Offs(pLoadChiron6_2,0,0,100), v500, z10, tGripper2\WObj:=wChiron6;
    MoveL Offs(pLoadChiron6_2,0,0,50), v100, z0, tGripper2\WObj:=wChiron6;
    MoveL pLoadChiron6_2, v30, fine, tGripper2\WObj:=wChiron6;
           
    Release2;
           
    MoveL Offs(pLoadChiron6_2,0,0,80), v500, z0, tGripper2\WObj:=wChiron6;
           
    Set Ch6Clamp;
           
           
    MoveJ [[179.69,-251.94,219.86],[0.999955,0.00277403,-0.00847331,-0.00323436],[-2,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v4000, z50, tGripper2\WObj:=wChiron6;
    MoveJ [[169.19,-910.26,741.71],[0.999933,-0.00734524,-0.00552569,-0.00701907],[-2,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v7000, z50, tGripper2\WObj:=wChiron6;
    MoveJ [[168.10,-904.15,1158.65],[0.00279504,-0.00708173,-0.999945,0.00728952],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v7000, z50, tGripper2\WObj:=wChiron6;
           
    WaitDI Ch6Clamped,1;
    Reset Ch6Clamp;
    PulseDO\PLength:=55,Ch6Loaded;
          
    !IWatch iCh6FeedHoldRob;
    !Set DOF_DetInCh6T1;
           
    !ClampChiron6;
          
    !MoveJ pViaRegrip,v7000,z200,tool0\WObj:=wobj0;
    WaitDO Ch6LoaderOut,1;
    !ISleep iCh6FeedHoldRob;
    RETURN ;
    ENDPROC



    PROC LoadUnloadCh7()
           
    MoveJ pViaChiron7,v7000,z200,tool0\WObj:=wobj0;
                    
    ConfJ\On;
    ConfL\On;
    WaitDI Ch7DoorOpen,1;
    UnclampChiron7;
           
    !Rundningspunkter på väg in i maskin
    MoveJ [[-577.55,550.96,1487.61],[0.652613,-0.258774,-0.661696,-0.263234],[1,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v7000, z100, tool0\WObj:=wobj0;
    MoveJ [[1866.85,-1822.70,275.06],[0.708663,0.00429367,-0.0140156,-0.705396],[1,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v7000, z100, tGripper3\WObj:=wChiron7;
                   
    !Plundring av fixtur med Gripper 3
    MoveJ Offs(pLoadChiron7_1,0,0,100), v600, z10, tGripper3\WObj:=wChiron7;
    MoveL Offs(pLoadChiron7_1,0,0,50), v100, z0, tGripper3\WObj:=wChiron7;
    MoveL pLoadChiron7_1, v30, fine, tGripper3\WObj:=wChiron7;
           
    Grip3;
           
    MoveL Offs(pLoadChiron7_1,0,0,50), v200, z0, tGripper3\WObj:=wChiron7;
           
    !Rotation till blåsmunstycke och renblåsning av fixtur i positionerna nedan
    MoveJ [[2316.17,-1932.63,154.00],[0.70542,-0.0687759,-0.0673675,-0.702222],[1,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v800, z20, tGripper3\WObj:=wChiron7;
    MoveJ [[2316.54,-2031.84,347.58],[0.436464,-0.435065,-0.552473,-0.561242],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v800, z20, tGripper3\WObj:=wChiron7;
           
    Set RenblasRobot;
           
    MoveJ [[2092.50,-2042.40,348.16],[0.436364,-0.435125,-0.552482,-0.561264],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron7;
    MoveJ [[2078.66,-2184.74,348.97],[0.436322,-0.435147,-0.552452,-0.561309],[1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron7;
    MoveJ [[2272.23,-2193.20,345.61],[0.436258,-0.435182,-0.552418,-0.561365],[1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron7;
    MoveJ [[2290.73,-2035.94,344.83],[0.436338,-0.435089,-0.552491,-0.561303],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v500, z20, tGripper3\WObj:=wChiron7;
           
    Reset RenblasRobot;
           
    !Rotera runt till Gripper 2 för att lämna detaljer i nästa position
    MoveJ [[2270.42,-2062.79,344.34],[0.485637,-0.479293,-0.515389,-0.518468],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v600, z20, tGripper3\WObj:=wChiron7;
    MoveJ [[2260.31,-1969.57,547.20],[0.170706,-0.67214,-0.68728,-0.216181],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v600, z20, tGripper3\WObj:=wChiron7;
           
    MoveJ Offs(pLoadChiron7_2,0,0,100), v500, z10, tGripper2\WObj:=wChiron7;
    MoveL Offs(pLoadChiron7_2,0,0,50), v150, z0, tGripper2\WObj:=wChiron7;
    MoveL pLoadChiron7_2, v30, fine, tGripper2\WObj:=wChiron7;
           
    Release2;
           
    MoveL Offs(pLoadChiron7_2,0,0,50), v500, z0, tGripper2\WObj:=wChiron7;
           
    Set Ch7Clamp;
           
    MoveJ [[1337.35,-1945.37,107.38],[0.702539,0.0148241,-0.00478374,-0.711476],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v4000, z50, tGripper2\WObj:=wChiron7;
    MoveJ pViaChiron7, v7000, z0, tool0\WObj:=wobj0;
           
    WaitDI Ch7Clamped,1;
    Reset Ch7Clamp;
    PulseDO\PLength:=55,Ch7Loaded;
           
    !IWatch iCh7FeedHoldRob;
    !Set DOF_DetInCh7;
           
    !ClampChiron7;
          
    !MoveJ pViaChiron7,v7000,z200,tool0\WObj:=wobj0;
    WaitDO Ch7LoaderOut,1;
    !ISleep iCh7FeedHoldRob;
    RETURN ;
    ! Only for position updating
    MoveL pLoadChiron7_1,v500,fine,tGripper2\WObj:=wChiron7;
    RETURN ;
    ENDPROC

  • PROC PartOut()
    StartAgain:
    ClearTempReg;
    WaitUntil bStartBeltOut=FALSE;
    IF nPartOut>PARTS_IN_ROW_OUT THEN
    bStartBeltOut:=TRUE;
    Clear nPartOut;
    GOTO StartAgain;
    ENDIF
    IF nPartOut=0 THEN
    Incr nPartOut;
    ENDIF
    nTempTransX:=ROW_OUT_OFFSET_X;
    nTempTransZ:=ROW_OUT_OFFSET_Z;
    TEST nPartOut
    CASE 1:
    !MoveJ pviaBeltOut, v2000, z40, tool0\WObj:=wobj0;
    PutPartOut pBeltOut,tGripper3,wCamera1;
    CalcPosOut nTempTransX,nTempTransY,nTempTransZ,nTempRotX,nTempRotY,nTempRotZ;
    pTempBeltOut:=pTempOut;
    !MoveJ pviaBeltOut,v2000,z40,tGripper3\WObj:=wCamera1;
    Incr nPartOut;
    DEFAULT:
    !MoveJ pviaBeltOut, v500, z40, tool0\WObj:=wobj0;
    PutPartOut pTempBeltOut,tGripper3,wCamera1;
    CalcPosOut nTempTransX,nTempTransY,nTempTransZ,nTempRotX,nTempRotY,nTempRotZ;
    pTempBeltOut:=pTempOut;
    !MoveJ pviaBeltOut,v2000,z40,tGripper3\WObj:=wCamera1;
    Incr nPartOut;
    ENDTEST
    IF nPartOut>PARTS_IN_ROW_OUT AND DInput(BeltOutFull)=0 THEN
    bStartBeltOut:=TRUE;
    Clear nPartOut;
    ENDIF
    RETURN ;
    ENDPROC




    PROC PutPartOut(
    robtarget target_Pos,
    PERS tooldata target_Tool,
    PERS wobjdata target_Wobj)

    MoveJ [[-1748.88,205.04,1047.72],[0.012169,-0.354105,0.934988,-0.0161162],[0,0,3,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v6000, z100, tGripper3\WObj:=wCamera1;
    !Nästa position är rundningspunkt runt tvättkar in mot utbana
    MoveJ [[-1669.63,837.11,318.05],[0.999797,-0.0171542,-0.000483275,-0.0105988],[0,-2,3,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v5000, z20, tGripper3\WObj:=wCamera1;
       
    MoveJ Offs(RelTool(target_Pos,0,0,0\Rx:=0\Ry:=0\Rz:=0),0,0,100), v4000, z40, tGripper3\WObj:=target_Wobj;
    WaitUntil bStartBeltOut=FALSE AND DOutput(StartBeltOut)=0;
    MoveL Offs(RelTool(target_Pos,0,0,0\Rx:=0\Ry:=0\Rz:=0),0,0,50), v3000, z40, tGripper3\WObj:=target_Wobj;
    MoveL Offs(RelTool(target_Pos,0,0,0\Rx:=0\Ry:=0\Rz:=0),0,0,20), v1500, z20, tGripper3\WObj:=target_Wobj;
    MoveL Offs(RelTool(target_Pos,0,0,0\Rx:=0\Ry:=0\Rz:=0),0,0,5), v200, z5, tGripper3\WObj:=target_Wobj;
    MoveL Offs(RelTool(target_Pos,0,0,0\Rx:=0\Ry:=0\Rz:=0),0,0,0), v80, fine, tGripper3\WObj:=target_Wobj;
    Release3;
    WaitTime 0.5;
           
    MoveL Offs(RelTool(target_Pos,0,0,0\Rx:=0\Ry:=0\Rz:=0),0,0,100), v4000, z20, tGripper3\WObj:=target_Wobj;
           
    !Nästa position är rundningspunkt runt tvättkar ut från utbana
    MoveJ [[-1703.13,57.28,450.56],[0.999798,-0.0171167,-0.000450573,-0.0105883],[1,-1,3,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v6000, z20, tGripper3\WObj:=wCamera1;
           
           
    pTempOut:=CRobT();
           
    RETURN ;
    ! Only for position updating
    MoveL pBeltOut, v6000, fine, tGripper3\WObj:=wCamera1;
    RETURN ;
    ENDPROC

  • Amanda.


    Looking at this code and from the Swedish comments in here i would think that this is code from a SVIA pickvision system,

    If you need help with this system the best thing would probably be to contact SVIA, now known as "ABB - Machine Tool Tending".

  • Now I have solved it!We had a CalcPosOut that I didn't really understand because it didn't work at all. The problem was that we had both in and out position to the conveyor belt which disturbed the whole process there. By moving these positions I could use this.

  • Amanda96

    What does it means more detail ?

    Can you send a picture of robot flex pendent ,to better understanding what you need ?


    On the conveyor belt on the runway, the robot simply put down a "Plock" in this case 2 pieces and then drove the conveyor belt. The wish was to make it lay down 2 "picks", ie 4 bits in width before sending the signal that it would send the conveyor belt.

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