更新KUKA程序
This commit is contained in:
19
KUKA/KRC/R1/Program/Mylib/CheckInPos.src
Normal file
19
KUKA/KRC/R1/Program/Mylib/CheckInPos.src
Normal file
@@ -0,0 +1,19 @@
|
||||
&ACCESS RVO
|
||||
DEFFCT BOOL CheckInPos (R_offset:IN,EndPos:IN )
|
||||
DECL REAL R_offset
|
||||
DECL BOOL b_Pok
|
||||
DECL E6POS ACT_Point
|
||||
DECL E6POS EndPos
|
||||
ACT_Point = $POS_ACT
|
||||
IF (ABS(ACT_Point.X - EndPos.X) > R_offset) OR (ABS(ACT_Point.Y - EndPos.Y) > R_offset) OR (ABS(ACT_Point.Z - EndPos.Z) > R_offset) OR (ABS(ACT_Point.A - EndPos.A) > 0.5) OR (ABS(ACT_Point.B - EndPos.B) > 0.5) OR (ABS(ACT_Point.C - EndPos.C) > 0.5) OR (ABS(ACT_Point.E1 - EndPos.E1) > R_offset) THEN
|
||||
b_Pok=FALSE
|
||||
ELSE
|
||||
b_Pok=TRUE
|
||||
ENDIF
|
||||
IF NOT b_Pok THEN
|
||||
MsgNotify("CheckInPosError", "OutArea", , , 1)
|
||||
;HALT
|
||||
ENDIF
|
||||
|
||||
RETURN b_Pok
|
||||
ENDFCT
|
||||
Reference in New Issue
Block a user