Missing Part Jump label help

  • I am trying to write code so when the robot doesn't pick up the correct amount of boxes, it takes the boxes it does have, and places them on the ground and starts over again. Right now I have 6 zones that pick up 4 boxes. When all 6 zones are full I have 6 DIs in 1 GI that equals 4232. My logic was this


    1: GO[2:ZONE SOLS]=0 ;

    2: LBL[1] ;

    3: UTOOL_NUM=1 ;

    4: DO[25:DONE PICKING]=OFF ;

    5: GO[1:BLOWER]=63 ;

    6:J P[1] 100% FINE ;

    7: WAIT UI[15]=ON TIMEOUT,LBL[100] ;

    8: GO[1:BLOWER]=63 ;

    9: !PICK UP BOXES ;

    10:L P[2] 2000mm/sec FINE ;

    11: WAIT .50(sec) ;

    12:L P[1] 1000mm/sec FINE ;

    13: IF GI[2]<=4000,JMP LBL[2] ;

    14: DO[25:DONE PICKING]=ON ;

    15: END ;

    16: !Waiting for parts to pick ;

    17: JMP LBL[101] ;

    18: LBL[100] ;

    19:J P[1] 100% FINE ;

    20: GO[1:BLOWER]=0 ;

    21: WAIT UI[15]=ON ;

    22: !Back to beginning when UI5=on ;

    23: ! ;

    24: LBL[101] ;

    25: !Drop bad boxes ;

    26: LBL[2] ;

    27:J P[1] 50% FINE ;

    28:L P[3] 2000mm/sec FINE ;

    29:J P[4] 50% FINE ;

    30: GO[2:ZONE SOLS]=63 ;

    31: WAIT 1.00(sec) ;

    32:J P[3] 50% FINE ;

    33: !Back to top to retry pick ;

    34: JMP LBL[1] ;


    For some reaseon, even though only have 3 boxes and my GI2 = 127, the robot ends the program and goes to place the boxes on the pallet. Why issn't my IF statement woring when GI2 was less than 4232?

    Edited once, last by cat91345 ().

  • Are you sure your GI value was correct? Can you step thru the code and reproduce the issue? Maybe an input is flickering, you could store the GI value in a register that way you can see what the value actual was at that point in time.


    If it is flickering then you need to adjust the sensors or add debounce logic.

  • Are you sure your GI value was correct? Can you step thru the code and reproduce the issue? Maybe an input is flickering, you could store the GI value in a register that way you can see what the value actual was at that point in time.


    If it is flickering then you need to adjust the sensors or add debounce logic.

    I know it wasn’t a constant number. When I stepped through the program the number was around 4200. That’s why I adjusted the number down to 4000. The debouncing seems like a good idea Because this logic worked in Roboguide. Of course I wouldn’t have any variation in the software compared to real IO

Advertising from our partners