Hello,
First, here is my situation: I am trying to detect a plane (i.e. sheet of paper) in workspace of my robot (I can limit the space where the plane might show up) and set it as user coordinates. I am using IRB 120 (mounted on table) with IRC5 compact M2004 controller, for sensor I have Sick OD2-P250W150UO distance sensor attached to to said robot. Signal from the sensor goes to PLC, which recalculates it and sends as a digital signals (9 bits) to IRC5, where I created group input to recalculate it back to some kind of distance units. I am using RobotStudio 5.15.02.
The sensor cant detect anything that is closer than 10cm and has max range 40cm. My idea was to set robot to move from side to side in constant height 50cm from table. So the sensor gives me 0 if there isnt anything. It gives distance when there is something at least 10cm from sensor and at least 10cm from top of the table. I will save all points which the sensor detects on his journey.
So, here are my questions:
1. I am trying to use SearchL for the movement, but I cant make it work with Group Inputs. Is there any better function I missed? Can I modify the function to work with bool (so I can use distance<>0 in DI argument of SearchL) or is there a way how to create different signal which procs when distance<>0 ()?
2. When I obtain the points, what is the best way to calculate the plane? Is there a function to calculate the coordinate system from 3 (or more) points just like I can with FlexPendant and manual jogging when I am defining User Coordinates? I was thinking about using the wobjdata to define world object, but I donk know if it is possible to calculate the rotations and quaternions without having work object before and than set it as user coordinates. (I havent reach this part yet, so I am asking in advance)
Thank you
Michal