Use VScode edit .script to change the program

When we saved a program, it will create 3 files.
.urp , .txt and .script

Right now i use VScode to edit .script, but I can’t open this .script files on UR robot.

So is it possible to use VScode edit .script file to control UR robot?

This is how I have been programming the cobot. I just save it onto a flash drive and move it back and forth. Im not sure where you are running into your issue though.

Are you using the Script Program node and selecting “File” in the dropdown box to use your .script file?

In addition to the question, is there any method we can view the .urp file in windows machine?

Does the way you used is same as Nrivas said? the .script file I mean is when you create a program from UR and saved it. the system will create .urp .txt .script at the same time.

this .script will show all the step you did on this program and it also have other information which I not sure the meaning. I guess it is for other setting, like URcap.

this .script can’t use the Script function form Program>Advanced>Script>file to open.

yes, i try it before. but it can’t work for this script.
If I still want to use this script, I need to delete almost every code from it to let it work.

I found from other topic in this Forum.
You can unzip the .urp file and use xml to open it.
and then you can check the information from this .urp, but I not sure you can edit it or not. this also bother me.

If you want to edit .urp from Windows, you may need to use virtual machine to do it, like VMware.

1 Like

For the .urp inside the VM, what is the accessory that we used to see the file other than opening that with Polyscope.
In connection to this after running the .script file will that also generates the .txt .urp files.?

Yeah its hard to edit a saved .script file that was straight from the pendant. What I have been doing is Uploading the .script file in chunks the same way Nrivas described. What error are you getting when trying to use your .script file? You might be duplicating the code the initializes the cobot.

I don’t know if this is of any use to you guys, but NotePad++ has an FTP plugin, so you can edit .script files directly on the UR from your computer.

After you edit this .script file, how does it work?

In my case, after I change the .script to create a different program and put it back to UR with the original .urp file.
the program will still be the same program as the original .urp file, not the .script program I created.

Yeah, it won’t work like that. The .script file is generated from the urp file, when the robot runs the urp file.

But if you make a secondary program to load the script file in, it will reload the script file in the command when the program is loaded. :slight_smile:

I think @efn approach is the most feasible one in practical terms. I don’t remember very well, but I have seen somewhere in this forum other users asking how to generate / how is the format of the .urp for their script programs, so they could create their own programs fully, and UR never provided any answer to that.

So, just having a little UR program that just runs a .script is the easiest way for now.
This .script you can edit it directly if you have any remote client active on your controller, or you can copy-paste it back and forth with a usb or through ssh.