Returns the distance that a Location, which is defined relative to a conveyor reference frame, is from the operating limits of the conveyor belt.
...location_object.ConveyorLimit(mode)
Prerequisites
Parameters
mode
An optional numeric expression that defines the specific test to be performed. If not specified, this value defaults to 0.
Remarks
This method is utilized in conveyor tracking applications to determine if a position is currently within a conveyor belt's operating limits and, if so, by how much. It is often used to sort the positions of multiple parts to select the part that is best to pick and to reject parts that are already too far downstream.
The table below describes the returned value based upon the setting of the mode argument. All distances are in units of mm.
Mode | Returned Value |
---|---|
0 |
Returns 0 if the Location is within the upstream and downstream limits, else <0 indicates distance upstream of the upstream limit or >0 indicates distance downstream of the downstream limit. |
1 |
Returns <0 to indicate the distance upstream of the upstream limit and =>0 the distance downstream of the upstream limit |
2 |
Returns <0 to indicate the distance upstream of the downstream limit and =>0 the distance downstream of the downstream limit. |
Examples
Dim belt1 As New RefFrame
Dim loc1 As New Location
belt1.Type = 2 ' Conveyor reference frame
belt1.ConveyorRobot = 2 ' 2nd robot is conveyor
belt1.ConveyorOffset = Robot.WhereAngles(2).Angle(1)
loc1.RefFrame = belt1 ' Zero encoder
loc1.Here ' Test current robot loc
If (loc1.ConveyorLimit(0) <> 0) Then
Console.WriteLine("Out of range")
End If
See Also
Location Class| refframe_object.ConveyorOffset | refframe_object.ConveyorRobot