Script

Description

The Script command enables you to write and insert URScript code or files directly into your program, adding flow control, custom force and motion functions, and communication logic beyond the graphical nodes. You can combine it with other commands to run custom URScript for advanced integrations (sensors, PLCs) and external equipment control (gripper, conveyor).

 

To access the Script command

  1. Go to the main program screen. See Command Nodes.

  2. Tap the Script icon in the Commands toolbox.

    Script icon in the Commands toolbox

    A node is inserted into the program tree with a Set Script button.

    Script node with the Set Script button in the program tree

 

  1. Tap the Set Script button. A new screen appears where you can create, edit, or import a script.

    Empty Edit Script screen with the Import script field

 

Import script

  1. To import a script, tap the Import script field and select a script.

  2. Tap Save. For script file management, see Script Files.

    Available script files in the Import script list

Create script

  1. To create a script, type the script on the numbered-line Edit Script page, then tap Save.

    Script typed on the numbered lines of the Edit Script page

 

Save to System Manager

Save to System Manager saves the script you have created or edited in the Edit Script field as a named and reusable .script file in the robot's System Manager. It converts the Script node’s inline contents into a standalone file that the controller stores and manages. Once you save the script, you can also export it from the System Manager to a USB drive.

  1. Tap Save to System Manager after you create or edit a script.

  2. Enter the script file name and tap Confirm.

    Save script file dialog box with the file name entered

    A File saved notification appears on the lower-left side of the screen, indicating that the script was saved successfully.

    File saved notification after saving the script to the System Manager

The script file is copied from the System Manager into the Script node when you insert it. Later imports of the file into the System Manager do not change existing programs. Update those programs manually if necessary.