Robot sometimes stopped

I have a problem, I'm looking for help!
The robot stops at  indicator
IF nModel <> RobGI_Model AND RobGI_Model <> 0 THEN 
every now and then

I have no idea why. Maybe someone will notice the problem.

PROC CycleModel_M43()
        !
        MoveJ pNearPick, vmax, z300, HandTool;
        WHILE PI_T3_ReadyPick_R34 = 0 AND PI_T3_ReadyBrush_R34 = 0 DO
            CheckAccessReq;
            IF nModel <> RobGI_Model AND RobGI_Model <> 0 THEN
            WaitTime \InPos,3;
            IF nModel <> RobGI_Model AND RobGI_Model <> 0 THEN
                    RETURN;
                ENDIF
            ENDIF
        ENDWHILE
        IF PI_T3_ReadyBrush_R34 = 1 THEN
            Brush_Glass_M43;
            WHILE PI_T3_ReadyPick_R34 = 0 DO
                    CheckAccessReq;
            ENDWHILE
            Pick_Glass pPick_M43;
            IF DI_VacuumSens_R34=0 THEN
                RETURN;
            ENDIF
            !
            MoveJ pNearPlace, vmax, z50, HandTool;
            WHILE PI_C32_Ready_R34=0 DO
                    CheckAccessReq;
            ENDWHILE
            Place_Glass pPlace_M43;
        ELSE
            IF PI_T3_ReadyPick_R34 = 1 THEN
                Pick_Glass pPick_M43;
                MoveJ pNearPlace, vmax, z50, HandTool;
                WHILE PI_C32_Ready_R34=0 DO
                        CheckAccessReq;
                ENDWHILE
                Place_Glass pPlace_M43;
            ENDIF
        ENDIF    
        !
        MoveJ pHome, vmax, z50, HandTool;
  ENDPROC
  !
  PROC Brush_Glass_M43()
      !
      GetData;
      BrushDW1;
      MoveL Reltool(pBrush_01_M43,nBrush_Off_X_R34,nBrush_Off_Y_R34,nBrush_Off_Z_R34-50\Rz:=nBrush_Off_Rot_R34), vMid, z5, Brush_Tool_1\WObj:=wobj_Brushing;
      IF FALSE THEN
          ! Execute the following instruction to modify the position
          pBrush_01_M43:=CRobT (\Tool:=Brush_Tool_1\WObj:=wobj_Brushing);
          MoveL pBrush_01_M43, v100, fine, Brush_Tool_1,\WObj:=wobj_Brushing;
      ENDIF
      MoveL Reltool(pBrush_01_M43,nBrush_Off_X_R34,nBrush_Off_Y_R34,nBrush_Off_Z_R34\Rz:=nBrush_Off_Rot_R34), vMid, z0, Brush_Tool_1,\WObj:=wobj_Brushing;
      Set DO_BrushStart_R34;
      Set PO_Brush_Done;
      !PulseDO\PLength:=nBrush_Time_1_R34, PO_Brush_Done;
      WaitTime\InPos,nBrush_Time_1_R34;
      Reset PO_Brush_Done;
      Set DO_BrushUP1_R34;
      Reset DO_BrushDW1_R34;
      Reset DO_BrushStart_R34; Incr nBrush_1;
      MoveL Reltool(pBrush_01_M43,nBrush_Off_X_R34,nBrush_Off_Y_R34,nBrush_Off_Z_R34-50\Rz:=nBrush_Off_Rot_R34), vMid, z5, Brush_Tool_1\WObj:=wobj_Brushing;
      MoveJ pPickPrep_M43, vmax, z20, HandTool\WObj:=wobj_Brushing;
      BrushUP1;
      !
  ENDPROC
  !
  PROC Init_Model_M43()
      !
      !Insert init instruction
      !
  ENDPROC
  !
ENDMODULE

Comments

  • lemster68
    lemster68 ✭✭✭
    What do you mean by "robot stops"?  Program execution stops or the program is running and the program pointer appears to be stuck on that line of code?  Which instance of that code is it?  There are two.
    Lee Justice
  • Bogusław
    Bogusław
    edited March 21
    https://saintgobain-my.sharepoint.com/:i:/r/personal/boguslaw_krol_saint-gobain_com/Documents/20250321_092647.jpg?csf=1&web=1&e=PzJBEC

    Today, I managed to take a picture of the situation, probable problem is the indicator went too far, what should I do?
  • lemster68
    lemster68 ✭✭✭
    I cannot view that link because I don't have a sign on there.
    Lee Justice
  • PROC CycleModel_M1()
            !
            MoveJ pNearBrush_R33, vmax, z100, HandTool_R33;
            GetData;
            WHILE PI_T3_BrushReady_R33 = 0 DO
                CheckAccessReq;
                IF nModel_R33 <> RobGI_Model AND RobGI_Model <> 0 THEN
                        RETURN;
                    ENDIF
            ENDWHILE
            IF PI_T3_BrushReady_R33 = 1 THEN
                Brush_Glass_M1;
            ENDIF
            !
            MoveJ pHome_R33, vmax, z300, HandTool_R33;
            WaitTime 0.5;
            Set PO_T3_Free_R33;
      ENDPROC
      !
      PROC Brush_Glass_M1()
          !
          Reset PO_OK_TO_Brush_R33;
          Reset PO_T3_Free_R33;
          MoveL Offs(pBrush_01_M01,0,0,50), vmax, z5, BrushTool_1_R33\WObj:=wobj_Brushing_R33;
         Set DO_BrushDW1_R33;
         Reset DO_BrushUP1_R33;
          IF FALSE THEN
              !  Execute the following instruction to modify the position
              pBrush_01_M01:=CRobT (\Tool:=BrushTool_1_R33\WObj:=wobj_Brushing_R33);
              MoveL pBrush_01_M01, v100, fine, BrushTool_1_R33,\WObj:=wobj_Brushing_R33;
          ENDIF     
          MoveL RelTool(pBrush_01_M01,nBrushOff_X_1_R33,nBrushOff_Y_1_R33,nBrushOff_Z_1_R33\Rz:=nBrushOff_Rot_1_R33), vmax, z0, BrushTool_1_R33\WObj:=wobj_Brushing_R33;
          Set DO_BrushStart1_R33;
          WaitDI DI_BrushDW1_Sens_R33, 1;
          WaitTime\InPos,nBrush_Time_1_R33;
          Reset DO_BrushStart1_R33; Incr nBrush_1;
          Reset DO_BrushDW1_R33;
          Set DO_BrushUP1_R33;
          MoveL Offs(pBrush_01_M01,0,0,50), vmax, z20, BrushTool_1_R33\WObj:=wobj_Brushing_R33;
          MoveL Offs(pBrush_02_M01,0,0,50), vmax, z5, BrushTool_2_R33\WObj:=wobj_Brushing_R33;
         Set DO_BrushDW2_R33;
         Reset DO_BrushUP2_R33;
         WaitDI DI_BrushUP1_Sens_R33, 1;
          IF FALSE THEN
              !  Execute the following instruction to modify the position
              pBrush_02_M01:=CRobT (\Tool:=BrushTool_2_R33\WObj:=wobj_Brushing_R33);
              MoveL pBrush_02_M01, v100, fine, BrushTool_2_R33,\WObj:=wobj_Brushing_R33;
          ENDIF
          MoveL RelTool(pBrush_02_M01,nBrushOff_X_2_R33,nBrushOff_Y_2_R33,nBrushOff_Z_2_R33\Rz:=nBrushOff_Rot_2_R33), vmax, z0, BrushTool_2_R33\WObj:=wobj_Brushing_R33;
          Set DO_BrushStart2_R33;
          WaitDI DI_BrushDW2_Sens_R33, 1;
          WaitTime\InPos,nBrush_Time_1_R33;
          Reset DO_BrushStart2_R33; Incr nBrush_2;
          Reset DO_BrushDW2_R33;
          Set DO_BrushUP2_R33;
          MoveL Offs(pBrush_02_M01,0,0,50), vmax, z5, BrushTool_2_R33\WObj:=wobj_Brushing_R33;
          MoveL Offs(pBrush_02_M01,0,-300,200), vmax, z5, BrushTool_2_R33\WObj:=wobj_Brushing_R33;
          PulseDO\High\PLength:=3, PO_OK_TO_Brush_R33;
          PulseDO\PLength:=3, PO_T3_BrushDone_R33;
          !Robot wait eco signal from plc brush done
          WaitDI PI_Brush_OK_R33, 1;

          !
      ENDPROC
  • Braap
    Braap
    edited March 25

    Hey Boguslaw, Could you please provide us with the link access?

    I noticed there's an issue in the following instruction:

    IF nModel_R33 <> RobGI_Model AND RobGI_Model <> 0 THEN  
    

    It is followed by a RETURN;, but there are no further instructions after the RETURN command. Additionally, there should be another routine beforehand that sets the value for nModel_R33 and the two group inputs.

    Also, the syntax should be written as:

    nModel_R33 = RobGI_Model = 0) THEN  IF (nModel_R33 = RobGI_Model) OR (

    Otherwise, it will always evaluate to 0.

    In general, there's another issue:

    IF FALSE THEN  
    

    If FALSE, then what? You need to declare a variable that defines whether it’s true or false.

    Greets,

    Post edited by Braap on

    Robotic Software Engineer
  • DenisFR
    DenisFR ✭✭✭
    Hello,
    Is RobGI_Model  a GInput?
    Then you have to test it with:
    IF (nModel <> GInput(RobGI_Model)) AND (GInput(RobGI_Model) <> 0) THEN
    You should have a message in logger for this type of error.


    ☑️2024 - RobotStudio® User Group

  • Hello, 
    I did the analysis, the signal in the pLC PO_AutoON is lost.
    Robot stops, R - robot, W - Pointer

    R       MoveL Offs(pBrush_02_M01,0,0,50), vmax, z5, BrushTool_2_R33\WObj:=wobj_Brushing_R33;
          PulseDO\High\PLength:=3, PO_OK_TO_Brush_R33;
          PulseDO\PLength:=3, PO_T3_BrushDone_R33;
          !Robot wait eco signal from plc brush done
    W      WaitDI PI_Brush_OK_R33, 1;

    Abb suggests there is a communication problem, but why always in the same place.
  • Hi ...
    I saw that your zones are not fine, so perhaps the pulse is being given at different times when running in automatic and manual mode (the robot's movement is much slower and takes much longer to reach its destination). Depending on the logic used in the PLC, these times may be causing a problem - use a signal analyzer to check this.
    Try using a fine movement before pulsing your signal and see if anything changes.
    Check if in 100% manual execution the robot is stopping in the same way or the program continues.
    Good Job
  • lemster68
    lemster68 ✭✭✭
    On the Pulse topic, I avoid it always.  Causes too many issues.
    Lee Justice
  • Hi Lee Justice

    Would you think of offering som coaching with my assignment with robotstudio, i would definately compensate for your time. 

    Best regards 
    Charles 

  • lemster68
    lemster68 ✭✭✭
    What is it that you need to do with Robotstudio?  Be advised that I don't use it much.
    Lee Justice