GetRobotInsideBox Function
Returns a robot which is in the approach check area.
Syntax
GetRobotInsideBox(AreaNum)
Parameters
- AreaNum
- Specify the number (an integer from 1 to 15) of the entry detection area whose status is to be returned.
Return Values
Return the robot that is in the approach check area specified with AreaNum in bit.
Bit 0 : Robot 1 ……… Bit 15 : Robot 16
If the robot doesn’t configure the approach check area, bit is always 0.
For example, Robot 1, Robot 3 are in the approach check area, bit 0, bit 2 will be On and 5 will be returned.
See Also
Box, InsideBox
GetRobotInsideBox Function Example
The following program uses the GetRobotInsideBox function.
Wait for the status that no robots are in the approach check area.
Function WaitNoBox
Wait GetRobotInsideBox(1) = 0
Wait for the status that Robot 2 is only one in the approach check area.
Function WaitInBoxRobot2
Wait GetRobotInsideBox(1) = &H2
The following program uses the GetRobotInsideBox function in the parallel processing of the motion command. When a robot is in the specific approach check area 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 GetRobotInsideBox(1) = 1; On 1!
Fend
Note
D0 must be described.