Files Format

Also checkout the new CB3 forum

UR Files format.

Extracting files to the office computer.

After the user program files have been saved on a USB drive it is very easy to transport them to an office computer for documentation and backup. Just insert the files into your office computer and they are there to be viewed.

universal_robots_zacobria_files_format_1

Aside from the user files the UR controller also stores the default.intsllation files which are useful if a user program is transferred to another robot that for some reason had a modified default installation file. E.g. another IP address. Then it is very easy to reload the default.installastion file and make the user program run on another robot and.

The controller saves the user program file in three different versions. This is our “My_first_program” as explained in the “Programming” section of this manual.

The .txt files contain a simple description of our user program.

My_first_program.txt

universal_robots_zacobria_files_format_2

The .urp file is a binary file that the UR robot use and is not easy readable.

My_first_program.urp

universal_robots_zacobria_files_format_3

The .script file is our user program as a script file.

 

My_first_program.script
def My_first_program():
set_analog_inputrange(0, 0)
set_analog_inputrange(1, 0)
set_analog_outputdomain(0, 0)
set_analog_outputdomain(1, 0)
set_tool_voltage(24)
set_runstate_outputs([])
set_payload(0.0)
set_gravity([0.0, 0.0, 9.82])
while True:
$ 0 “Robot Program”
$ 1 “MoveJ”
$ 2 “Waypoint_1″
movej([-0.7601482324296471, -1.9284112483400442, 2.4200850009312065, -2.13148960204731, -1.562351390833685, -0.9523963238633675], a=1.3962634015954636, v=1.0471975511965976)
$ 3 “Waypoint_2″
movej([-0.7601145807261123, -1.925313457229536, 1.4271208291636501, -1.1406326407517442, -1.5621569587688118, -0.9518539657810257], a=1.3962634015954636, v=1.0471975511965976)
end
end

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



10 thoughts on “Files Format

  1. pinxian

    Hi all ,
    Is it possible to send a script file or txt file to ur robot controller via tcp connection?
    I have tried to send a command to robot arm use socket connection as the following:
    socket.send(“movej(p[0.600, -0.100, -0.170, 2.2400, -2.2424, 0.000], a=1.000, v=0.100, r=0)”+”\n”)
    However, I want to send a batch of command lines as the following snippet from the remote PC to ur controller? What Should I do?

    while True:
    $ 0 “Robot Program”
    $ 1 “MoveJ”
    $ 2 “Waypoint_1″
    movej([-0.7601482324296471, -1.9284112483400442, 2.4200850009312065, -2.13148960204731, -1.562351390833685, -0.9523963238633675], a=1.3962634015954636, v=1.0471975511965976)
    $ 3 “Waypoint_2″
    movej([-0.7601145807261123, -1.925313457229536, 1.4271208291636501, -1.1406326407517442, -1.5621569587688118, -0.9518539657810257], a=1.3962634015954636, v=1.0471975511965976)
    end
    end

    Reply
    1. zacopressadmin Post author

      Hi Pinxian

      Thanks for the question.

      Its not possible to send a text file directly to the robot – but a text file can be used as basis to send commands and wrap into commands e.g. from a Python or C application etc.

      Because some pauses and waits has to be inserted so the robot has time to finish the previous command.

      Maybe consider to study the example at the link below – and please read the text on the page before the example.

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

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

      Also check out the CB3 forum


      !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?’http’:'https’;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+’://platform.twitter.com/widgets.js’;fjs.parentNode.insertBefore(js,fjs);}}(document, ‘script’, ‘twitter-wjs’);


      !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?’http’:'https’;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+’://platform.twitter.com/widgets.js’;fjs.parentNode.insertBefore(js,fjs);}}(document, ‘script’, ‘twitter-wjs’);

      Reply
  2. Samuel Mansfield

    Hello Lars,

    I am trying to have a computer interact with my UR10 by just treating it as a linux machine. One of the things I want to do is have my computer read feature information off of the UR10. Do you know where this information is stored on the machine? I’ve spent some time looking for it, but can’t see it easily.

    Thanks!

    Reply
    1. zacopressadmin Post author

      Hello Samuel

      Thanks for the question.

      I am not aware of where the Feature informations are stored. Maybe it can be considered to move the robot to each of the feature positions and then read the position for each position with “get_actual_tcp_pose()” – or to use the plane variables as they can be found in the Variables tab.

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

      Also check out the CB3 forum



      Reply
  3. Jorah Gavos

    Is there a way to directly connect from a PC to the UR via Ethernet? Basically map it as a network drive so I don’t have to transfer scripts back and forth via USB drive?

    Reply
    1. zacopressadmin Post author

      Hi Jorah

      Thanks for the question.

      Maybe consider to transfer files via FTP to the robot.

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

      Also check out the CB3 forum



      Reply
  4. Karl-Etienne Forand

    Hi Lars!

    Do you know if there is a way to directly modify the script of a program done via polyscope? By example, I have put “if” instead of “elif” at several location and I think it would far easier to add only a couple of letters at some place in the script than redo most of my program via polyscope. I tried to modify the script file via expert mode, directly on the controller, but it did not appear to change anything when I return in polyscope. Do you have an idea what I could do?

    Reply
    1. zacopressadmin Post author

      Hi Karl

      Thanks for your question.

      I am not aware of any method to do this directly in a file because the script code is an embedded part of the UR program and therefore it has to be done with the Polyscope GUI.

      Regards
      Zacobria

      Reply
    2. Jensen Aw

      How can I edit the URP file? I’m trying to change some coordinate in .script file, but when I upload to the machine. It still run the same script before.

      So is there any chance that I can write my own script by just changing the coordinate of the robot?

      Thank you

      Reply
      1. zacopressadmin Post author

        Hi Jensen Aw

        The URP file is created when editing the program in Polyscope.

        Some examples on script programming can be found at these links.

        http://www.zacobria.com/universal-robots-knowledge-base-tech-support-forum-hints-tips/universal-robots-script-programming/

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

        http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/script-programming-from-the-teaching-pendant/

        http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/thread-in-script-file-example/

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

        Also check out the CB3 forum

        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>