Getting_started_with_the_Staubli_TX2-40_robot
Getting_started_with_the_Staubli_TX2-40_robot
Table of Contents
1) Getting started with the robot ...............................................................................................2
1.1) Starting up the Cs9 controller ........................................................................................2
1.2) Arm power with a manual Working Mode ........................................................................2
1.3) Manual movement of the arm ........................................................................................4
1.3.a) In the joint space ....................................................................................................4
1.3.b) In the Cartesian space ............................................................................................5
1.3.c) In the tool space .....................................................................................................5
1.4) Access to Tool Center Point coordinates.........................................................................5
2) Programming a VAL 3 application .........................................................................................5
2.1) Creation of the First_steps application and editing of its start() program ..............6
2.2) Variables .......................................................................................................................8
2.2.1) Variable types .........................................................................................................8
2.2.2) Variables display of the First_steps application, declaration of a new variable ....8
2.2.3) Initializing a variable .............................................................................................. 11
2.3) Coding the start() program ..................................................................................... 12
2.4) Running the application ............................................................................................... 13
2.5) Closing the application ................................................................................................ 13
3) Manual movement to a given point ..................................................................................... 13
3.1) Manual movement to jDpt joint point ......................................................................... 15
3.2) Manual Movement to pExamplePoint Cartesian Point............................................... 16
ANNEX .................................................................................................................................. 17
A.1) Loading an application stored in the controller into RAM ............................................... 17
A.2) Reading, initializing a variable using the VAL3 menu ..................................................... 18
A.3) Reading, initializing a variable using the JOG menu ....................................................... 19
1/23
1) Getting started with the robot
1.1) Starting up the Cs9 controller
The Cs9 controller (used with the robot arm) is started up by switching the main switch on the
front of the controller, circled in red in the figure below, to position ‘1’.
2/23
Figure 3: Working Mode Selector (WMS9) panel.
As a result, the icon in the bottom right of the Teach Pendant appears, indicating the
selection of the manual Working Mode. In this mode, robot speed is limited to 250 𝑚𝑚/𝑠,
allowing the operator to stand close to the robot arm.
Note: An alternative to using the WMS9 is to select the manual slow item from the drop-
down menu at the bottom right of the teach pendant, rather than the auto item (given by
default), see the figure below:
b) Press Power key at the top right of the teach pendant to switch the arm power on. This
action is only taken into account if the enabling device, located on the back of the teach pendant
(circled in red in the figure below), has been put into its middle position (by pressing the button
neither too weakly nor too strongly) in the last 15 seconds (note that the button must be released
and pressed again if the arm has not been powered up within 15 seconds). A light around the
Power key appears (flashing for a few seconds before being steadily) to indicate that the arm
power is on.
N.B.: The Emergency Stop button, at the top right of the teach pendant, immediately cuts arm
power and thus stops the arm from moving (if it was moving).
3/23
1.3) Manual movement of the arm
Assumption: The arm is powered up in a manual Working Mode (see 1.2).
Note: It is possible to adjust the speed of the Tool Center Point (TCP) by pressing the Jog key
, in the right vertical banner of the teach pendant. Its percentage value appears at
bottom left, with a maximum speed (100%) equal to 250 𝑚𝑚/𝑠.
Press the JOG button on the teach pendant main menu (accessed - if you are not already
there - by pressing the Home key , at the top left) to access the window for manual arm
movement.
Once the JOG menu has appeared, select one of the three buttons represented in the horizontal
banner , at the top of the window, to indicate the space in which
you wish to perform the movement:
- the Joint button to access the joint space,
- the Frame button to access the Cartesian space associated with the reference frame 𝑅0 of
the robot arm,
- the Tool button to access the tool space associated with the frame 𝑅𝑇𝑜𝑜𝑙 associated with the
tool (attached to the robot arm flange).
Press the Jog key (in the right vertical banner of the teach pendant), for example,
relative to joint J1 to rotate the arm around the axis of J1, either in the negative or positive direction.
N.B.: About the information displayed, by default, in the main window:
4/23
- flange (equivalent to flange[0]) indicates that no tool is selected, so the tool frame 𝑅𝑇𝑜𝑜𝑙
coincides with the frame associated with the flange of the robot arm,
- world (equivalent to world[0]) indicates that the reference frame (used for situating points,
frames, etc.) is the world frame (which coincides with the reference frame 𝑅0 of the robot
arm.
5/23
2.1) Creation of the First_steps application and editing of its
start() program
An application is composed of programs, by default start() (called by the system when the
application starts) and stop() (called by the system when the application is quit). In the
following, the application code will be placed only in the start() program (the stop()
program, initially empty, will not be modified).
Creation of the First_steps application
From the home page (accessible via the Home key , at the top left of the teach pendant), the
creation of an application, entitled First_steps, requires the following steps:
- Select the Val3 menu to access the window shown in the following figure:
Figure 7: VAL3 applications window with the default selection of the Storages tab.
- Select the Memory tab (rather than Storages), circled in red in the previous figure, to access
the controller's RAM. No application is present in the controller's RAM as shown in the
following figure:
- Press the button, circled in red in the previous figure, to create an application. In the
window that appears, see the following figure, type First_steps in the Name field, and
then click the OK button to confirm.
6/23
Figure 9: Creation of the First_steps application.
This results in the creation of the First_steps application in the controller's RAM as shown
in the figure below where the First_steps application appears in the Memory tab of the
VAL3 applications window:
Figure 10: Display of the First_steps application in the Memory tab of the VAL3
applications window.
This application is also saved on the controller's hard drive, as can be checked in the VAL3
applications window by selecting the Storages tab.
Thereafter, be careful to work only on the First_steps application, so as not to disturb the
contents of the controller's hard drive.
Editing of start() program
To edit the code of the start() program of the First_steps application:
- Press the button, at the top of the menu bar shown in the previous figure. The application
programs, that is start() and stop(), are listed in the Programs tab (selected by default)
of the window that appears, as shown in the figure below.
Figure 11: Listing of start() and stop()) programs of the First_steps application.
- Select the start() program to display its contents, which are currently empty except for the
begin and end tags delimiting the program's code:
7/23
Figure 12: Code of the start() program.
2.2) Variables
The main types of VAL3 variables, including those specific to robotics, are briefly described in
2.2.1. The process for visualizing the variables of an application and declaring a new variable (with
values given by default) is described in 2.2.2, while the method for initializing the variable values
is described in 2.2.3.
8/23
Figure 13: Button allowing access to the variables of the First_steps application.
The result is the window, shown in the figure below, listing variables of all types in alphabetical
order when the Data tab is selected (which is the default case). Variables are listed in a
hierarchical manner when the Geometry tab is selected.
By default, the mNomSpeed1 variable, of mdesc type, is set to indicate the speed of the TCP as the
robot arm moves.
The button, at the bottom right of the previous figure, allows the creation of new variables
whose type, name, container, etc. are to be declared in the window that appears after pressing
the button.
1
mSpeedName if you use the English language.
9/23
✓ Creating the jDpt joint variable
After pressing the button, the jDpt variable is created using the contents of the fields
described in the figure below:
After pressing the button, the pExamplePoint variable is created using the contents
of the fields described in the figure below:
10/23
Figure 16: Creation of the pExamplePoint variable.
where it is indicated that the pExamplePoint variable (Name field) is of type pointRX (Type
field), it corresponds to an array (Container field) of unit size (Size field), and that its scope is
private (Public button on off). The variable is defined relative to the world frame (Father field),
corresponding to the reference frame 𝑅0 of the robot. Note that it is possible to define points
relative to a frame (previously defined) other than the world frame. Remember to validate your
data by pressing the OK button. Note that the variable is initialized with default values, access to
these values being described in annex A.2.
Note: The variables are not saved if an asterisk appears in the floppy disk icon ( ), at top left of
the previous figure. Click on this icon to make the recording, the icon will no longer have an
asterisk.
11/23
The method, described in Annex A.3, is applied via the JOG menu (usually used to move the robot
arm manually towards a given point, see 3) and can be used to initialize point, frame and tool
variables.
12/23
Note: The program is not saved if an asterisk appears in the floppy disk icon ( ), at top left of
the previous figure. Click on this icon to make the recording, the icon will no longer have an
asterisk.
N.B.: The Move/Hold button , at the top right of the teach pendant, allows a soft and
immediate stop of the robot arm movement (which can be useful during a program development),
this type of stop does not cut arm power.
The First_steps application being loaded in the controller's RAM, go to the page described in
figure 10 (after 2 successive presses of the Back key if you come from the menu described
in the previous figure). The box corresponding to the application being checked (which sets the
application ‘at the top’ of the execution stack if several applications are loaded into RAM (which
is not the case here)), the application is launched by pressing the Run button (in the menu
bar), then by pressing: the Move/Hold button of the teach pendant once, then a second
time continuously, as well as on the enabling device (knowing that the arm movement stops as
soon as the Move/Hold button or the enabling device is released).
13/23
Figure 18: JOG menu.
- Press the button circled in red in the figure below to access the First_steps application
(located at the bottom of the figure below):
14/23
Figure 20: Selecting First_steps application in the JOG menu.
- Press the button circled in red in the previous figure to view the joint variables (due to the
selection, by default, of Joint in the field circled in red in the figure below) associated with the
application: the jDpt variable, in the present case, as shown in the figure below:
Figure 21: Display of the joint variables (jDpt in the present case) in the JOG menu.
15/23
Figure 22: Window showing the jDpt variable data before the robot arm moves.
which indicates the distance between the current point and the jDpt point and mentions that
the arm will be set in motion by pressing the Move/Hold key .
Figure 23: Display of the point variables (pExamplePoint in the present case) in the JOG
menu.
Check the box corresponding to pExamplePoint variable to indicate that you want the TCP to
move to pExamplePoint point. Two ways to set the robot arm in motion are proposed:
16/23
- by pressing the Joint button , which appears at top right of the window shown in the
previous figure, to indicate that the movement will be calculated in the joint space, leading to
the window shown in the figure below:
Figure 24: Window showing the pExamplePoint variable data before the robot arm moves.
which indicates the distance between the current point and the pExamplePoint point and
mentions that the arm will be set in motion by pressing the Move/Hold key .
You will notice that the button corresponding to the Move-in-line field
is set to off, which means that the active mode is indeed the
point-to-point mode (and not the straight line mode).
- or by pressing the Line button , which appears at top right of the window shown in the
figure 23, so that the TCP joins pExamplePoint point in a straight line. Note that the
calculation of the movement is done in Cartesian space, so the movement is not always
possible!
ANNEX
A.1) Loading an application stored in the controller into RAM
The following procedure is used to load an application located on the controller's hard disk into
RAM, by example, for its execution.
From the home page (accessible via the Home key , at the top left of the teach pendant):
- Access the list of applications located on the controller's hard disk by selecting the Storages
tab in the VAL3 menu , then pressing the button on the line corresponding to
Disk, circled in red in the figure below:
17/23
Figure 25: Selecting the controller’s hard disk.
- In the window that appears, check the box corresponding to the application you want to load
into RAM, which causes it to appear in the Memory tab, like the window described in figure
10.
By pressing the button corresponding to jDpt variable, then checking the corresponding box
in the window that appears, it is possible to read the contents of the variable, but also to initialize
its values by pressing the Edit button (at the top of the menu bar), see the figure below:
18/23
Figure 27: Reading, initializing the contents of jDpt variable.
Don’t forget to validate with the OK button if you modify the variable contents!
19/23
Figure 28: Display of the joint variables (of jointRX type), in the present case jDpt, in the JOG
menu.
- Check the box for jDpt variable, then press the Edit button at the top of the menu bar to
access the window described in the figure below, which allows you to read or initialize the
contents of jDpt variable.
20/23
Figure 30: Display of the Cartesian variables (of pointRX type), in the present case
pExamplePoint, in the JOG menu.
✓ Note that the point that will be created is defined in the frame world (i.e., the reference
frame 𝑅0 of the robot), as shown in the figure below.
- Then press the button circled in red (bottom right) in the previous figure. Select the
contents of the fields in the window that appears:
- Name to declare a Cartesian variable (Type pointRx), named pOtherPoint,
- Container to indicate that the variable corresponds to an array (array) of dimension 1
(Size field),
specify that its scope is private (Public field to off, selected by default), as shown in the figure
below.
21/23
Figure 31: Creating the pOtherPoint variable.
which gives (after validation via the OK button) the result described in the figure below where the
pOtherPoint variable appears.
Figure 32: Display of the Cartesian variables (of pointRX type), in the present case
pExamplePoint and pOtherPoint, in the JOG menu.
- Check the box for pOtherPoint variable, then press the Edit button at top of the menu
bar to access the window described in the figure below, which allows you to read or initialize the
contents of pOtherPoint variable through the field values 𝑋, 𝑌, 𝑍, 𝑅𝑋, 𝑅𝑌, 𝑅𝑍.
22/23
Figure 33: Read, write/initialize the contents of the pOtherPoint variable.
23/23