This PCM program will check an angled plane and verify its position before it runs the program. This PCM code is entered as a Pre-Setting in the program.
This part has a surface that has a 17.90 degree angle. We will check that first thing in the program to determine if the part is loaded correctly.
Note: the stepRS(0,150,0) line skips the next command and in this case moves the probe 0 in X, 150 in Y, and 0 in Z) allowing the operator to reposition the part.
getActual("Error Proof Plane Measure").z
A1 = abs(deg(getActual("Error Proof Plane Measure").a1)-17.9)
A2 = abs(deg(getActual("Error Proof Plane Measure").a2))
if A1>0.5 then
stepRS(0,150,50())
message(" Part is Loaded Incorrectly ",cr()," Reload Part and Reset Traffic Light ")
cncbreak()
endif
if A2>0.5 then
stepRS(0,150,50())
message(" Part is Loaded Incorrectly ",cr()," Reload Part and Reset Traffic Light ")
cncbreak()
endif