MoveL (Linear movements).

Also checkout the new CB3 forum

MoveL – Move the robot in a Linear path.

By using the example from the MoveJ chapter we will now learn how to make a linear movement.

universal_robots_zacobria_moveL_1

To learn about the MoveL linear movements we will just continue using the program we created in the last chapter called “My_first_program.urp”. Maybe you need to Load the program into the controller as described above – or simply make a new small MoveJ program as explained in previous chapter.

Because we will just change the MoveJ program into a MoveL program.

So you will have this small program on the Screen

universal_robots_zacobria_moveL_2

Point on the MoveJ statement and Press so it is highlighted.

universal_robots_zacobria_moveL_3

If not already in the Command view then – Press the “Command” tab.

Then you will see the definition screen for the MoveJ statement. We can also call it the properties for the MoveJ statement.

At the right hand side lower corner is the definition for the MoveJ statement which by default is a nonlinear movement hence the MoveJ statement in our program.

Below is a parameter called “Move Tool Linearly” with a check box – Check it.

universal_robots_zacobria_moveL_4

Go back to the Program tree Screen and notice how the MoveJ statement has changed to a MoveL statement.

Remember that the Waypoint_1 and Waypoint_2 is the exact same as in the previous chapter.

Now we can compare the different movement for these two programs.

The programming environment and object to choose in MoveJ and MoveL are the same which is already explained in the previous chapter – so how to start and run the program is the same.

Run these two programs after each other to compare – now press start for this MoveL program – move the robot to the “Home” position and Press start again and see the movement.

Reload the MoveJ program and Run that program.

See the difference ?

See next page.

MoveL                                               MoveJ

universal_robots_zacobria_moveL_5

universal_robots_zacobria_moveL_6

MoveL                                               MoveJ

Notice the difference for a MoveL to a MoveJ movement. The middle picture for the MoveJ shows the tool head out fro the centre line. Whereas the tool head stays at the centreline during the MoveL move.

In pick and place the MoveJ is advisable – only rarely a MoveL is necessary.

Singularity during MoveL.

As I described previously when using the MoveL programming method there is a change to run into a Singularity which is an illegal mathematical expression.

To illustrate that I have made a quite stupid program. I am using the exact program as above i.e. only two Waypoints in the MoveL mode. The two waypoints I have chosen are seen below.

universal_robots_zacobria_moveL_7

Waypoint_1                                                               Waypoint_2

Since I have chosen MoveL I expect that the robot goes in a straight line from Waypoint_1 to Waypoint_2, but notice that it would require the robot to go through the base joint at the centre because the two points are on each side of the base.

But I have been able to make the program and all statements are on green so let’s try to run it.

universal_robots_zacobria_moveL_8

The robot started to move from Waypoint_1 towards Waypoint_2 in a straight line, but when the physics was in the way the robot showed the phenomena about increasing in speed and then rapid security stopped with “Speed limit violation” and never reaches Waypoint_2.

Let’s just try and change the above program to a MoveJ program with the same Waypoint_1 and Waypoint_2 positions and run it.

universal_robots_zacobria_moveL_9

universal_robots_zacobria_moveL_10

universal_robots_zacobria_moveL_11

The robot runs this program beautifully without any error messages in MoveJ mode because it is allowed to take a bended route from Waypoint_1 and Waypoint_2

Disclaimer: While the Zacobria Pte. Ltd. believes that information and guidance provided is correct, parties must rely upon their skill and judgement when making use of them. Zacobria Pte. Ltd. assumes no liability for loss or damage caused by error or omission, whether such an error or omission is the result of negligence or any other cause. Where reference is made to legislation it is not to be considered as legal advice. Any and all such liability is disclaimed.

If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.

Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.

Also check out the CB3 forum



38 thoughts on “MoveL (Linear movements).

  1. Gavin

    Hello Lars,

    I want to know the pose which is movej’s first param of rotation that represented by euler angle or a vector ?

    or what’s meaning of the pose ‘s last three component , is euler angle or vector ?

    expect you reply.
    thanks!

    Reply
    1. zacopressadmin Post author

      Hello Gavin

      Thanks for the question.

      I am not an mathematician so I am not sure what is the designation of the rotation angles, but Rx is the rotation around the X axis in radians and Ry is the rotation around the Y axis in radians and Rz is the rotation around the Z axis in radians.

      Some more informations at these links.

      http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/x-y-and-z-position/#comment-147810

      http://folk.ntnu.no/tomgra/Diplomer/Kufieta.pdf

      http://nghiaho.com/?page_id=846

      http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/

      https://en.wikipedia.org/wiki/Axis%E2%80%93angle_representation

      Author:
      By Zacobria Lars Skovsgaard
      Accredited Universal Robots support Centre and Forum.

      Also check out the CB3 forum



      Reply
  2. Henry Driedger

    Hello Lars,
    I am using a UR10 bot (CB3.0) to apply a urethane to a surface.
    The robot has a floating end effector that applies a slight pressure to the surface as it moves along its path while conveyor tracking.
    The problem is that the robot reaches the end of a portion of the path and then instead of lifting off of the surface to the next waypoint the robot reverses direction and drags along the surface until it hits something. But sometimes it only moves several mm back and then continues its path but offset by the amount it “shifted”.
    The robot runs well 80% of the time so it does work somewhat but 8 good in 10 is terribly inefficient in high volume operations.
    This is causing damage to parts and I have run out of things to try to fix it.
    I have verified the encoder signal is good. The portion of the program where the “shift” occurs is in the middle of a sequence of waypoints in a MOVL that is referenced to a plane that is shifted initially by a camera.
    Also I have a robot that is successfully doing this 100% of the time only 2m away on the mirrored part.
    Any advice would be appreciated.

    Reply
      1. Henry Driedger

        Originally the programs were identical but the problematic one was altered to try and
        eliminate this issue. We did find that the robot very much over compensates for any side loading of the EOAT during motion and a few of the original problems were fixed by path reteaching but there is a single waypoint that this happens at every time it faults (2 in 10). We are not using force mode at all due to the small amount of force needed. We are using a small air cylinder acting as a spring to put a very small amount of force on the tip as it is dragged along the surface. Force mode would not allow us to maintain contact very well due to the small amount of force required. Also force mode did not work well with conveyor tracking when that option was explored.

        There is no explainable reason why at this waypoint (in the middle of a list of waypoints) the robot would travel to the location it is. The path simply shifts in a combination of base X- or X+ and Y+ direction in random amounts. There is nothing in the thread or events that could cause a shift like this. It appears to be a glitch of some sort in the controller software. We changed to a loaner controller to rule out bad hardware(flaky encoder or high speed counter…) but the problem still happened just the same.

        I have trended the forces and torques for all axis and have found no sudden spikes in force or torque. The waypoints were deleted and recreated.

        There must be some mistake in the software causing incorrect responses to external forces acting on the end effector.

        Reply
        1. zacopressadmin Post author

          Hard to say at a distance what can be the reason, but if one robot is working and you have program the other robot in the same way it would normally rule out the controller software.

          What is the joint positions (angle values) at the waypoint where this always happens ?

          Maybe in such periodic and random situation and with no measurable data to conclude on – it might be necessary to use trial and error – e.g. swap of hardware – even maybe swap of robots or other involved hardware like the encoder – just to get some signs to conclude on.

          Reply
  3. Mohamed

    Hello Lars,
    The project that I ‘m working on, needs to use a very high speed and acceleration. Please I need your help and would like to know the highest speed and acceleration either for tool or for joint that I can use.
    Thank you very much.
    Best regards,
    Mohamed

    Reply
    1. zacopressadmin Post author

      Hello Mohamed

      The specs with speed for the robots can be found at this link http://www.universal-robots.com/products/

      But for collaborative robots the safety has high priority and the speed and acceleration therefore involve a thorough risk assesment and onsite for the actual application.

      For moves – the speed and acceleration is determined by distance and time between two waypoints. The speed and acceleration can also be set with script commands as “a” fro acceleration and “v” for velocity, but the actual parameters is determined by the onsite risk assesment. A example for use of “a” and “v” in script commands can be found at this link

      http://www.zacobria.com/universal-robots-knowledge-base-tech-support-forum-hints-tips/knowledge-base/script-from-host-to-robot-via-socket-connection/

      Also factors such as weight and shape of end-effector – trajectory and angle of movement etc. affects the possible speed and acceleration as part of a risk assesment.

      Author:
      By Zacobria Lars Skovsgaard
      Accredited Universal Robots support Centre and Forum.

      Also check out the CB3 forum

      Reply
  4. Michael

    Good day,

    I have a question. I have a light sensor on TCP, which indicates a distance from a table. For example, when the robot is 20cm over the table, analog_input[0] set to 0.10V. It goes well. BUT. I’m doing a vertical moving from Waipoint 1 (40cm over the table) to Waipoint 2 (only 5 or 10cm over the table). Robot moves from Waipoint 1 and according to distance, is currency changing, so when robot turns to analog_input[0]= 0.10V which is 20cm over the table, robot stops. BUT how to resume to another waypoints?? Because, in statement with analog_input[0] I have a command ,,halt” and after that wait(1.0) and doing other things. Is there any way to do to resume robot? So, I want this thing. When robot turns 20cm over the table (which I control through analog_input[0]), robot stops, wait for 1 second and goes somewhere.. It is hard to explain, but have no idea how to do that.. Maybe simplier, when robot moves between 2 waipoints and I stop it somewhere, robot pauses for some short time and goes to another point. Thanks in advance,

    Michael.

    Reply
    1. zacopressadmin Post author

      Hi Michael

      Thanks for your question.

      If I understand your question correct then I think there are different ways to solve this.

      But first comment is that the instruction “halt” will terminate the program and the program needs to be started again – and therefore normally “halt” is used to test a program part and then terminate the program with a halt command – so the halt is not often used in a final program unless you really want to terminate the program – which it seems like you don´t want to do.

      Therefore instead of “halt” you might consider the command “StopL(1.0) where the number is how fast the robot stops – and then continue with the program as you have programmed it”

      Or you can consider to have the check on the analogue input inside an “If” statement – where the “check condition continuously” is checked – because then when the expression is no more true the program will jump out of the “If” routine and continue the program as you have programmed it.

      And there might be other ways to achieve this.

      Author:
      By Zacobria Lars Skovsgaard
      Accredited Universal Robots support Centre and Forum.

      Also check out the CB3 forum

      Reply
      1. Michael

        Thanks a lot for that speed answer Lars :-). IF statement does nothing also when ,,check condition continuously” is checked.. script StopL I havent’t used, I’m going to try it. Thanks!

        Reply
      2. Michael

        So, I have tried to insert script StopL(0.5) and it doesn’t play program. It shows an error message, something like “StopL is not defined”. I have made a whole program in teach panel without script codes, now I’ve inserted that code. Is it because I must write a whole program in script?

        Reply
      3. Michael

        So, a mistake was that, stopl has to be written with small “L” which is crazy. But still doesn’t well. It stops but only when if statement is in another thread..But after stop, it shows an error – ,,Another thread is already controlling the robot”.

        Reply
          1. zacopressadmin Post author

            Hi Michael

            Maybe consider something like this

            Waypoint_1
            If analogue_in(0) > 0.10
            Waypoint_2

            Stopl(0.5)
            wait(1.0)
            Waypoint_3
            Waypoint_4

            Keep the “Check expression continuously” checked – and delete the Thread. When there is a Stopl() in the thread and there is also waypoints in the main program – then it is like 2 parallel programs are trying to control the robot – which causes an error because the robot can only be at one place at any given time.

            Also use < or > in the If depending on whether the voltage is higher or lower when the robot is more than 20cm up.

            Notice – only the Waypoint_2 is inside under the “If” statement.

            Author:
            By Zacobria Lars Skovsgaard
            Accredited Universal Robots support Centre and Forum.

            Also check out the CB3 forum

  5. Nathaniel Wiebe

    I’m having an issue while placing a part into a cnc pneumatic vise. The vise is controlled by a solinoid. THE robot picks the part with an electromagnet through a digital output signal and places the part into the vise and then moves against the stops and activates the vise with another output to close on the part. Problem I’ve been having is it won’t reliably place the part tight to the stop. As soon as it activates the vise, the robot seems to “jump” slightly which gives a random inaccurate position. I have been using a moveL with slow movements to achieve it position and have also tried putting a wait command after the move to ensure it has reached its target. I also have tried a force command in the direction of the stops and while it seems better, i am still getting random off stop placement. Any idea why the robot would move from it’s position before I have told it to move? The part is tight and square to the jaws. There is great adhesion to the magnet. I don’t see the same jump when i activate another solinoid for a die grinder.

    Reply
    1. zacopressadmin Post author

      Hi Nathaniel

      Thanks for your question.

      That seems a little strange.

      Can it be because the wise when closing is mechanically pushing the part and thereby the robot ?

      When the “jump” occur – when is it exactly it occur – any other activations at that time ?

      How much is the “jump” is it millimetres or sub millimetre jump ?

      If you let the robot stop before or higher than the wise can reach the part i.e. no mechanical touch is possible – and then closes the wise – does it still jump ?

      First it could be good to establish if it is a mechanical issue or if it is an electrical/programming issue ?

      Author:
      By Zacobria Lars Skovsgaard
      Accredited Universal Robots support Centre and Forum.

      Also check out the CB3 forum

      Reply
  6. JP

    Trying to use moveL inside a Force command. Every time program starts, it results in the following error “Force mode is not possible in singularity” any thoughts on how to resolve this?

    Reply
      1. JP

        No matter what code is used, even when starting from scratch…

        Force
        -Move
        -waypoint1
        -waypoint2

        This example program will cause this error. In fact even pressing the test button under the force command screen will cause the error. We have had this robot for 2 days and not sure what is causing this.

        Reply
        1. zacopressadmin Post author

          Hard to say with this limited information – have you asked your robot provieder ?
          What is the robot model and the software version running on the robot ?

          Reply
  7. SJ Teo

    Is there a way to localise the robot so that if the robot is moved to a different location, it would still be able to perform the desired tasks without having to change all the waypoints?

    Reply
    1. zacopressadmin Post author

      Hi Teo

      Thanks for your question.

      It depends how much you move the robot ?

      The way I would approach this is to make my program so I have an option to key in X, Y, Z offsets – maybe done with a script program.

      Regards
      Zabobria.

      Reply
      1. SJ Teo

        Dear Zabobria,

        Thanks for your reply. We are planning to shift the robot from one location to another and is looking for a method to localise the robot. Is there a function where we can use the “teach” method to bring the arm to localisation points and it would offset the waypoints of the program?

        Thanks for helping me with the robot,
        Regards,
        SJ Teo

        Reply
        1. zacopressadmin Post author

          Hi Teo

          It depends how you have made the program.

          If you have made a waypoint – and made it so all other waypoint is an offset of this waypoint (maybe by using script programming) – then after moving the robot – you just teach the first waypoint again. But you need to prepare this in the original program.

          Regards
          Zacobria.

          Reply
          1. Nithin

            How to do that in a sccript code.How can i add an offset value to all the way points in my code?

  8. Peter L.

    Hello Lars,
    I tried the while function with check “this expression continuously”. But I want to send data to an variable from an external device and to check the values of the variable continuously. I tried it with your Program from “http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/script-client-server/”
    I modified that Programm for my needs, but i dont know how to program a while Loop wich is continouosly checked. Is there a way to program that textual? Or is it only possible with a thread? If yes, how can a thread send data to a variable in a script which isn’t under the thread. Is there an other way?
    Kind regards!

    Reply
    1. zacopressadmin Post author

      Hi Peter

      Thanks for your question.

      Yes I think it will be good to have a loop that needs to be continuously checked in a Thread.

      But it is better to have as little code as possible in a Thread to save load on the CPU.

      The solution depends a little on what the variable contains and what is to be used for in the robot program – and how often it is expected to change.

      Since you need to check on a variable that is send from an external device – then I assume that this data is also changed on the external device. So in order to save load on the UR CPU – I would just check on an Input connected to your external device.

      When the external device has a new value to be send to the robot – then alert the robot by changing this bit – and then have the UR program to read the variable on the Socket connection.

      If possible I would try to avoid listening on the Socket connection constantly as it might drag some recourse away from the robots main task of moving the robot.

      To check on a bit that change is much less recourse demanding than to check on a Socket connection. And then only use the Socket when it is really necessary to send the variable over.

      Just some ideas – there are many ways to make this depending on the desired functionality and timing.

      Regards
      Lars

      Reply
  9. Peter L.

    Hello Lars,
    is there an Option or a possibility to control the Motion of the Joints in real-time- For example not to send coordinates to the UR10 but control the the voltage or current etc. ?

    Because when my external device sends coordinates to the UR10. The UR tries to get to this Point but when there happens anything the Robot cannot be stopped until the robotspecific resistance is reached and the Robot turns off or the Position is reached. But this can cause damages o fragile products.
    Thank you!

    Reply
    1. zacopressadmin Post author

      Hi Peter

      There is no command to control the voltage and current directly on the joints.

      You can stop or move the robot to another position e.g. reversing by utilizing the IF function and “check this expression continuously”.

      By having a condition for example an input needs to be high and then have the Waypoint under this condition.

      Tick “check this expression continuously” when you make the IF condition.

      Maybe you can have a sensor on the input and if something activates the sensor you wish to move in another direction.

      Then have the next IF statement in same way but the waypoint is another position e.g. the starting position and using another input or the opposite of the condition for the same input as above.

      Maybe also tick “check this expression continuously” when you make the IF condition. Or maybe no need to tick “check this expression continuously” in this case if you want to make sure the robot returns to a start position before anything else.

      By having the “check this expression continuously” the robot program will jump out of that IF routine immediately (when the condition is no longer true) and move to next program statement.

      You can then ask – “what happen if no condition is true or if they are both true” ? – try ;)

      If none of the conditions is true the action in the rest of IF routine will not be executed and next IF also not executed.

      If both are true – then the first IF will be executed first and the second IF next.

      The program is still sequential.

      Regards
      Lars

      Reply
  10. alberto

    Hello,

    I am developing a program using UR Script programming language. I have to go through a trajectory of different points that are normal to a surface that has a different normal vector in each point. This normal vector changes smoothly. I want to know the maths (equation, algorithm, book, or whatever) that I need to knowing the point that I want to send the robot to and the normal of the surface at this point, move the robot to this position with the tool perpendicular to the surface at this point.

    My understanding is that I need to translate the orientation that is given by a unitary vector normal to the surface to the axis angle representation used by the robot. So at the end, I want to transform the tuple (x, y, z, nx, ny, nz), where x, y, z are the components of the point and nx, ny, nz are the components of the unitary normal vector to the surface at the given point, to a pose that when used in a “movel pose” command, sends the robot to the given point with an orientation of the tool perpendicular to the surface. I don’t want to use the help of the “features” that you can define in the PolyScope graphical programming enviroment.

    Thanks in advance. Best regards.

    Reply
    1. zacopressadmin Post author

      Hi Alberto

      Thank you very much for your email.

      I can hint you to this web page explaining about vectors

      http://en.wikipedia.org/wiki/Axis_angle

      And then I think you need to apply such kind of equations on the physics to the robots which is for example the dimensions shown on these drawings and then work out the equations.

      universal-robots ur5 dimensions

      universal-robots ur10 dimensions

      Regards
      Lars

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>