You are on page 1of 2
z In the next example, switching actions with DISTANCE specifications and also with PATH specifications are programmed. The individual switching points and the motion path are ilustrated in Fig, 50, » EF TRIG ( ) 5 ~ Declaration section - EXT BAS (BAS_COMMAND +IN,REAL DECL AXIS HOME INT I SIGNAL GLUE $oUur(3} 3 Initialization -. INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( ) INTERRUPT ON 3 BAS (#INITMOV,0 ) ;Initialization of velocities, jaccelerations, $BASE, §T0OL, etc. =35 ;Define approximation’ distance AL 0,A2 -90,A3 90,A4 0,A5 30,86 0} (POS: X 1564,¥ -114,2 713,A 128,B 85,C 22,8 6,7 50) {%1383,¥ -14,2 713,A 128,8 85,C 22) 1383,¥ 200,2 713,A 128,B 85,¢ 22) 1527,¥ 200, 713,A 128,B 85,C 22) 1527,¥ 352,2 713,A 128,B 85,C 22} FOR I=1 70 16 SOUR(I}=FALSE ENDFOR i Main section -. PIP HOME ;BCO run PIP POSO TRIGGER WHEN DISTANCE=0 DELAY=40 DO $OUT[1]=TRUE TRIGGER WHEN PATH=-30 DELAY=0 DO UP1(2) PRIO=-1 LIN Posi TRIGGER WHEN DISTANCE=1 DELA’ ‘TRIGGER WHEN PATH=180 DELAY: ‘TRIGGER WHEN PAT! LIN Pos? c_pIs IRIGGER WHEN DISTANCE-0 DELAY=40 DO PULSE ($OUT(5],TRUE,1.4 ) ‘TRIGGER WHEN PATH=-20 DELAY=-15 DO $OUT(®] LIN POS3 ¢_DIS. ‘TRIGGER WHEN DISTANCE-1 DELAY: IN) 50 DO GLUE=TRUE 5 DO PULSE(SOUT[ 4], TRUE,0.9) DELAY=40 Do $oUT(6]=TRUE 15 DO UP1 (7 ) PRIO= -1 LIN POS4 PIP HOME END DEF UPI (NR INT NR IF $IN{1]=-TRUE THEN SOUT(NR]=7RUE ENDIF END 174 of 218 8 _ Trigger ~ Path-related switching actions (continued) Pos1 30 J soonias 2 Pos 2 fe sous *20 Fig. 50 Switching points and motion path for the above example 175 of 218

You might also like