RobotStudio event

Checking for Singularity


I am sending the robot arbitrary target data via Sockets. I am attempting to check for singularity issues while the robot is moving. I am currently using a timed interrupt TRAP routine that is checking the joint angles 10 times a second. If the axis 4 or 5 joint angles are within +/-0.1, I want to turn SingArea\Wrist active, and when it is done with the move, SingArea\Off.
It isn't really working how I want it to... Anytime it detects a singularity issue, it ends program execution, but I want the program to continue running, and just have the robot deviate from its linear path for a short time to avoid singularity, then continue linear movement. Has anyone done this before, or can anyone offer any advice on how to get an active singularity detection while the robot is moving?
My code:
CONNECT timeInt2 WITH IntRoutineCheckSingularity;
ITimer 0.1,timeInt2;
TRAP IntRoutineCheckSingularity
        VAR jointtarget currentJointAngles;

        IF ((currentJointAngles.robax.rax_5>-0.1) AND (currentJointAngles.robax.rax_5<0.1)) OR ((currentJointAngles.robax.rax_4>-0.1) AND (currentJointAngles.robax.rax_4<0.1)) THEN

            SocketSend clientSocket\Str:="***Singularity Off***";
            SocketSend clientSocket\Str:="Singularity On";

Thanks for any help!


  • j_proulx

    Hello Steve

    This will not work because the motion path of the robot is already planned with SingArea \OFF. That is why you would get the error. SingArea instruction is not instantaneous. It won't become active until the next Move instruction. You also may be too close to the singularity to be able to act on it.

    You may need to stop movement clear your path and then use SingArea\Wrist before executing your next move. See ClearPath instruction in the Technical Reference Manual Rapid Instructions, Functions and Data Types. It has examples for stopping the robot.


  • SteveMob

    Thank you for your reply! So there is no way to actually check for singularity points in the middle of a move? Like is there any other instructions that allow path interpolation?

    Or is there a way to check the path before the robot starts moving? Right now I just have a method for checking the current joint angles, and the target joint angles, but nothing in between there. Is there a way to check the path?

    Thanks for the help,