VAL3 Basics Sebastian van Delden USC Upstate svandelden@uscupstate.edu
What it is? • VAL3 is Stäubli’s current language • Available on the different versions of the CS8 controller. • New teach pendant has also be designed that supports complete program development from the pendant… • I.e. you can teach points and write the program all from the pendant – no need for a computer at all in many applications!!
Teach Pendant Overview Mode Button Arm Power on/off E-Stop Movement keys Movement Mode (joint/frame/..) Speed adjust Function keys Keyboard Navigation keys Application control (Run/Pause/..) Enable button (like dead man) Digital I/O buttons Jog keys
Pendant Menus • Arrow keys for navigation • Up / Down to select items • Right to enter/ expand • Left to collapse • Application manager • Load, save, and edit applications • Task manager • Debugging • Control panel • System status, settings, IO • Calibration • Arm maintenance • Event Log
Manual Mode • Turn on Arm Power • Arm power button • Toggle deadman / parking • Move / Hold status • Must press and hold to get move • Speed • Restricted to 250 mmps • Deadman • Active • In Manual mode the arm can be manually jogged around.
3 4 5 6 2 1 1 3 2 4 Manual Mode: Joint • Move each joint seperately • Simple, easy to understand • Fast large movements of arm in cell • 6 Axis • Angle for each axis • 4 Axis • Angle for joints 1,2, and 4 • Distance for joint 3
Z+ X Y Y+ X+ Z Manual Mode: Frame, Tool • Manual movement based on a reference frame (3D coordinate system) • Coordinated movement of all joints • Allows linear paths or rotations around a frame‘s axis • Good for Small precise movements • Offset with in frame • Translational • X, Y, Z • Rotational • RX, RY, RZ
Manual Mode: Point 2 – press and hold • Can be used to move to (or with respect to) a taught point. • Cursor to taught point and then hold down Move/Hold • Can also be used to approach points – based on the tool frame. 1 w.r.t tool frame
X Tool flange tool pointer Z X X 100 mm Z Teaching Locations • Press New to create a new location variable • A point location • Y-Y-Z Yaw-Pitch-Roll information is stored • A joint location • Joint angles are stored • After you declare the new variable, to set it press Here • Select tool and frame • Don‘t forget to set a correct tool transformation which moves the tool frame to an appropriate spot on the tool • Note: Yaw-Pitch-Roll in VAL3 is Rotation around X-Y-Z
Creating Applications • Applications/projects contain data and instructions used by the robot to perform its job. • A folder with xml files inside • A project file (PJX) • A Data file (DTX) • Many program/function files (PGX) • Several functions can be written for a project • Stored on a Drive • Loaded into memory to be run
Example program/function PGX file • <?xml version="1.0" encoding="utf-8" ?> • <programList xmlns="ProgramNameSpace" > • <program name="demo" public="false" > • <description /> • <paramSection/> • <localSection/> • <source> • <code> begin • movej(above2,flange,mNomSpeed) • movel(p[0],flange,mNomSpeed) • movel(p[1],flange,mNomSpeed) • movej(above2,flange,mNomSpeed) • movel(p[0],flange,mNomSpeed) • movec(p[2],p[1],flange,mNomSpeed) • movej(above2,flange,mNomSpeed) • waitEndMove() • end • </code> • </source> </program> </programList>
Programs/functions • The application can consist of numerous functions which can call each other • There are two special ones that are always created for you when you create a new application: • start() • Is the function that always gets called when you run the program. • stop() • Is the function that always gets called when the program finishes. • You can place any kind of VAL3 instructions/code in these functions.
TaskCreate / Call • taskCreate • Spawns a seperate process • Several process can be spawned which run in parrellel to each other • CPU alternates between all tasks based on some Priority • Arguments: function title, priority and function name. • taskCreate “some title”, 100, fun() • call • Transfer program execution to a subroutine. • call fun() • Use taskCreate or call in the start() function to get things going
Editing Code • Use the menus to create new programs/functions and edit code. Example function • Ins. inserts a new line • VAL3 gives you a drop down menu with VAL3 code... Sweet! • Or, you can insert pre-defined variable names(Glo.), etc.
Global Variables • Simple • Num • Bool • String • Structures • Trsf • Joint • Point • Frame • Config • Tool • IO • Dio • Aio • Sio • Saving
Arrays • More then one value • Same name • Numerical index • [ ] • Starts with 0 • Actually all VAL3 variables are arrays • Single value array of 1 • No brackets defaults to index 0
Flow Control • taskCreate • call • while • do until • for • if • switch • wait • watch • delay
Operators • Math • = assignment • + add, conacate • - subtract • * multiply • / divide • % modulus • ! not • Comparisons • == equal to • != not equal to • > greater then • >= greater then or equal to • < less then • <= less then or equal to
Instructions • Some examples • Abs • Min • Max • Limit • Power • Left • Right • Mid • Chr • Asc • Size
pA pA pA ROBOT MOVEMENT pB pC movej, movel, movej,... pB pB pC pC pD pD pE pD pD pC MOTION STACK pB pE pA Motion • Instructions • movej • movel • movec • Stack • stopMove • restartMove • restMotion • waitEndMove
Different types of movement • Point-to-Point • movej(point/joint location, tool, mDesc) • Move to a location in the most optimal manner – either joint-angle or regular point • The second parameter is the tool frame you should use… So, a tool frame is provide for every movement command. • mDesc is a parameter that says what kind of movement to do. mNomSpeed is the built-int variable that refers to normal movement. • Linear • movel(point location, tool, mDesc) • Just like movej, but move in a linear motion (straight line movement. • Circular • movec(point via, point target, tool, mDesc) • Move to target location, but in a circular fashion which passes through a via point.
Different Types of Movement (cont) • Circular Movement
Executing an Application • Navigate to load from disk or create a new program and store it on the built-in harddrive • You‘ll need to be in Local mode before you can run the program • Keep pressing Mode button to cycle through the different modes. • Need to re-park teach pendant when switching between Local and Manual modes. • Remove the metal bracket from the back of the pendant and set the pendant back in it. • Press the Run button and choose the program to run. • If the program involves movement, you‘ll also have to press Move/Hold
Stäubli Robotics Studio • Recall that VAL3 software can also be developed with Stäubli Robotics Studio • It’s an IDE that runs on a PC • More user friendly that the teach pendant. • Offline Programming • Edit • Test • Transfer
Using Stäubli Robotics Studio (SRS) • A project can be FTPed back and forth between the CS8 and a PC running SDS. • SDS is a much better programming IDE and will make developing complex projects easier. • Points still need to be taught using the controller though… • This example project named ‘circular’ (to the right) was started on the CS8 controller and has a program called ‘demo’ in it.
Stäubli Robotics Studio • To transfer a project to SDS, you need to establish an FTP connection • Need to know the controller IP address and username and password • This can be found in the menus on the controller. • Enter the information in SDS’s FTP tool:
Stäubli Robotics Studio • Locate the project you would like to transfer
Stäubli Robotics Studio • Open the project in SRS
Stäubli Robotics Studio • Edit code; transfer back went ready