Hello Guys!
I tried to make a "main" program, but I had an issue. In the first level , I want to choose the type of product, second level what to do with the product ( this is necessary, because, if the robot stops meanwhile the production , in this case we should start the robot from the middle of his cycle ) .
In the third level will be the programs, whit the movements .
If the robot finished his third level program, the program jump back to the second level, is it possible, to jump form the third level to the first one ?
Thanks for the answers !!!
Level1:
IF DO[125:ON ]=ON,JMP LBL[1] ;
3: UALM[1] ;
4: ABORT ;
5: LBL[1] ;
6: WAIT DI[125:OFF]=ON ;
7: R[150]=GI[50:0] ;
8: ;
9: SELECT R[150]=1,CALL P1 ;
10: =2,CALL P2 ;
11: =3,CALL P3 ;
12: ELSE,CALL ABORT ;
13: JMP LBL[1] ;
Level2: Actually this is the Program "P1"
1:
2:
3: R[151]=GI[51:0] ;
4: ;
5: IF (R[151]=1)) THEN ;
6: CALL P1_1 ;
7: ELSE ;
8: ENDIF ;
9: ;
10: IF (R[151]=2)) THEN ;
11: CALL P1_2 ;
12: ELSE ;
13: ENDIF ;
Level3: Actually this is the Program "P1_1"
1:J P[HOME2] 100% CNT100 ;
2:UTOOL_NUM= ;
3:UFRAME_NUM= ;
4:WAIT DI[102:AREA_ST02]=ON ;
5:DO[102:AREA_ST02]=ON ;
6:CALL GRP1_CLOSE ;
7:J P[1] 100% CNT100 ;
8:J P[2] 100% CNT100 ;
9:J P[3] 100% CNT100 ;
!FRAME DROP POSITION IN ST02 POS1 ;
10:L PR[4:DROP_FR_ST2_P1] 500mm/sec FINE ;
11:CALL GRP1_OPEN ;
!DRIVE UP IN "Z" AFTER DROP POSITION ;
12:PR[X]=LPOS ;
13:PR[X,3]=PR[X,3]+80 ;
14:L PR[X] 500mm/sec CNT100 ;
15:J P[5] 100% CNT100 ;
16:J P[6] 100% CNT100 ;
17:J P[HOME1] 100% CNT100 ;
18:DO[102:AREA_ST01]=OFF ;
/END