Docsity

Karel Controller Robot System: A Comprehensive Study, Slides of Mechanical Engineering

Partial preview of the text

Download Karel Controller Robot System: A Comprehensive Study and more Slides Mechanical Engineering in PDF only on Docsity!

Karel Controller Robot System

Outline of the Study:

  • The System:
    • Robot
    • Control Cabinet and System
    • Teaching/Controlling the System
  • A study of Karel as a programming environment:
    • Looping
    • I/O
    • Subroutines
    • Interrupters

Working Map of the Robot:

Working Data: S110 -- 5Axis

Axis Desc. Range Std. Speed High Speed

1 Waist Rotation

300 deg 90 deg/sec Same

2 Shoulder Bend

85 deg 90 deg/sec Same

3 Elbow Bend 65 deg 90 deg/sec Same

4 Wrist Pitch 250 deg 240 deg/sec

5 Wrist Roll 380 deg. 380 deg/sec

Payload: 10 kg (22 lb)

Repeatability ±0.2 mm At max. speed/ext.

Weight: 350 kg (770 lb)

Using the Controller: User Interface

Panel tools

  • Power ON < ----- > Power Off (as required)
  • REMOTE ON – External Controller is “in Charge” -
    • REMOTE OFF – Standard Operating Panel is “in Charge”
  • MEMORY PROTECT ON – No Programming Changes can be done -- MEMORY PROTECT OFF – Programs can be changed (edited or positions and variables are as last written ie. updated)
  • FAULT RESET BUTTON – Repowers Servos after robot faults are cleared
  • CALIBRATE PUSH BUTTON – Moves Arm to Oriented Position
  • CYCLE START – Runs or Restarts (Paused) Programs
  • HOLD Button – Pauses Program by decelerating to a stop (THE WAY PROGRAMS SHOULD BE TERMINATED ‘IN THE MIDDLE’)

U.I.P. LCD Screen: Were it all happens!

Writing the 1 st^ Program:

  • All programs begin with a Define Line:
    • PROGRAM NAMED_
  • All programs end with the line:
    • END NAMED_
  • Because Karel is DISCIPLINED in design, we must define all variables (and initialize them) before use - Requires a variable definition section
  • All executable code follows a BEGIN statement (on a separate line)

A 1 st^ Program structure:

PROGRAM NAMED_ -- comments as desired -- more -- more CONST -- optional -- as needed VAR IDENTIFER: TYPE (Position and Integer among others) IDENTIFER: TYPE -- as needed BEGIN -- Program steps as required …. $SPEED = RATE – rate an integer variable, mm/sec at tool center point WITH $SYSVAR = XXXX, <$SYSVAR = YYY> MOVE TO POS_ DELAY 20 … -- Continue, note this symbol – introduces a comment line … END NAMED_

System Variable are very important – they control movement of the arm – and program execution

  • $TERMTYPE – We will choose one of:
    • FINE – target is closely approached
    • COARSE – target is also closely approached
    • NOSETTLE – Here, when the controller first senses that we are ‘at the target’ thecontroller begins execution of the next command!
    • NODECEL – Here, when the controller first senses that we have entered thedeceleration zone for a target position the controller begins execution of the next command!
  • $MOTYPE – We have available 3 types:
    • JOINT – an optimal mode of motion, smooth curves between positions
    • LINEAR – a mode that tracks straight lines between the positions or nodes on paths
    • CIRCULAR – a mode that interpolates circles between positions
  • $SPEED
    • The speed of the tool tip measured in mm/sec (MAX is 1500).
    • In code we state: $SPEED = RATE or $SPEED = 500
    • Here the arm speed takes on the value of the variable RATE (or it can be a constant)
    • As a Variable, it can be entered and changed using the Teach Pendant, or within theprogram code to offer more flexibility in execution

KAREL has some useful tools to Work with

Relative Geometries :

  • MOVE AWAY – a function that moves the TCP away from the current TCP position by a real number of millimeters along the negative Z (^) TOOL (approach) direction
  • MOVE NEAR – a function that move close to ( near !) a defined position. The stopping point is along the negative ZTOOL (approach) direction by a real number of millimeters that is stated in the command

Completing Program Entry (in the

Editor):

  • After the Program has been written, the operator Types “S” to force a check of program syntax
  • Then the operator types “E” to exit and compile the code - This creates a file called NAMED_1.pc
  • After successful Compilation we must load the program and variable files to continue work: - using the teach pendent - running the program - Type LO AL [NAMED_1] on UIP or use KCL S.K. for Load then S.K. All

Karel Coding can be produced

when Working “Off-line”

  • Employs a soft EMULATOR called: KFLOPPY. The emulator works with an RS232 interface between the S100 Control and a local PC.
  • The Emulator is a “Command” program requires us to open a Command Window on the PC – actually it is best to open 2!
  • In the first Command Window type:
    • cd ..
    • then type: cd/KAREL
    • then type: KFLOPPY
  • Finally, press F3 (PC’s function key) to execute the Emulator (the PC is treated as a Floppy ‘storage device’ w.r.t. the Main Karel Controller)
  • To bring a program to the PC, start the emulator, set up the proper directory for storing the file that will be downloaded

Working Offline, cont:

  • In the Second Command window we type CD
  • Type EDIT to open the structure-less text

Editor

  • this will allow Mouse navigation and line number identity
  • Note: restrict any typed line to about 50 characters in length so compilation errors are not induced.

Working Offline, cont:

  • Once the Editing of the code is completed on the PC

and we wish to upload the completed code to the S100 Control:

  • Choose KCL S.K. then type: COPY/OVERWRITE

FD:FILENAME.KL BM:

  • this will copy the current version of filename from the PC to the S100 Control.
  • NOTE: To use this changed version we must re-edit and “E” – compile – then reloaded program before it can be used