Codes of searching for a hole on a pipe in circular direction

  • I have an application that I need the robot to search for a hole on a pipe in the circular direction using a laser sensor. The pipe does not move though. All the motion comes from the robot.


    Currently, the robot advances 5 degree and back off 2 degree while searching for the hole. Once the laser sensor sees the hole and trigger the I/O, the search stops and the robot records LPOS for this hole.


    My problem is that this searching code is not reliable. Often, I cannot find or miss the hole position.


    Has anyone designed such a searching algorithm before or has better way to realize this application? Thanks!

  • If I'm not mistaken, your problem is that you're going in increments rather than cursively.
    I've never used this, but I'm pretty sure you can make a SKIP condition to stop a movement when a certain DI turns on. Make a whole movement around and when you get that DI, jump to a WAIT instruction that will stop the movement and then get an LPOS there.


    I dunno if that will help actually, but that's how I'd try to do it first.

  • I was using a SKIP condition for this. I guess the issue I have is that the laser sensor can only detect the edge of the hole. And that signal cannot be captured reliably. Because of the recursive motion of robot, 5 degree advance and 2 degree back off, sometime, it will just miss the signal. I tried smaller search angle, i.e., 3 degree, as a search step, still had reliability issue.


    I wonder if i should just do a continuous motion.

  • I guess my question is that if the robot has to finish the current motion when the SKIP condition is met. For instance, if I am doing the continuous cursive search from point A to B, the SKIP condition is met somewhere in the middle, does the robot stop the current motion and jump the label defined by SKIP or it has to move to B first and then jump to the label defined by SKIP?

  • Yes the robot stops when the skip condition is made, but you have it backwards. When the condition is made it stops then "skips" to the next line of code. If the motion completes and the condition is never met it will jump to the label.


    Also you probably want the quick skip command, SKIP LBL[] PR[]. This automatically records LPOS into the specified PR with higher accuracy.


    Quick skip is limited to a max speed of 100 mm/s. But you should go slower for better accuracy.

    Edited once, last by HawkME ().

  • Thank you for correcting me on this command!


    I tried to reverse my logic about wrongfully using the SKIP command. But it did not resolve the issue. I guess my main issue is now the rotational motion about the pipe. So I am doing a FOR loop for the following motion, where PR[1] = [0, 0, 0, 0, 0, 5]


    L PR[1] 3deg/sec CNT50 INC Skip, LBL[100]


    then I rewind the robot with PR[1] = [0, 0, 0, 0, 0, -2]


    L PR[1] 3deg/sec CNT50 INC Skip, LBL[100]


    so that there is a small overlap for each single search and I won't miss the edge of hole.


    I am not sure why this logic works sometime but does not work for most of the time.



    Yes the robot stops when the skip condition is made, but you have it backwards. When the condition is made it stops then "skips" to the next line of code. If the motion completes and the condition is never met it will jump to the label.


    Also you probably want the quick skip command, SKIP LBL[] PR[]. This automatically records LPOS into the specified PR with higher accuracy.


    Quick skip is limited to a max speed of 100 mm/s. But you should go slower for better accuracy.

  • I am trying to visualize what you are doing; a picture would be helpful. But if I understand correctly you have a laser on the robot and you are wanting to search concentrically around the pipe? If so, why not use the circular movement instruction instead of the Linear movement?


    Also, have you verified that the laser is capable of sensing this by moving it around by hand? Sometimes laser sensors have false readings when shooting into a small hole or channel. Another possibility would be an issue with your sensor orientation. Typically the laser needs to be perpendicular to the search direction, not parallel, so the emitter and receiver "fall off" at the same time.

  • We have a similar application. We found that we needed to use a High Speed Input for our laser to trigger and be the most accurate. Fanuc told us to look at the system variables that correspond to LPOS to record the point. These variables would be more accurate than running the LPOS function in this application.

  • Here is a simple picture to show what I am trying to do from a cross section view. I want to the robot to record its LPOS once the laser beam sees the OD change of the pipe when it comes to the hole. Then the robot can finish the corresponding job using this recorded LPOS.


    I did not use the circular movement as I did not know there the hole was and I couldn't set the ending point of the circle. So I was using the linear movement to search for the hole in a "continuously" incremental motion.




    I am trying to visualize what you are doing; a picture would be helpful. But if I understand correctly you have a laser on the robot and you are wanting to search concentrically around the pipe? If so, why not use the circular movement instruction instead of the Linear movement?


    Also, have you verified that the laser is capable of sensing this by moving it around by hand? Sometimes laser sensors have false readings when shooting into a small hole or channel. Another possibility would be an issue with your sensor orientation. Typically the laser needs to be perpendicular to the search direction, not parallel, so the emitter and receiver "fall off" at the same time.

  • Could you please be more elaborate on this system variable? Thanks!



    We have a similar application. We found that we needed to use a High Speed Input for our laser to trigger and be the most accurate. Fanuc told us to look at the system variables that correspond to LPOS to record the point. These variables would be more accurate than running the LPOS function in this application.

  • You don't need to know were to stop. The skip command will stop the robot, so just search all the way around. It will stop when the sensor triggers.


    Also you don't need the system variable, that is purpose of the high speed skip command, it takes care of that for you unlike the regular skip command. This is all covered in the manual.


    I do agree with the high speed input if you need the accuracy.

    Edited once, last by HawkME ().

Advertising from our partners