ID : 3052
CheckVirtualFence
Function
Check the collision status between robot and equipment at the target position when VirtualFence is enabled.
This command is available in Ver.2.3.* or higher.
Syntax
CheckVirtualFence (position data)
Guaranteed Entry
- Position data
- Designate position data you want to check by Position Type data, Joint Type data or Homogeneous Translation Type data.
Return Value
Return the judgment result by Integer Type data.
Value | Description |
---|---|
0 | No collision occurred |
Except 0 | Collision occurred |
Description
Check the collision status between robot and equipment at the target position when VirtualFence is enabled. After a robot has operated, VirtualFence function prevents a stop with an error because the function can check the possibility of the collision at the target position before robot operation.
When Joint Type data are designated as position data, the extended-joints components are ignored.
To execute this command, Axis Control must be obtained.
Related Terms
Attention
- When VirtualFence is not valid, an error occurs as follows:
・Virtual Fence License is disabled
・Parameter "366: Virtual fence setting" is disabled - When the specified position of robot is out of its motion range, an error occurs.
Example
Sub Main
TakeArm Keep = 0
' Move to the position of motion suspending
Move P, P0
DestMove :
' Obtain the target position of motion
P1 = GetMovePosition( )
'Judge if the motion can be operated
If ( OutRange( P1 ) <> 0 ) Then GoTo DestMove
If ( CheckVirtualFence ( P1 ) = 0 ) Then
' Move if no collision occurs
Move L, P1
Else
'Obtain the target position of motion again
GoTo DestMove
End If
End Sub
ID : 3052