How to edit a program outside the teach pendant?

I am new in this forum and new to programming a UR5 robot, so maybe this is a very basic question.
I can program the UR5 using the teach pendant, but I need to create a program with a lot of points and it is tedious to input the program into the robot this way.
In other robots, I can make the program outside in text mode and then pass it to the robot. How can I do that with the UR5?
I have installed the URsim in VirtualBox.
I Have spent two months and I don’t find any way.

And software package that has a URScript postprocessor will be able to generate the paths. You can use Fusion 360 with their add-on postprocessor. You can also use other software like RoboDK, Cenit, etc. These would be more for taking a simulation and converting it to a URP (UR program file). If you’re just looking to use the simulator to layout the skeleton of the code then go to the real robot and teach the points, you can do this right on the simulator. Just make your program like normal and save it to a flashdrive. Put that drive into the pendent and load it.

You can probably also use Python to generate the code, I just haven’t done that personally, so I can’t really speak to HOW to do it, aside from I’m pretty sure you can.

Thank you Eric,
But my question was related to the way I can make a program outside the teach pendant (for example in windows) and how can I load it into the robot.
What software do I need to install? Or what packages?
Are there some examples that show how to do that?
Do I need to use Ubuntu?
My idea is to digitalize a drawing using a Wacom, which generates about 200 points, then using Matlab I take the points and generate the program of the robot in text mode with those points using for example MoveL, and then I want to pass this program to the robot. These are the steps I don’t know how to do.

I think you would need to utilize some software that has a URScript post-processor, or else you’d need to write your own. Try making a simple program on the teach pendant with a few waypoints and save it. Doing this will also save a .script file which shows how the robot is making the script. If you can write a post-processor to take your waypoint data and substitute it into the moveL/J command, then I would think you could put that right on the robot. I don’t know if Matlab already has some capability there or not unfortunately. Good luck!

If the programming is fairly straightforward, and the issue is tedious data entry, then scripts are probably the way to go.
Scripts can be written in Notepad, Notepad ++, or any other ascii text editor, so you have access to a fair number of text editing features - copy & paste may be your best friend here, if you’re generating points from another program.
Use an ftp program for file transfer (we use WINSCP) to copy files over. It’s great for backing up programs from the robot also.

I’m no expert on setting this up - I have a USB stick from our IT group which loads the necessary stuff onto the UR controller - I believe the program came from here:

This allows us to remotely control the robot, and I believe is also what enables the ftp connection for file transfer.

I too wish there was an easy way to modify the URP files in N++, and I see no reason why UR wouldn’t support this but alas here we are.

I found this post which has the interesting idea of creating a standard overall URP program but then calling scripts for the actual waypoints, which would be a decent bandaid fix to this issue.

I personally just plug in a keyboard to the pendant and do the tedious work to make the detailed URP

Josejuan,

What kind of “text program” are you wanting to write? Are you creating (x, y, z) coordinates, relative to some origin? How do you specify orientation, feed rates, etc.? This kind of thing is easily done with G-code, and UR robots read and execute g-code well…using the Remote TCP and Toolpaths URCap.

Thank you to all of you for your comments,
For me at this moment is enough to write a program on my PC in .script, and then with a pendrive load it to the teach pendant and execute.
You say that make a simple program and save it as .script. When I make a program the only format to save or load the program is .urp.
Do I need to install something to save or load as a .script?

No. It saves it as .script as well, you just have to dig for it. When you go to Load a program, you can hit the big dropdown box in the bottom right and select “All Files” and then you can find the .script file.

To load the file you’ve written on your computer, just insert a Script node into an empty program, select File, and load it from your flashdrive.

1 Like

Thank you very much.
That was what I was looking for to start programming.