Various Prg. Info

Also checkout the new CB3 forum

This chapter describes some general notes and informations for programming the UR robot.

Select topic from the drop down menu on the right.

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



27 thoughts on “Various Prg. Info

  1. Arunava Nag

    Hello,

    I am working with UR10. I would like to have your advice on:
    1. How to program it using the controller, I mean using ethernet connection? Could I have some pointers where I can get started and know the process? I am planning to use Ubuntu 14.04.
    2. I can think of programming in ROS, and use IROS, but as I haven’t programmed using robot controller previously I can really decide on which can be done earlier.
    3. I am planning to couple it using a machine vision maybe a Cognex, how can I do it using the first method. Are there ROS libraries for the Cognex?

    Kindly reply. I am at an early stage of the development. My basic idea is certainly to perform a pick and place.

    Sincerely,
    Arunava Nag

    Reply
    1. zacopressadmin Post author

      Hello Arunava

      Thanks for the question.

      I have not used ROS, but I have seen some informations about it – for example at these links.

      http://wiki.ros.org/universal_robot/Tutorials/Getting%20Started%20with%20a%20Universal%20Robot%20and%20ROS-Industrial

      https://github.com/ros-industrial/universal_robot

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

      Also check out the CB3 forum



      Reply
  2. Jannis

    Hello,

    we are doing some larger projects with Universal Robots (UR3, UR5 and UR10).
    One of our projects would be much easier, if we used 2-dimensional arrays.
    Can the datatype “list” be used multidimensional?

    Thanks for your help.

    Jannis

    Reply
    1. zacopressadmin Post author

      Hello Jannis

      Thanks for the question.

      I have not seen such data type on the robot.

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

      Also check out the CB3 forum



      Reply
  3. Nick

    Hello,

    I’m sorry if this question is the wrong place. I’m working with the UR5 which has software version 3.2.18744. I’m receiving a persistent Safety Message which reads the following;

    “Protective Stop

    C204A3: Protective Stop:Invalid setpoints: Sudden stop”

    Presumably the robot arm is stopping too quickly? It’s slightly confusing as I’m unable to reliably repeat this error message i.e. It basically happens at random.

    I’m not sure if you are able to help with this specifically but I’m actually controlling the robot through ROS with a python API. I’m setting a series of way points and the eef performs a straightline with a smooth velocity profile between them. Do you think it’s likely that the the motion caused by this control method is causing the error message above e.g. by stopping or changing direction too suddenly between adjacent waypoints?

    Thanks in advance,

    Nick

    Reply
    1. zacopressadmin Post author

      Hello Nick

      Thanks for your question.

      Yes my initial thought is that maybe the robot stops or change direction too fast.

      I have not used ROS, but I have experienced similar occurrence when sending raw script commands. I am sure you know, but in any motion there is – acceleration – cruise – deceleration. And it is quite easy to “forget” that it is not possible to go from 0 to cruise in zero time – and also not possible to go from cruise to stop in zero time. And also this is typical the case when just changing direction because a change of direction might involve acceleration or deceleration or change of speed etc – its not so obvious that this has to be taken into account for small change of direction or small move distance, but even if the distance to move is only 1 mm – the robot still cannot accelerate or decelerate in zero time – or near zero time – and also the inertia will impact on the force created by a sudden acceleration or deceleration – and then the force momentarily exceeds the setting for max allowed force – and it creates a protective stop – because it is like an impact – and then need to stop.

      My experience is that it is most likely to happen when using linear moves (movel – speedl etc) – because – consider a 90 degree turn – like really a sharp corner angle turn – then right at corner tip – the corner speed is virtually near infinitely high – which is impossible to achieve and the robot will make a protective stop. In Polyscope this does not happen so often (unless the waypoint parameter has been manually changed) – because a waypoint by default has parameters that has some values that creates time for a waypoint to perform normally, but it might also take longer time to perform the move.

      Whereas when using joint moves (movej – speedj etc.) it does not happen so often (it can still happen though if the times are very small) – because a joint move imply that a curvy turn is allowed. Again consider a “90 degree” turn – then in a joint move the robot will perform a turn like a part of an arch which does not contain so agressive acceleration and decelerations.

      The “joint” move is related to the fact that a UR robot consists of motors that turns around – and therefore when a joint turns it by nature creates a curvy movement.

      Compared to robots made of linear motors – like for example X – Y laser cutter – they are very good in making linear moves – however not so good in making 6 degrees turns :)

      However a UR can still make linear moves – it just requires more motors to turn and more internal calculation by the robot processor.

      One thing to consider might be to use stopj(1.0) or stopl(1.0) commands – which will dictate how long time to spend on the stopping time. The figures represent different timing for the stop and different values can be tested to find a good result – because the timing will need to be different based on the actual speed carried and the actual nature of movement.

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

      Also check out the CB3 forum

      Reply
      1. Nick

        Hi Lars,

        Thank you so much for your very in-depth response! The points in my operation at which I receive the error message seem to agree with what you’ve said as it occurs when the direction of the ee motion changes rather than between adjacent way-points in one straight line. For now I’ve put 0.5sec sleep in my code between different trajectories which seems to have reduced the occurrence of the Safety Message somewhat , although I plan to look more closely at adjusting stopel and stopej soon. To tell the truth I’m not entirely sure which ur-script command the ur-ros driver is using in my application although I’m inclined to believe it’s movej since the python api computes a set of joint angles for each waypoint and sends these to the driver. So perhaps this is caused, as you say, by small time increments as the waypoint time step is set to 0.008 secs.

        I have two further questions, which I hope you won’t mind answering: Firstly, I’m unsure what exactly you mean by “corner speed” in your explanation and therefore what causes it to be near infinite.

        Secondly, and I apologise as this is unrelated, when my application is changing the orientation of the ee, primarily in wrist 3, I’m occasionally receiving the following Safety Message:
        “C151A0: Protective Stop: Tool orientation close to limits”. I’m unable to identify what’s causing this problem since no joint is outside its centre 25% of range and the arm doesn’t appear to be in any sort of awkward position. Could advice to what could possibly be causing this?

        Thanks again!!

        Nick

        Reply
        1. zacopressadmin Post author

          Hi Nick

          These error messages can occur both with linear moves (movel) and joint moves (movej) – but it happens more often in linear moves because the demand to the path is more strict as it has to be linear.

          1: “corner speed”

          Imagine this example where the robot is used to weld a window frame – where the torch is to be held at a perpendicular angle to the traveling direction to weld the edge of the window frame. And imagine from start point “A” at first corner to end point of first stretch at corner “B” is a distance of 600mm and the robot is traveling a linear motion and the time given from “A” to “B” is 5 seconds to weld and then stop – no problem the robot can do that. Now imagine from corner “B” to “C” is 300mm and then a 90 degree turn and from corner “C” to corner “D” is also 300mm i.e. also a traveling distance of 600mm and still the torch needs to be perpendicular to the window frame.

          Now if the programmer just reuse his program with new waypoints and still give 5 seconds to travel from “B” to “D” because it seems to be same 600mm distance that needs to be welded – that will mean at the turn around corner “C” has to be done in zero time – which is impossible because it would require an infinite speed.

          This is similar to a Singularity. In this example it is taken to the extreme and it seems obvious that such turn cannot be done in zero time – but the same can happen in just slight change of direction when using linear mode if no extra time is given to travel the extra “corner” distance.

          Some notes about singularity here http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/singularity/

          2. “C151A0: Protective Stop: Tool orientation close to limits”

          It could be similar reason as for the “C204A3: Protective Stop:Invalid setpoints: Sudden stop” messages i.e. timing of moves.

          Maybe consider to make a small test program in Polyscope with similar moves as the robot does when this occur to check that it is able to make such moves – and adjust timing of the moves.

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

          Also check out the CB3 forum

          Reply
  4. Henry Driedger

    I wish to move a robot along a specific vector(z) the difference between the current tcp position and the distance in that vector to the safety plane(minus 50mm) to clear a moving conveyor. This is for an abort program that will move the robot in the z direction to a clear position and then to home position to start the next part.
    Is there a way to mask a part of a pose or extract only one vector or value from it?
    example:

    Back_out_pose=pose_trans(get_actual_tcp_pose(),Safety_Plane([mask,mask,VALUE,mask,mask,mask])
    MoveL
    -Back_out_pose (variable waypoint)
    -home pos

    Reply
    1. zacopressadmin Post author

      Hi Henry

      Thanks for your question.

      It is possible to mask out data from a list and then change an element and move to a position based on a list for example like this below. Here all elements are masked and Mask_2 is changed (which is Z), but the program could be shortened if only Z is to be changed by not masking all other elements.

      Program
      Robot Program
      MoveJ
      Waypoint_1
      var_1≔get_actual_tcp_pose()
      Mask_0≔var_1[0]
      Mask_1≔var_1[1]
      Mask_2≔var_1[2]
      Mask_3≔var_1[3]
      Mask_4≔var_1[4]
      Mask_5≔var_1[5]
      Mask_2≔Mask_2+0.1
      variable_waypoi≔p[Mask_0,Mask_1,Mask_2,Mask_3,Mask_4,Mask_5]
      movel(variable_waypoi)
      Wait: 1.0

      Author:
      By Zacobria Lars Skovsgaard
      Authorised Universal-Robots Support Forum.

      Reply
  5. adhisap

    Dear All,
    Does anyone ever use a webcam for locating Visions with UR?
    Please help to share on how to do it.
    My application , we need to identify 2 parts, first part need to pick and place on 2nd part but need to know the exact location to place, because both has unique shapes which must be matched so it is dropped in place. If a webcam is not sufficient, please advise other low cost visions.

    Thanks ,
    Adhi

    Reply
  6. Fereshteh

    Hi,

    Thanks for all the good information you put here.
    I have a question. Is it possible to get the current robot tooltip pose on PC (by Python coding for example) while the teach button is pressed and the arm is moved by the user?

    It seems that it is not possible with two-way communication because the polyscope cannot run a program and at the same time have the robot in teach mode. But is there any alternative way?

    Thanks!
    Fereshteh

    Reply
    1. zacopressadmin Post author

      Hi Fereshteh

      Thanks for your question.

      I understand your question and your observations are correct that in teach mode the robot program is not running and the two ways communication is not possible.

      How ever the UR robot has a Modbus interface build in and the Modbus server is at port 502. And these modbus registers contains the positions

      400 TCP-x in tenth of mm (in base frame)
      401 TCP-y in tenth of mm (in base frame)
      402 TCP-z in tenth of mm (in base frame)
      403 TCP-rx in mrad (in base frame)
      404 TCP-ry in mrad (in base frame)
      405 TCP-rz in mrad (in base frame)

      I have not tried this myself, but try to read these Modbus registers and let me know if it is possible.

      Regards
      Zacobria

      Reply
  7. brendan

    Ah, that would explain the rather large move I got!

    I will try again with the correct scaling, and then I think I will be in business.

    Thanks very much indeed
    Brendan

    Reply
  8. Brendan

    Hello again,
    Thank you for the reply. I have written a small test program to show what I am trying to do. The basis of the requirement is to move at high speed to a target position in a stack, then move down at lower speed until a vacuum is made. Now modify the target for the next run by subtracting the thickness of the part from the current tool Z co-ordinate.
    Move away and do some other stuff

    The get_actual-tcp_pose doesn’t appear to return mm (but I can see tool position in mm on the Move screen)
    I have corrected one syntax error, changing the () to [] for referencing the elements of the pose, and It looks like I can modify the individual elements and thus manipulate the target pose. It’s just the units are wrong.

    Program
    BeforeStart
    VarPosTop≔Top1
    VarPosBot≔Bot1
    ToolPos≔get_actual_tcp_pose()
    Robot Program
    ‘Move above stack’
    MoveL
    Clear1
    ‘Move down to just clear of top of stack’
    MoveL
    VarPosTop
    ‘Switch on vacuum’
    Set Sol1_On=On
    ‘Move down until vacuum made’
    While not Vac1_Made
    MoveL
    VarPosBot
    ‘Get current XYZRxRyRz’
    ToolPos≔get_actual_tcp_pose()
    ‘Extract current Z in mm’
    TopZ≔ToolPos(2)
    ‘Subtract plate thickness’
    TopZ≔TopZ-0.85
    ‘Modify top of stack pose Z value’
    VarPosTop(2)=TopZ
    ‘Move clear of stack’
    MoveL
    Clear1
    ‘Move above outfeed stack’
    MoveL
    ClearStack3
    ‘Move to bottom of stack’
    MoveL
    Stack3Bot
    ‘Turn off vacuum to release plate’
    Set Sol1_On=Off
    ‘Move clear’
    MoveL
    ClearStack3
    ‘Move back to start’
    MoveL
    Clear1
    FixedPositions
    MoveL
    Clear1
    MoveL
    Top1
    MoveL
    Bot1
    MoveL
    Home

    Thanks for your attention

    Brendan

    Reply
    1. zacopressadmin Post author

      Hi Brendan

      Be aware of that the units are meter – so 0.85mm is 0.00085

      Regards

      Zacobria
      Universal-Robots distributor
      Singapore

      Reply
  9. Brendan

    Hello again Lars and all,

    I have been very quiet recently, but now I am back!!

    I think I have seen this in an old post, but cannot find it, sorry.
    I want to extract the tool Z position from a pose, use it for some mathematics, and then set a new Z position back into the pose. I am having trouble doing this.
    I have a stack of plates, which the robot picks off one at a time. As the stack reduces, I want to keep track of approx how many plates are left. The operator can refill the stack, and so when they do this, I need to re-check how many plates are in the stack.

    What I am trying looks something like this (just written in descriptive text, not from program):

    Pointer=2
    MoveL BottomPose (this is an empty stack)
    BotPose=get_actual_tcp_pose
    BotZ=BotPose(Pointer)

    MoveL TopPose
    TopPose=get_actual_tcp_pose (This is the top of the stack)
    TopZ=TopPose(Pointer)

    StackHeight=TopZ-BotZ
    NumberofPlates=StackHeight/PlateThickness
    NewTopZ=TopZ-PlateThickness
    TopPose(Pointer)=NewTopZ

    Then, as the system is running, I want to take one plate thickness off the TopPose Z value each time I take a plate. (the reason for this is so that I can run at high speed to the top of the stack, before slowing down and then waiting for a sensor to make). I can also achieve this just by re-setting the TopPose each time I pick a plate, but I still need to do the maths to start off with when the operator re-loads new plates.

    When I try the TopZ=TopPose(Pointer), I get a syntax error, and also, the error displays the pose values of TopPose, which appear to be in joint positions, rather than XYZabc.

    So, can I extract and set the value of one element of a pose, and how do I get XYZabc rather than joint positions. Can you give me the correct syntax for what I am trying to do?

    Many thanks

    Brendan

    Reply
    1. zacopressadmin Post author

      Hi Brendan

      Thanks for your question.

      1.
      I need to see the code in order to understand the syntax messages.

      2.
      To get the result in Pose coordinates instead of angles you need to put a p in front.

      See this example

      http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/script-client-server/

      3.
      Have you considered using the Stack and De-stacking template that is already in the Polyscope GUI ?

      Regards
      Zacobria
      Universal-Robots Distributor

      Reply
  10. Joseph

    update: the problem seems to have cleared up. Yesterday we changed the programs so that we no longer use installation variables, and everything is declared locally.

    Reply
  11. Joseph

    Hello all,

    I am trying to create a program that receives data from a camera for position data, and based on the value of some additional variable, selects to run one of eight subprograms. This ends up with almost 60 waypoints. When I load the program, the user interface becomes very sluggish. When I try to run the program, the robot goes into emergency stop mode and has to be reinitialized. Is there any advice for how to improve my program performance?

    Reply
    1. zacopressadmin Post author

      Hi Joseph

      Thanks for your question – sounds like a cool program.

      I need to understand a little better how the program is e.g.

      1.
      Are you using socket connection?

      2. How many variables are transferred?

      3.
      Are you using Threads or Sub Routines or both?

      As the robot is a machine and therefore has priority on moving the robot and monitor the hardware – it could be because there is too much data to exchange with the camera or too often, but I need to understand the program better.

      Bets Regards
      Zacoberia
      Universal-Robots Distributor

      Reply
      1. Joseph

        Here is the program I am trying to use:

        Program
        Robot Program
        grommet_seek≔0
        rov_seek≔0
        neck_seek≔0
        grommet_confirm≔0
        rov_confirm≔0
        neck_confirm≔0
        allThreeChecked≔0
        MoveJ
        Waypoint_58
        If socketTest≟ False
        socketTest≔ True
        socket_open(“169.254.230.90″,8999)
        While grommet_confirm<1 or rov_confirm<1 or neck_confirm<1
        If grommet_confirm≟0 and grommet_seek≟0
        socket_send_string(10)
        grommet_seek≔1
        allThreeChecked≔allThreeChecked+1
        ElseIf rov_confirm≟0 and rov_seek≟0
        socket_send_string(20)
        rov_seek≔1
        allThreeChecked≔allThreeChecked+1
        ElseIf neck_confirm≟0 and neck_seek≟0
        socket_send_string(30)
        neck_seek≔1
        allThreeChecked≔allThreeChecked+1
        While cam_array[4]≟0
        cam_array≔socket_read_ascii_float(4)
        cam_to_pose[0]=cam_array[1]
        cam_to_pose[1]=cam_array[2]
        cam_to_pose[5]=cam_array[3]
        If cam_array[4]≟11 and grommet_confirm≟0
        Call SubP_Grommet_inverted
        grommet_confirm≔1
        ElseIf cam_array[4]≟12 and grommet_confirm≟0
        Call SubP_Grommet
        grommet_confirm≔1
        ElseIf cam_array[4]≟21 and rov_confirm≟0
        Call SubP_RoV_down_right
        rov_confirm≔1
        ElseIf cam_array[4]≟22 and rov_confirm≟0
        Call SubP_RoV_down_left
        rov_confirm≔1
        ElseIf cam_array[4]≟23 and rov_confirm≟0
        Call SubP_RoV_final_orient
        rov_confirm≔1
        ElseIf cam_array[4]≟31 and neck_confirm≟0
        Call SubP_Neck_sideways
        neck_confirm≔1
        ElseIf cam_array[4]≟32 and neck_confirm≟0
        Call SubP_Neck_inverted
        neck_confirm≔1
        ElseIf cam_array[4]≟33 and neck_confirm≟0
        Call SubP_Neck_oriented
        neck_confirm≔1
        If neck_confirm≠1 or grommet_confirm≠1 or rov_confirm≠1 and allThreeChecked≟3
        grommet_seek≔0
        rov_seek≔0
        neck_seek≔0
        SubP_Grommet_inverted
        MoveL
        part_pose_hover≔p[0.75651,-0.0707,0.01843,0.1999,2.9960,-0.5736]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Hover_Above_Par
        part_pose_acros≔p[0.75651,-0.07070,-0.06547,0.1999,2.996,-0.5736]
        part_pose_acros≔pose_add(part_pose_acros,cam_to_pose)
        Across_from_Par
        part_pose≔p[0.75595,-0.05672,-0.6547,0.1999,2.9960,-0.5736]
        part_pose≔pose_add(part_pose,cam_to_pose)
        pick_part
        Set gripper=On
        Wait: 0.1
        MoveJ
        part_pose_after≔p[0.75595,-0.05672,0.04240,0.1999,2.9960,-0.5736]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        After_part_pi_1
        Waypoint_1
        Waypoint_2
        Set gripper=Off
        Wait: 0.1
        Waypoint_3
        SubP_Grommet
        MoveJ
        part_pose_hover≔p[0.73769,-0.05742,0.02620,-1.4263,1.3726,-0.9737]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        hover_above_par
        part_pose≔p[0.73769,-0.05742,-0.07978,-1.4263,1.3726,-0.9737]
        part_pose≔pose_add(part_pose,cam_to_pose)
        part_pick
        Set gripper=On
        Wait: 0.1
        part_pose_after≔p[0.73769,-0.05742,-0.0262,-1.4263,1.3726,-0.9737]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        After_part_pick
        Waypoint_5
        Waypoint_4
        Set gripper=Off
        Wait: 0.1
        Waypoint_6
        Waypoint_7
        SubP_RoV_down_right
        MoveJ
        part_pose_hover≔p[0.78825,-013705,-0.01876,-1.0754,1.5328,-1.2326]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Waypoint_16
        MoveL
        part_pose≔p[0.78826,-0.13705,-0.05193,-1.0754,1.5328,-1.2326]
        part_pose≔pose_add(part_pose,cam_to_pose)
        pick
        Set gripper=On
        Wait: 0.1
        MoveL
        part_pose_after≔p[0.74247,-0.10947,-0.01720,-1.0754,1.5328,-1.2326]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        Waypoint_17
        MoveJ
        Waypoint_18
        Waypoint_19
        MoveL
        Waypoint_20
        Set gripper=Off
        Wait: 0.1
        MoveJ
        Waypoint_21
        Waypoint_8
        SubP_RoV_down_left
        MoveJ
        part_pose_hover≔p[0.78825,-0.13705,-0.01876,-1.0754,1.5328,-1.2326]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Waypoint_9
        MoveL
        part_pose≔p[0.78826,-0.13705,-0.05141,-1.0754,1.5328,-1.2326]
        part_pose≔pose_add(part_pose,cam_to_pose)
        pick
        Set gripper=On
        Wait: 0.1
        MoveL
        part_pose_after≔p[0.74247,-0.10947,-0.01720,-1.0754,1.5328,-1.2326]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        Waypoint_10
        MoveJ
        Waypoint_11
        Waypoint_12
        MoveL
        Waypoint_13
        Set gripper=Off
        Wait: 0.1
        MoveJ
        Waypoint_14
        Waypoint_15
        Waypoint_8
        SubP_RoV_final_orient
        MoveJ
        part_pose_hover≔p[0.71307,-0.08579,0.07888,-2.2083,-2.0585,0.1988]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Waypoint_22
        part_pose_acros≔p[0.71307,-0.08579,-0.06009,-2.2083,-2.0585,0.1988]
        part_pose_acros≔pose_add(part_pose_acros,cam_to_pose)
        Waypoint_23
        MoveL
        part_pose≔p[0.73384,-0.08579,-0.06009,-2.2083,-2.0585,0.1988]
        part_pose≔pose_add(part_pose,cam_to_pose)
        Waypoint_24
        Set gripper=On
        Wait: 0.1
        MoveJ
        part_pose_after≔p[0.73384,-0.08579,0.04921,-2.2083,-2.0585,0.1988]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        Waypoint_25
        Waypoint_26
        Waypoint_27
        MoveL
        Waypoint_28
        Set gripper=Off
        Wait: 0.1
        MoveJ
        Waypoint_29
        Waypoint_30
        Waypoint_31
        SubP_Neck_sideways
        MoveJ
        Waypoint_32
        part_pose_hover≔p[0.75490,0.05193,0.04072,-1.9709,2.3540,-0.0086]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Waypoint_33
        part_pose_acros≔p[0.75684,0.04915,-0.03403,-1.9726,2.3592,0.0499]
        part_pose_acros≔pose_add(part_pose_acros,cam_to_pose)
        Waypoint_34
        MoveL
        part_pose≔p[0.73204,0.04974,-0.03403,-1.9726,2.3592,0.0499]
        part_pose≔pose_add(part_pose,cam_to_pose)
        Waypoint_35
        Set gripper=On
        Wait: 0.1
        part_pose_after≔p[0.73204,0.04974,0.06416,-1.9726,2.3592,0.0499]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        Waypoint_36
        MoveJ
        Waypoint_37
        Waypoint_38
        Waypoint_39
        MoveL
        Waypoint_40
        Set gripper=Off
        MoveJ
        Waypoint_41
        Wait: 0.1
        Waypoint_42
        Waypoint_43
        Waypoint_44
        SubP_Neck_inverted
        MoveJ
        part_pose_hover≔p[0.60768,0.04549,0.06066,-2.2331,2.1945,-0.0625]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Waypoint_45
        part_pose_acros≔p[0.60768,0.04549,-0.03075,-2.2331,2.1945,-0.0625]
        part_pose_acros≔pose_add(part_pose_acros,cam_to_pose)
        Waypoint_46
        MoveL
        part_pose≔p[0.62285,-0.10240,-0.01979,-2.2331,2.1945,-0.0625]
        part_pose≔pose_add(part_pose,cam_to_pose)
        Waypoint_47
        MoveJ
        part_pose_after≔p[0.60768,0.04549,0.06066,-2.2331,2.1945,-0.0625]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        Waypoint_48
        SubP_Neck_oriented
        MoveJ
        part_pose_hover≔p[0.70879,-0.07016,0.03955,-1.1504,1.3601,-1.1609]
        part_pose_hover≔pose_add(part_pose_hover,cam_to_pose)
        Waypoint_49
        MoveL
        part_pose≔p[0.70879,-0.07016,-0.03747,-1.1504,1.3601,-1.1609]
        part_pose≔pose_add(part_pose,cam_to_pose)
        Waypoint_50
        Set gripper=On
        Wait: 0.1
        MoveJ
        part_pose_after≔p[0.70879,-0.07016,0.03955,-1.1504,1.3601,-1.1609]
        part_pose_after≔pose_add(part_pose_after,cam_to_pose)
        Waypoint_51
        Waypoint_52
        Waypoint_53
        MoveL
        Waypoint_54
        Set gripper=Off
        Waypoint_55
        Wait: 0.1
        MoveJ
        Waypoint_56
        Waypoint_57

        Reply
  12. Brendan

    Hello Lars,
    Thanks. Yes, I think it was a series of IF statements, and one of them was dictating the first position. The problem has gone away now.

    I have another Socket question though. Is there any way of checking the current status of a socket? My communications works for a while (variable) and then stops. If I retry the communication, then it doesn’t recover, and if I try to re-open the port, it cannot. My server end on the PC seems to still have the port open and allocated. I think I have seen something called “bind”. Is this a command, and does it do anything useful?

    Thanks

    Reply
    1. zacopressadmin Post author

      Hi Brendan

      Great good to hear about the initial position.

      For the socket issue. Maybe try to make sure you close and open in correct sync and sequence (both sides) maybe also need to adjust timers – otherwise there can be a memory leak created.

      Regards
      Lars

      Reply
  13. Brendan

    Hello Lars and all. I am confused again!!!

    When I start my UR5 program, I need to manually move the unit to an “initial”position using the pendant, if it isn’t there already. My question is, what defines where that initial position is?

    I have programmed a “PARK” position, which is a safe starting place. I have a lot of other positions programmed, and they are used in various sub routines. I have the PARK position as a move at the very beginning of my program, immediately following ROBOT PROGRAM, but when I run the program, it is forcing me to move to another position, other than my park.

    Thanks

    Brendan

    Reply
    1. zacopressadmin Post author

      Hi Brendan

      The initial position is normally the first position the robot needs to go to, but maybe you have a situation where you in the beginning have a conditional event that send the robot somewhere else. Can you show me the code ?

      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>