4MELFA-BASIC IV
Detailed Explanation of Functions
4-342
Zone3
[Function]
Checks if the specified position is within the specified area (The cube which consists of the three points).
[Format]
[Terminology]
<
Position
1>
The position to be checked
<
Position
2>
The position of the first point that specifies the area.
<
Position
3>
The position of the second point that specifies the area.
<
Position
4>
The position of the point of specifying the plane which constitutes the area with
<the position 2> and <the position 3>
<
Equation
W>
Width of the cube which constitutes the area. [mm]
<
Equation
H>
Height of the cube which constitutes the area. [mm]
<
Equation
L>
Each depth from <the position 2> and <the position 3> of the cube which
constitutes the area. [mm]
[Reference Program]
1 M1=Zone3(P1,P2,P3,P4,100,100,50)
2 If M1=1 Then Mov P_Safe Else End
[Explanation]
1) This will check if position 1 is inside the cube area (Refer to diagram below) defined by the three points,
position 2, position 3 and position 3, and the Equation W, Equation H and Equation L.
If the point is inside the space, 1 is returned; otherwise, 0 is returned.
2)
This function checks whether the check position (X, Y, and Z coordinates) is within the specified area,
but does not take the posture components into consideration.
3) It is not possible to describe a function that contains an argument in <Position 1>, <Position 2>, <Position
3>, <Position 4>, <Equation W>, <Equation H> and <Equation L>. If such a function is described, an error
will be generated during execution.
4) If the negative value is inputted into <Equation W> and <Equation H>, the error occurs.
5) Since the specified area cannot be created if the same position or the position on the same straight line is
inputted into <Position 2>- <Position 4>, return -1, without checking.
By the negative number, <Equation L> returns -1, without checking, if the absolute value is less than the half of
the distance for <Position 2> and <Position 3>.
<
Numeric Variable
>= Z o n e 3 (
<Position 1>, <Position 2>, <Position 3>, <Position
4
>,
<
Equation
W>,<
Equation
H>,<
Equation
L>)
H
W
L
L
P1
P2
P3
P4