SearchL Implementation可打印版本 +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: SearchL Implementation (/Thread-SearchL-Implementation) |
SearchL Implementation-aldomb-10-26-2021 Using: RoboDK v5.2.5 (64 bit), Windows 10, UR5 (in this example)/UR5e/UR10 robots, Python. Is there an example anywhere that can serve as a template for making use of the SearchL() function? Hopefully my attached image is clear enough, but it is a fundamental example of what I would like to do. If I have a current motion that I would like to be able to interrupt via a Digital Input wired into the UR PLC. If my image can be referenced, the robot would move between 3 Targets continuously and if Digital Input 3 is triggered, I would like the robot to stop moving and proceed to whatever follows in the code. It seems like SearchL() is perfect for this, but I was expecting there to be a third argument in which the Digital Input could be specified. Documentation shows, this is not how the function works and it only takes in two arguments: target and blocking. RE: SearchL() Implementation-Albert-10-27-2021 There is a way to customize the driver to properly link your SearchL to a digital input. At this moment, the default ID of the digital input used for the search L function of RoboDK is the ID number 2. You can also use a binary search algorithm, you'll find an example here: //www.sinclairbody.com/forum/Thread-Executing-multiple-robot-motions-during-a-function-call?pid=10558#pid10558 |