User stock removal programs
14.4 Intersection of two contour elements (INTERSEC)
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
14-13
Note
Please note that variables must be defined before they are used.
The values defined with CONTPRON must be observed when transferring the contours:
Parameter 2 Coding of contour mode for the movement
Parameter 3 Contour start point abscissa
Parameter 4 Contour start point ordinate
Parameter 5 Contour end point abscissa
Parameter 6 Contour end point ordinate
Parameter 9 Center point coordinates for abscissa (only for circuit
contour)
Parameter 10 Center point coordinates for ordinate (only for circuit
contour)
Example
Calculate the intersection of contour element 3 in table TABNAME1 and contour element 7 in
table TABNAME2. The intersection coordinates in the active plane are stored in CUT (1st
element = abscissa, 2nd element = ordinate). If no intersection exists, the program jumps to
NOCUT (no intersection found).
DEF REAL TABNAME1 [12, 11] ;Contour table 1
DEF REAL TABNAME2 [10, 11] ;Contour table 2
DEF REAL ISCOORD [2] ;Intersection coordinates when ISPOINT =
1
DEF BOOL ISPOINT ;Variable for the intersection status
DEF INT MODE ;Defining machining type
…
MODE = 1 ;Calculation regardless of active plane
N10 ISPOINT=INTERSEC (TABNAME1[16,11],TABNAME2[3,11],ISCOORD, MODE)
;Call intersection of contour elements
N20 IF ISPOINT==FALSE GOTOF NOCUT ;Jump to NOCUT
…