For a conveyor reference frame, sets or gets the property that specifies the zero position of the conveyor belt's encoder.
refframe_object.ConveyorOffset= <encoder_offset>
-or-
… refframe_object.ConveyorOffset
Prerequisites
The refframe_object must be a conveyor reference frame.
The Conveyor Tracking software license must be installed on the controller.
Parameters
None
Remarks
Since the raw reading of a conveyor’s encoder can increase almost without limit, an offset to the encoder reading is provided to effectively zero the encoder value. This permits a motion program to be taught in one region of the conveyor and then reused in another region of the conveyor as the belt continues to advance. Whenever the belt encoder's value is read, the ConveyorOffset is automatically subtracted from the encoder's instantaneous reading.
When the encoder is zero'ed by setting the ConveyorOffset equal to the encoder's current reading, the position and orientation of the belt will be equal to the "Nominal" value defined in the conveyor's robot module (DataID 16060).
The ConveyorOffset is specified in units of millimeters.
If the conveyor encoder has rollover enabled, the system will automatically internally adjust the ConveyorOffset to ensure that its value is within one rollover value of the instantaneous encoder reading.
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
RefFrame Class |location_object.ConveyorLimit| refframe_object.ConveyorRobot