Software and Hardware: Case Studies

Page 1



Software Rudiments Kuka PRC MasterCam+ KRL KRL + RoboSim End Effector Rudiments Sharpening a Pencil Button Circuit SLAMstruder Table of Contents


KR 9 R600


Software Survey

KR 9 R600


KR 9 R600


Kuka PRC

Ga. Git ommolor ehenimaxim velectoribea cum fugitae prae pre, cus resecto maxim quae volore volupti busaeri tassitendit, sit quatureseque rem hillantur as magnam reiuntiata con et facitem quam facescidicid mo ma que saerrov itatem endiatustis doluptati sequate recae nulluptatis quat modis simus, cum faccaeptae vercil ius excerio. Idese debis am, similias dist, quiae pariati busandae es ipic testior ad quaersp erferum fugiatur aut oditas di dit di am simus et peri que conet magnatur alisquae ne eat. Olorro que optur as aut hit,

nus alitatus, odit rehendae doluptatus sitasin ulparis estis doluptiori assitiorem andundaepro opta perrovid quae. Nam etur, sitaquo blab ipsume dolor senia quiaepr atiatquunt quam ideruptat optisto reprore quamus, et od quia parunt, cor aut plit autet eos quid eni volorro conse ini cora ilicienis alitias dest pa pa pro torem ilit laborem oluptaquis volorro reperch iliqui occat. Ullore sument utasper namendunt porit odi tet as nonse eossi abore as maximus dolorrovidis reruntio. Itas dolo te sa quas et ulparciam dempos ipsandit qui que plabor as dolent

KR 9 R600


KR 9 R600


MasterCam+ KRL This process set up some lines in Rhino, set up tool paths in mastercam/RobotMaster, and manually intervened in the KRL to introduce pusling into the tool. The goal was to use the gripper end effector to pick up an object, put it down, and retract. Failures included getting MasterCam to correctly recognize the 3D path as a contour.

KR 9 R600


&ACCESS RVP &REL 1 &COMMENT GENERATED BY ROBOTMASTER &PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe &PARAM EDITMASK = * DEF R2() EXT BAS (BAS_COMMAND :IN,REAL :IN ) INT I BAS (#INITMOV,0 ) ;******SETTINGS FOR PTP MOTION*********************** ;FOLD ;SET PTP $VEL_AXIS AND $ACC_AXIS FOR I=1 TO 6 $VEL_AXIS[I]=50 $ACC_AXIS[I]=100 ENDFOR ;ENDFOLD (SET PTP $VEL_AXIS AND $ACC_AXIS) ;******SETTINGS FOR LIN AND ARC MOTION*************** ;FOLD ;SET LIN AND ARC MOTION VARIABLES $VEL.CP=3 ;NOTE:$VEL.CP has a maximum value of 3 m/s! $VEL.ORI1=200 $VEL.ORI2=200 $ACC.ORI1=100 $ACC.ORI2=100 ;ENDFOLD (SET LIN AND ARC MOTION VARIABLES) ;******SETTINGS FOR POSITIONING CRITERIA************* ;FOLD ;SET POSITIONING CRITERIA $APO.CPTP = 50.00000 $APO.CDIS = 0.50000 $ORI_TYPE = #VAR ;ENDFOLD (SET POSITIONING CRITERIA)

$BASE={X 0.00000,Y 0.00000,Z 0.00000,A 0.00000,B 0.00000,C 0.00000} $TOOL={X -1.25000,Y -3.94700,Z 245.25800,A 90.00000,B -90.00000,C 180.00000} $ADVANCE = 0 PULSE($OUT[5],TRUE,5) PULSE($OUT[5],FALSE,5) PTP {A1 0.00000,A2 -90.00000,A3 90.00000,A4 0.00000,A5 0.00000,A6 0.00000} PTP {X 1073.25669,Y -118.21813,Z 254.00000,A -40.45714,B 0.00000,C 180.00000,S 2,T 35} C_PTP $VEL.CP=3 ;NOTE:$VEL.CP has a maximum value of 3 m/s! ;50mm/s LIN {X 1085.95669,Y -118.21813,Z 254.00000,A -46.15613,B 0.00000,C 180.00000} C_DIS CIRC {X 1094.93694,Y -114.49839,Z 254.00000,A -45.15592,B 0.00000,C 180.00000},{X 1098.65668,Y -105.51813,Z 254.00000,A -34.49675,B 0.00000,C 180.00000} C_DIS PULSE($OUT[2],TRUE,5) PULSE($OUT[2],FALSE,5) LIN {X 1085.95669,Y -105.51813,Z 554.00000,A -16.25313,B 0.00000,C 180.00000} C_DIS LIN {X 1085.95669,Y 294.48187,Z 554.00000,A -0.97913,B 0.00000,C 180.00000} C_DIS PULSE($OUT[5],TRUE,5) PULSE($OUT[5],FALSE,5) CIRC {X 1082.23694,Y 303.46212,Z 554.00000,A 6.57178,B 0.00000,C 180.00000},{X 1073.25668,Y 307.18186,Z 554.00001,A 7.86543,B 0.00000,C 180.00000} C_DIS LIN {X 1060.55669,Y 307.18187,Z 554.00000,A 4.80000,B 0.00000,C 180.00000} C_DIS PTP {A1 0.00000,A2 -90.00000,A3 90.00000,A4 0.00000,A5 0.00000,A6 0.00000} PULSE($OUT[2],TRUE,5) PULSE($OUT[2],FALSE,5) END


Base and Origin Open gripper

Path

Close gripper

Pulse($OUT[5], TRUE, 5) Pulse($OUT[5], FALSE, 5) This line of code pulses solenoid in the robot to open the gripper end effector, hence the true and false. Switching [5] and [2] switches the pneumatic pressure on and off- this is different based on the robot’s prepogrammed settings. The final “5” is the number of seconds the pressure is pulsed for. It can be longer or shorter.




KR 9 R600


KRL and RoboSim --

KR 9 R600


DEF grid_probe() EXT BAS (BAS_COMMAND :IN,REAL :IN )

DECLARATION STATEMENT

EXT BAS is a generic function which is run in the event of an error AXIS jpos is the name of a position based on rotational

DECL INT i DECL AXIS jpos

values

;******SETTINGS FOR PTP MOTION*********************** ;FOLD ;SET PTP $VEL_AXIS AND $ACC_AXIS FOR I=1 TO 6 $VEL_AXIS[I]=15 $ACC_AXIS[I]=100 ENDFOR ;ENDFOLD (SET PTP $VEL_AXIS AND $ACC_AXIS)

INITIALIZATION STATEMENT

;******SETTINGS FOR LIN AND ARC MOTION*************** ;FOLD ;SET LIN AND ARC MOTION VARIABLES $VEL.CP=0.5 $VEL.ORI1=200 $VEL.ORI2=200 $ACC.ORI1=100 $ACC.ORI2=100 ;ENDFOLD (SET LIN AND ARC MOTION VARIABLES)

LIN and ARC motion settings define continuous path movements. VEL.CP refers to travel speed VEL.ORI1/ACC.OR1 refers to swivel speed and acceleration VEL.OR2/ACC.OR2 refers to rotational speed and acceleration

Define the settings for movement, the tool tip, and the base plane In PTP movement, use a for loop to set each axis to travel at a velocity of 15 and accelerate 100

POSITIONING CRITERIA APO.CDIS refers to the translational distance within which the controller can optimize path transitions, 0.5mm. ORI_TYPE refers to the orientation of the tool as it moves along a path. This can be constant, variable or joint dependent. The base and tool definitions are written with XYZ positions and rotational values ABC

;******SETTINGS FOR POSITIONING CRITERIA************* ;FOLD ;SET POSITIONING CRITERIA $APO.CDIS = 0.50000 $ORI_TYPE = #VAR ;ENDFOLD (SET POSITIONING CRITERIA) $BASE={X 0,Y 0,Z 0,A 0.00000,B 0.00000,C 0.00000} $TOOL={X 0,Y 0,Z 0,A 0.00000,B 0,C 0.00000} $ADVANCE = 0 INTERRUPT DECL 3 WHEN $IN[7]==TRUE DO intPlunge() A = 0 B = 0 jpos = {AXIS: A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0} PTP jpos PTP {X 500.0000,Y 100.0000,Z 650.0000,A 180.0000,B 0.0000,C 180.0000}

MAIN PROGRAM

ADVANCE defines the number of steps in code the controller anticipates from 0 - 5. INTERRUPT the main program when input 7 is true, run the intPlunge() subroutine. A and B are variables used later to define the size of a grid of points. jpos represents the inital position and orientation of the robot.

KR 9 R600


INTERRUPT ON 3 LOOP plunge() WAIT SEC 0.012 moveX() ENDLOOP END

The interrupt is activated, the controller now checks for an event. The plunge subroutine is called. The robot waits for the shortest pulse duration possible The moveX subroutine is called The main program runs these operations continuously in a loop.

DEF plunge() LIN_REL {Z -400} END

plunge() subroutine drops the tool head 400mm down.

DEF intPlunge() BRAKE writePoint() RESUME END DEF moveX() IF A < 4 THEN LIN {Z 600} LIN_REL {X 10} A = A+1 ELSE IF A >= 4 THEN A=0 moveY() ENDIF ENDIF END DEF moveY() IF B < 4 THEN LIN {Z 600} LIN_REL {X -40, Y 10} B = B+1 ELSE IF B >= 4 THEN LIN {Z 600} HALT ENDIF ENDIF END

If an interrupt is triggered, the robot motion stops with the BRAKE command calls the writePoint subroutine and resumes The moveX() subroutine with the nested moveY() subroutine defines the robot motion in a rectangular grid. First the robot moves to absolute 600mm in the Z axis, then in increments of 10mm in the X axis for four steps. A is a counter. Once it reaches its fourth traverse along the X axis, the moveY() subroutine is called

The moveY() subroutine moves the tool head 40mm back to its initial position of X=0, and 10mm forward in the Y axis. The moveX() subroutine occurs again, until the B counter reaches 4. When this occurs the program stops with HALT.

KR 9 R600


KR 9 R600


End Effector Rudiments

KR 9 R600


KR 9 R600


Sharpening a Pencil One process we started to program using KRL+Mastercam was to sharpen a pencil. Using just KRL code we would make the robot pick up a pencil, move to the sharpener, sharpen, an put the pencil back. The base of the pencil holder would act to zero the tip of the pencil every time it was replaced and allow the script to continously run if desired. We then attempted to add some more functionability into the script and test the ability to introduce code from MasterCAM into our code and see how well they would intergrate. To do this we

generated a simple drawing path in MasterCAM and inserted it into the code so that the robot would pick up the pencil, sharpen it, write, sharpen again, finish writing, and then place the pencil back. We were abilit to get the script to finish the writing portion however we have now ran into an error that does not allow the program to continually loop. We have a few suspisions about what this could be but are still in a process of debugging.

KR 9 R600


KR 9 R600


After programming the bases and tool, we needed to write KRL telling it to use the first base (pencil holder) in relationship to its movement, we then moved it to the home, and in a positive Z translation to stay above the pencil, it would then plunge down in Z, switch digital input to close the gripper and grab the pencil.

KR 9 R600


KR 9 R600


After picking up the pencil, we established its movement in relationship to a new base (pencil sharpener) and to do a point to point move again to its home position with a positive Z translation to keep the pencil tip out of the sharpener.

KR 9 R600


KR 9 R600


Through some measurements and testing we calibrated how far the pencil needed to move down and how long it needed to stay in the sharpener. The coding then became a simple z plunge again, a wait, and then a retracting again. The reason we were able to produce the motion as a z plunge was due to a Euler translation of the base. When setting up the base we had a pencil sticking out that acted as the x-axis but manually transformed it by ....Double check with Zain/Justin on this part)

KR 9 R600



Next we added in a masterCAM tool path to write with the pencil. (This portion was covered in an earlier section on drawing with the robot) From there we created a new sub program to paste the code into and have the the robot begin drawing. The only edits made to the KRL exported from MasterCAM where to delete the initial set up already in our drawing. The subprogram worked however, we are experiencing errors getting out of the subprogram after it finishes. We think this could have something to do with advances. Debug to come.,



The last stop was to return to our original base, plunge, and release the pencil. One nice trick about this method, is by dropping the pencil into the base, as it shrinks it will continue to re-zero itself as the pencil tip will always be at the same point when it is picked up. However, one variable is the height of the pencil will change which means ideally we would need to develop a way to detect where the end of the pencil was, then be able to call that location as the new point to grab the pencil. One way we can do this is by adding a circuit onto the gripper that can trigger an

interupt to do that subprogram, then call use the location generated in the program. The coding needs to be worked out but first we developed the button circuit. (See End Affectors. )



Button Circuit One end effector we made was a simple circuit with a button that would bring in the 24 volts from the robotic arm, onto a circuit, then use a button to alter another digital input, in this case input 6. When the button is pressed input 6 can be used then as a probing device. For our purposes this well let us locate the constantly moving end of a pencil by allowing the arm to become a probe.


KR 9 R600


SLAMstruder

Its technical specifications also As part of the Digital Structures feature: group with Cailin Mueller, Mitchell Gu developed this end A 1.2mm nozzle opening for extrusion of large, self-supporting filaments effector as a PLA extruder. More A slim nozzle design to maneuver into tight corners Digital hotend temperature control with PID feedcan be found on this at Michtell’s back Extrusion speed control website, http://slamstruder. An attached blower fan with digital speed control for cooling filaments quickly. mitchgu.com/ An additional servo-controlled rotational axis for According to the website, “The goal of the SLAMStruder is to enable extrusion of 3D printable plastics in free-air instead of in layers”.

increased position control. On-board controls for setting hotend temperature, extrusion speed, fan speed, and servo angle.

KR 9 R600




Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.