Get LPOS in Monitor program

  • Hello everybody,


    I am new in the world of fanuc robots, and I am having a doubt if it is possible (without Karel) to obtain from a program launched from a monitor the current position of the robot.


    More or less the situation would be this:


    Main program:

    ....

    MONITOR GETPOSTMONITOR

    L P[5] 100mm/sec FINE

    MONITOR END GETPOSTMONITOR

    ...


    GETPOSTMONITOR program:


    WHEN DI[7]= ON CALL GETLPOS



    Program GETLPOS:

    PR[5]=LPOS


    The problem I have is that the GETLPOS program has the same group as the main one, so it doesn't let me do it.

    The controller is a R30iB.



    Thanks in advance.

  • Yes, that is the problem HawkME.


    What I'm trying to do is to measure a chassis with a laser. It is measuring the frame with a linear movement. When the laser measures a distance less than a value, the PLC sends me a digital input = 1, which implies that the edge of the chassis has been detected, I want to store the value of the position at that moment, and without stopping the movement of the robot, continue until the digital input = 0, to store this second position. By means of a subtraction of both positions, to know the distance of that chassis.


    I have tried skip condition, but when the edge of the chassis is detected, the robot stops abruptly.

  • You can monitor the position via system variables in BG logic.


    Sorry for late answer.


    I have done what you have told me and now I have the position in three registers (I don't need the rotation). The only thing I can see now is how to convert those world coordinates into user coordinates, but if I look for the displacement with respect to the edge of the chassis I have the information I need.


    And it's all done without the robot stopping.


    Thank you very much for your great contribution HawkME.

  • As such, the Motion Group setting should be all *. The usual default for a robot with one motion group is 1,*,*,*,* so you need to change this in the Details menu for that program.

    The problem I had with it, is that if I set it all to * I couldn't use LPOS.


    Anyway thanks for your answer.

Advertising from our partners