The search function is used to precisely capture the robot position at the trigger event of a robot rapid input. The event also stops the robot motion.
In handling applications it is often required to “find” the top of a stack of products while moving downwards – using a low cost solution with just a photo eye mounted on the gripper. That captured position is then used to calculate the next target positions so that the robot can move quickly to the precise pick position for the product.
The search function for MotoLogix is made for such use cases. As the capture process is done inside the robot controller (using its rapid inputs) there are no additional (communication) delays which means that captured positions are very accurate and consistent.
Supported setups are robots (e.g. R1
) and robots with base axis (e.g. R1+B1
).
RIN#<number>
but in some
documentation they are referred to as direct-in
.Library components
Function blocks | |
---|---|
MLxRobotGetSearchPosition | Read a position which was captured during search motion. |
MLxRobotGetSearchResult | Read the number of positions which were captured during search motion. |
MLxRobotResetSearch | Deactivate the robot search condition. Motion commands sent after this MLxRobotResetSearch are no longer executed as search motion. |
MLxRobotSetSearch | Activate the robot search condition. Motion commands sent after this MLxRobotSetSearch are executed as search motion. |
Availability
Please refer to the function block documentation to see which robot controllers support this function.
Parameters
Below overview shows the relevant parameters for this function.
// Yaskawa parameters (cannot be changed by customer)
FD13 1 // search function using stop category 1
2 // search function using stop category 0
// Customer parameters
S1C1G57 0 // using instruction speed
>0 // fixed speed [0.1mm/s]
Restrictions
- Only for linear motions
- Search motions cannot use the
VMAX
speed setting - Search motions cannot blend into the following motions (
BlendFactor
is ignored) - Cannot be used for Jog commands
When testing your application on a controller in debug mode
(or with detached robot), MLxRobotGetSearchPosition
cannot return proper data for the captured position.
Monitoring
It is recommended to monitor the search execution status to verify that the motions are being executed as search motions.
This status is not part of the MotoLogix data packet but you can
map it to one of the
ReadPacket.DigitalInputs
bits by adding a few lines in the robot CIO:
// CIOPRG.lst (PART2)
// MLx ReadPacket.DigitalInputs[0].0 <-- Search status of R1 (see Robot CIO manual)
STR #50500
OUT #00010
Example
A typical use case is a palletizing robot:
- After a new pallet of products is inserted, the robot has to find the top layer using a sensor mounted on the tool (vacuum gripper).
- The sensor is connected to robot input
RIN#4
. - The sensor’s signal state changes
1 --> 0
when a product is detected. - The distance between sensor switch point and vacuum cups is 250mm.
Below pseudo code gives you an idea of the program structure for this use case.
10 SetSearch // set the search condition
// InputSignalBits := 8 (RIN#4)
// SearchCondition := 0 (trigger at LOW level)
MoveLinSearch // move to target: bottom of the stack
// (motion stops when the sensor is triggered)
ResetSearch // remove the search condition
// (enable after MoveLinSearch.Sts_DN)
// transition: MoveLinSearch.Sts_PC
20 GetSearchResult // check if a position was captured
// (if not: pallet seems empty, abort here)
30 GetSearchPosition // read captured position
// CoordFrame := 2 (position in user frame)
40 <calculations> // calculate next target position (pick)
// pick Z := (captured Z - 250)
50 MoveLinPick // move to pick position