UNSW Making

Grasshopper .SCRIPT for Universal Robots

How to upload a grasshopper .SCRIPT file to the Universal Robot controller


The universal robots in the Design Futures Lab can be controlled using a the Furobot grasshopper plug in. Furobot allows you to export .SCRIPT file that can be imported to the UR pendant. This learn module describes the process to do this transfer.

Exporting a .SCRIPT file

When you have finished your program and checked the simulation for any errors in grasshopper you can then export your file. Furobot will export a .SCRIPT file to the file path where the grasshopper script is located. On the robotcore component click on the file button to grey and then back to green and it will save the latest version of the .SCRIPT to your file path. Load this file onto a USB.

Note : Make sure to use a UNIQUE NAME each time you load to the controller as it will not overwrite the previous file if it has the same name.

Exporting script files.png
Universal Robot interface.png

Once you have the file on a USB it can be loaded onto the Teach Pendant:

  • Plug the USB into the Teach Pendant

  • At the home page unlock the “PROGRAM ROBOT” tab with the password available from staff.

Click on an empty program in the program tab on the left, click on the subtabs “structure” this is where all the commands are. There are basic, advanced, wizards and URCAPS. The .SCRIPT code command is under advance, click on the .SCRIPTCODE button to add it to the program tree.

Figure 3 - Box on the left is the program tree, small box at the top of the image identifies the structure tab that holds all the commands, the smaller bottom box highlights where you can find the .SCRIPTCODE command

Screen Shot 2022-07-12 at 3.48.59 pm.png
Program structure.png

When the script command is in the program tree – click on the block and then change from the structure tab to the command tab. This is where we can edit and modify any of our commands. Here we can then use the dropdown box to change from a line of code to a file and this will help us navigate to the USB.

Tip: Always clear any of the previous work as sometimes it will run the old program not load the new one.

Figure 4 - The script code Button - this will be added to the program tree on the left hand side

Figure 5 - What the script code command page looks like. This is set to line where you can add a line of code or in the drop down box change it to a file which opens up a directory to the USB.

UR Script code.jpg