MC_TrackConveyorBelt
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
|
VAR_IN_OUT
|
||||
| B |
AxesGroup | AXES_GROUP_REF | A logical reference to a group of axes, which contains several additional substructures pertaining to the group. | |
| E | ConveyorBelt | AXIS_REF | Logical axis reference. This value can be located on the Configuration tab in the Hardware Configuration (logical axis number). | |
| VAR_INPUT | ||||
| B | Execute |
BOOL | Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. | FALSE |
| B | ConveyorBeltOrigin |
VECTOR | Specify X Y Z Rx Ry Rz values relative to the MCS to serve as an initial PCS definition for the moving Part Coordinate System. ConveyorBeltOrigin must be defined such that the positive X direction of the PCS corresponds exactly to positive ConveyorBelt travel. | Array of LREAL#0.0 |
| E |
InitialObjectPosition |
VECTOR | Defines the location of the object to be tracked. This value could be zero if using a typical photosensor to detect one object at a time with MC_TouchProbe. If using a vision camera to detect multiple objects simultaneously, set the InitialObjectPosition relative to the ConveyorBeltOrigin such that it describes one of the objects identified by the camera. The X component of this VECTOR is added to StartDistance. This ensures that the Object is within the mechanisms reach when tracking begins. | Array of LREAL#0.0 |
| V | RecordedPosition | LREAL | Typically this is the output from an MC_TouchProbe function block. | LREAL#0.0 |
| V |
StartDistance |
LREAL | The distance from the RecordedPositon to the first position where the group can track the ConveyorBelt. MC_TrackConveyorBelt. If TrackOptions.SyncIn.ConveyorDistance is non zero, The TrackState parameter will indicate status =2 while the group accelerates to synchronize with the ConveyorBelt, so allow for extra distance at true tracking operation. (TrackState =3) | LREAL#0.0 |
| V |
EndDistance |
LREAL | The distance from the RecordedPositon to the final position where the group can track the ConveyorBelt. If TrackOptions.SyncOut.ConveyorDistance is non zero, The TrackState parameter will indicate status =4 while the group decelerates from synchronization with the ConveyorBelt, so allow for extra distance at true tracking operation. (TrackState =3) | LREAL#0.0 |
| V | TrackOptions | Yt_TrackOptions | Details which specify the desired blend transition to synchronize / de synchronize with the ConveyorBelt. Not used for remote hosted groups. | All zeros in structure |
| E |
ExecutionMode |
MC_ExecutionMode | Enumeration with the following values: MC_ExecutionMode#Immediately MC_ExecutionMode#Delayed MC_ExecutionMode#Queued | MC_ExecutionMode#Immediately |
| VAR_OUTPUT | ||||
| B | Done |
BOOL | Set high when the commanded action has completed successfully. If another block takes control before the action is completed, the Done output will not be set. This output is reset when Execute goes low. | |
| E | Busy |
BOOL | Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error) | |
| E | Active |
BOOL | For buffered modes, this output is set high at the moment the block takes control of the axis. For non buffered modes, the outputs Busy and Active have the same value. | |
| E | InSync | BOOL | Set high when the axis or group is synchronized with the axis or group it is commanded to follow. Synchronized means that the two are position locked, any transitional period required to achieve synchronization has been completed. This output equates to group parameter 2251 / TrackState = 3. | |
| E | CommandAborted |
BOOL | Set high if motion is aborted by another motion command or MC_Stop. This output is cleared with the same behavior as the Done output. | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. |
|
| E |
ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. |
|
Notes
- Reference Group Parameter 2251, TrackState.
- Unlike the PLCopen specification, this block WILL cause TCP motion when the RecordedPosition is between the StartPosition and EndPosition even if no MC_Move functions are executed.
- InSync output does not always mean that the TCP velocity is equal to the conveyor velocity. User will have to write logic to ensure that InSync output is TRUE and that the master and TCP velocities are equal before commanding any actions that need position/velocity synchronization.
- Conditions that will cancel tracking:
- A MC_Movexxxx with CoordSystem input set to anything other than PCS becomes Active.
- Executing MC_GroupStop.
- A new PCS is set using Y_GroupSetFrameOffset and a move in that PCS becomes Active. The intention is that for a dual tracking application, the program will execute a second MC_TrackConveyorBelt function block to commence blending with a second conveyor.
- If a move in the WCS or MCS becomes Active while tracking, motion will blend from the current tracking path to the new non-tracking Position.
- If the group transitions to an ErrorStop or Disabled state, MC_TrackConveyorBelt.CommandAborted will be set to TRUE.
-
MC_GroupReadStatus
details:
- When MC_TrackConveyorBelt is executed and the ExecutionMode condition becomes satisfied and the RecordedPosition has crossed the StartDistance, "Moving" and "SynchronizedMotion" are set TRUE. If an MC_Move* is also commanded, the "DiscreteMotion" bit is set TRUE.
- If the conveyor motion is positive atfirst, but then stops and goes negative past the StartDistance, Tracking goes to TrackState=0, and the tracking event will be finished even if the conveyor moves forward again.
- The conveyor cannot be moving backwards at the time of MC_TrackConveyorBelt.Execute going TRUE.
- It is an error if (StartDistance > EndDistance) or (EndDistance - StartDistance)< (SyncInDistance.) There would be no distance remaining at full synchronization, and the group cannot enter TrackState=3.
- When using a remote hosted Group, use the Y_MS_ConveyorConfig function block to map the Conveyor axis controlled by the iCube controller to the remote hosted controller.
Error description
See the Function Block ErrorID List.
Implementation
Using MC_TrackConveyorBelt:
- Attach the axis that runs the conveyor belt to the VAR_IN_OUT ConveyorBelt. This can also be an external encoder axis.
- Attach the group that will be tracking the belt to the VAR_IN_OUT AxesGroup.
- Define the origin position of the conveyor belt (with the positive X axis in the direction of conveyor travel) as an offset from the MCS origin. Connect this as a
VECTOR
variable to the ConveyorBeltOrigin input.
- The location of the ConveyorBeltOrigin is somewhat arbitrary, but typically it's well before the beginning of the tracking zone. The farther away from the beginning of the synchronization zone, the more time the tracking group has to prepare for synchronization.
- For simplicity in defining the InitialObjectPosition (see below), define the origin as the position at which the part is located when it is sensed by the sensor.
- After the sensor has detected a part is available for tracking:
- Set the RecordedPosition as the latch position.
Example 1
The group is synchronized with the item on the conveyor belt.
Initialization:
The BeltOrigin is -10.5 units away from the MCS origin. The StartDistance is 9 units. This means that the group will begin motion when the part (conveyor) travels 9 units after the part is latched and position is recorded.
The 2:1 ratio of Track.SyncIn.ConveyorDistance and Track.SyncIn.TCPDistance is ideal for synchronizing the TCP with the moving conveyor without traveling at a velocity higher than the conveyor to catch up. This means that the group will synchronize position with the conveyor 3 units after the start distance has elapsed. So, 12 units after the part is recorded, the group and conveyor will be synchronized.
MC_MoveLinearAbsolute FB managing the move to home position to start the conveyor tracking move.
Product Buffer FB managing the latched positions.
Conveyor tracking FB.
The plot below shows the group getting in sync with the conveyor. The conveyor position is 989 units. The group position is 1.5 units and group velocity is 2 units. The distance between the sensor that recorded the latch position and the group MCS origin is 10.5 units. It can be seen how the conveyor travelled 12 units and the group travelled 1.5 units to be in sync.