User stock removal programs
15.4 Determine point of intersection between two contour elements (INTERSEC)
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
703
The values defined with CONTPRON must be observed when transferring the contours:
Parameter Significance
2 Coding of contour mode for the movement
3 Contour start point abscissa
4 Contour start point ordinate
5 Contour end point abscissa
6 Contour end point ordinate
9 Center point coordinates for abscissa (only for circle contour)
10 Center point coordinates for ordinate (only for circle 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 the variables
ISCOORD (1st element = abscissa, 2nd element = ordinate). If no intersection exists, the
program jumps to NOCUT (no intersection found).
Program code Comments
DEF REAL TABNAME1[12,11] ; Contour table 1
DEF REAL TABNAME2[10,11] ; Contour table 2
DEF REAL ISCOORD [2] ; Variable for the point of
intersection coordinates.
DEF BOOL ISPOINT ; Variable for the intersection
status.
DEF INT MODE ; Variable for machining type.
…
MODE=1 ; Calculation independent of the
active plane.
N10 ISPOINT=INTERSEC(TABNAME1[3],TABNAME2[7],ISCOORD,MODE) ; Call point of intersection of
the contour elements.
N20 IF ISPOINT==FALSE GOTOF NOCUT ; Jump to NOCUT
…