GetRobotInsidePlane Function
Returns a robot which is in the approach check plane.
Syntax
GetRobotInsidePlane (PlaneNum)
Parameters
- PlaneNum
- Specifies the number of the entry detection plane (an integer from 1 to 15) whose status is to be returned.
Return Values
Returns the number of the robot that is in the approach check plane specified with PlaneNum in bit.
Bit 0 : Robot 1 ……… Bit 15 : Robot 16
If the robot doesn’t configure the approach check plane, it always returns bit 0.
For example, Robot 1, Robot 3 are in the approach check plane, bit 0, bit 2 will be On and 5 will be returned.
See Also
InsidePlane, Plane
GetRobotInsidePlane Function Example
The following program uses the GetRobotInsidePlane function.
Wait for the status that no robots are in the approach check plane.
Function WaitNoPlane
Wait GetRobotInsidePlane(1) = 0
Wait for the status Robot 2 is only one in the approach check plane.
Function WaitInPlaneRobot2
Wait GetRobotInsidePlane(1) = &H2
The following program uses the GetRobotInsidePlane function in the parallel processing of the motion command. When a robot is in the specific approach check plane while it is running, it turns ON the I/O. One robot is connected to the controller in this case.
Function Main
Motor On
Power High
Speed 30; Accel 30, 30
Go P1 !D0; Wait GetRobotInsidePlane(1) = 1; On 1!
Fend
Note
D0 must be described.