Presentation is loading. Please wait.

Presentation is loading. Please wait.

V+ Basics Sebastian van Delden USC Upstate

Similar presentations


Presentation on theme: "V+ Basics Sebastian van Delden USC Upstate"— Presentation transcript:

1 V+ Basics Sebastian van Delden USC Upstate svandelden@uscupstate.edu

2 Teaching Points Use the teach pendant to move the tool to a desired pose. Use the here command to store that pose in a location variable. Two types of location variables:  Stored with tool’s X, Y, Z, Yaw, Pitch, Roll Regular variable name (like Java/C++).  Stored with joint angle values. Variable name starts with a #.

3 Teaching Points IMPORTANT:  Locations remembered with tool X, Y, Z, Yaw, Pitch, and Roll values can sometimes be reached using different joints angle sets… CAN BE DANGEROUS. Some points can be reached as many as 8 different ways with our Staubli’s:  Lefty versus Righty  Above versus Below  Flip versus No-Flip

4 Teaching Locations Joint-Angle versus Tool-Pose Locations:  Use joint angles locations when the arm has to be moved a large distance to approach this location.  Use tool-pose locations when the arm has to be moved a short distance to approach this location. The here command stores a location in memory.  You will be asked if you would like to change the point. Just click enter if you are satisfied with the taught location. The move command moves to a point. The do command executes a V+ line of code at the command prompt. NOTE: Locations are only stored in memory and are lost when controller is powered down.  The zero command blanks out memory.

5 Changing a Location that was just taught. Example  Modify the Z value of a taught point, but leave all other values alone.  The taught Z value is discarded. If you don’t want to change it, just click enter! here a Change?,,50,,

6 Viewing/Deleting Locations listL  List all locations in memory listP  List all functions in memory listS  List all string in memory listR  List all reals in memory deleteL, deleteS, deleteR  Delete variables from memory

7 MOVE vs MOVES MOVE command finds the best (interpolated curve) way to go through the path points. MOVES command moves in a straight line from point to point.  Slower because movement depends on the slowest joint.  Straight line created using via points.

8 MOVE vs MOVES PROs  MOVE is quicker  MOVES is more precise (straight line movement) CONs  MOVE can cause collisions in tight situations, because the generated could hit a close by object or surface.  MOVES simple will not work at times because it is impossible to move in a straight line between two locations.

9 Example Activity Manually move the arm to a desired location Type in: here #a  Stores a joint-angle point Manually move the arm to another desired location. Type in: here #b Press CMP/PWR to get out of manual mode Type in do ready to return to the ready position. Okay, first try this: type in: do moves #a  What happened and why? Type in:  do move #a  do moves #b  do ready  The arm should visit the two points.

10 Basic V+ OS Commands fdirshow contents of directory fdir/C Xcreate directory X fdir/D Xdelete directory X fdel delete a file from the disk execute progexecute program abortabort current program load progload a program into memory store progsaves everything memory to file prog cd dirchange directory into dir cd NFS>XE:change directory to the mounted USB drive

11 .V2 Files Using store:  Everything in memory (locations, functions, etc…) is stored in the file.  Use a.V2 extension. The.V2 file has different separate parts: .LOCATIONSLocations .REALReal Variables .STRINGSString Variables .PROGRAMSFunctions .DOUBLESDouble Variables

12 .V2 Files cont…

13 You cannot overwrite an existing file with a store command.  Store the new file with a temporary name.  Then in V+ or Windows (if using USB drive), rename the original file and finally rename the new file to the original file. Function names and locations can be renamed in Windows using Notepad.  Must be using NFS mounted USB drive

14 File VERSUS function When you perform a store command, a.V2 file is created that contains a snap shot of everything in memory: functions, locations, variables, etc… Your function names do not need.V2 extensions and do not need to be at all related to the file name.

15 Example Activity Assumes you have trained two points #a and #b already. Type in see fun and hit “i” Type in: ready move #a move #b ready Click ESC followed by CNTRL+E CD to your NFS folder and type in store practice.v2 Type in execute fun Type in listL, and after that type in listP what do you see? In Windows, navigate to the USB drive, and use Notepad/WordPad to view practice.v2 Change in the code in notepad/wordpad to move to #b first and then #a. Save the file (CNTRL+S) Go back to Tera-Term and re-execute the program. What happened? Type zero and “y”, and then load practice.v2 (to reload the program) and then try to re-execute the program. What happened?

16 Arm Speed Can be set at prompt or program In a program:  SPEED 50 sets arm speed to 50% of monitor speed.  If no speed is set, 100% of monitor speed is used. At the prompt:  SPEED 50 sets arm speed to 50% of maximum arm speed.  Default when arm is booted up is 10%

17 Arm Speed cont… Example:  At monitor: speed 50  In program: speed 20  Results in arm speed of 10% of maximum Changing prompt speed from program:  speed 100 monitor NOTE: the ZERO command does not reset speed!

18 Arm Speed cont… For linear movements and prompt speed at 100%, an exact speed can be specified: speed 150 mmps  Sets speed to 150 mm per second speed 4 ips  Sets speed to 4 inches per second

19 Control Structures WHILE DO …. END IF THEN … END FOR = TO STEP ; the STEP part is optional – by default 1 is used. END

20 Arrays and for loops Training array points: here loc[0] orhere #loc[0] …... Get size of the array:  n = last(loc[ ]) 2D and 3D arrays:  here loc[0,0]  here loc[0,0,0]

21 Arrays and for loops cont… Example: ; loc[ ] is an array of taught locations in memory. n = last(loc[ ]) for i = 0 to n move loc[i] end

22 User Interaction Printing text to the monitor  type “text text text…\n” Comma can be used for concatenation  type “Total: “, total Getting user input:  prompt “How many?”, $A ; puts input in string $A  n = val($A) ; get numeric value out of $A

23 Forward Processing Moves are forward processed so that a smooth trajectory can be generated.  V+ looks 1 move ahead  VAL3 looks 10 moves ahead

24 Forward Processing cont… Example: type “hi 1\n” move #a type “hi 2\n” move #b type “hi 3\n” move #c type “hi 4\n” move #d type “hi 5\n”

25 Forward Processing cont… The BREAK command pauses program until current motion is completed. Example: type “hi 1\n” move #a type “hi 2\n” move #b break type “hi 3\n” move #c type “hi 4\n” move #d type “hi 5\n”

26 ALIGNING…. The align command aligns the tool’s Z axis with the closest world axis.  Type in do align from the command prompt

27 Approaching points appro location, mm or appros location, mm  Approaches the location from “above” it – mm distance added to the Z component of the location. depart mm or departs mm  Departs from the location in the positive Z direction of the location mm distance.

28 Gripping Pneumatic gripper use compressed air to push them closed on open. We have 2 finger gripper from Shunk

29 Gripping cont… Simply push the tubing into the holes on the gripper to lock them, they won’t come out. You need to figure out which holes on the back side of the arm to push the tubing in….

30 Gripping cont… Remove tubing by pushing down on the little plastic portion of connector and pulling out the tubing:

31 Gripping cont… V+ can control the grippers with using two commands:  openi Opens the grippers instantaneously  closei closes the grippers instantaneously Recall: you figure out where to plug the tubes in the arm.  Hint: do this by removing the stopper plugs from the holes, and issues “do openi” and “do closei” commands to try to figure out which holes should be used and how…

32 More commands… See the V+ Quick Reference manual for a summary of commonly used V+ commands and control structures.  On course website…


Download ppt "V+ Basics Sebastian van Delden USC Upstate"

Similar presentations


Ads by Google