14
12.98 User Stock Removal Programs
14.4 Intersection of two contour elements: INTERSEC
14
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA) – 04.00 Edition
14-477
The indicated status specifies whether or not an
intersection exists (TRUE = intersection, FALSE = no
intersection).
Additional notes
Please note that variables must be defined before
they are used.
Programming example
Calculate the intersection of contour element 3 in
table KTAB1 and contour element 7 in table KTAB2.
The intersection coordinates in the active plane are
stored in CUTCUT (1st element = abscissa, 2nd
element = ordinate).
If no intersection exists, the program jumps to
NOCUT (no intersection found).
DEF REAL KTAB1 [12, 11]
Contour table 1
DEF REAL KTAB2 [10, 11]
Contour table 2
DEF REAL CUT [2]
Intersection table
DEF BOOL ISPOINT
Variable for status
…
N10 ISPOINT=INTERSEC (KTAB1[3],KTAB2[7],CUT)
Call intersection of contour elements
N20 IF ISPOINT==FALSE GOTOF NOCUT
Jump to NOCUT
…