prog manual robo

119
ROBOT TRAINER WITH ED-MK4 COMMAND SET MANUAL ED-7220C TABLE OF CONTENTS

Upload: joao-luiz-ribeiro

Post on 29-Dec-2015

37 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Prog Manual Robo

ROBOT TRAINERWITH ED-MK4

COMMAND SET MANUAL

ED-7220C

TABLE OF CONTENTS

Page 2: Prog Manual Robo

CHAPTER I : THE HOST COMMAND SET

Introduction ...................................................................................................................................... 1System Commands

BA Read Motor Status ....................................................................................................... 3

SC Read System Contiguration ........................................................................................... 4

SD Stop/Start Delay Timer ................................................................................................. 6

SE Read Error Stack ........................................................................................................... 7

SM Read Motor Mode ......................................................................................................... 8

SR Real Teach Pendant Error ............................................................................................. 9

SR Reset Motor Current Limits ........................................................................................... 10

SS Read System Status ....................................................................................................... 11

ST Execute Diagnostics ....................................................................................................... 12

SD Read Usage Time ........................................................................................................... 13

SY Read Version and I.D. Number ...................................................................................... 14

SX Execute Diagnostics and Return Resutls ....................................................................... 15

SZ Read Delay Timer Value ............................................................................................... 16

Contiguration Commands

CC Set Coordinate Position ................................................................................................. 17

CG Enable/Disable Gripper Mode ........................................................................................ 18

CM Set Motor Mode ............................................................................................................ 19

CR Set Robot Type .............................................................................................................. 20

Motor Read CommandsAR Read System Acceterarion ................................................................................................. 21

DR Read Motor PWM Level and Director .......................................................................... 22

GS Read Gripper Status ....................................................................................................... 23

HR Read Soft Home Position ............................................................................................... 24

PA Read Actual Position ..................................................................................................... 25

PW Read Destination Position .............................................................................................. 26

PZ Read XYZ Destinaton Position ..................................................................................... 27

RL Read Limit Switches ...................................................................................................... 28

UA Read XYZ Rotation Angle ............................................................................................. 29

UH Read XYZ Home Position ............................................................................................. 30

UO Read XYZ Offset ........................................................................................................... 31

UT Read XYZ Tool Length ................................................................................................. 32

UY Read XYZ Height or the Elbow Rotation Axis (HO) .................................................... 33

VA Read Motor Actual Vetocity .......................................................................................... 34

VR Read Motor Desired Vetocity ........................................................................................ 35

VX Rest System Vetocity ..................................................................................................... 36

XR Read Auxilary Port Level and Direction ........................................................................ 37

Page 3: Prog Manual Robo

Motor Set Commands

AC Clear Motor Actual Position............................................................................................ 38

AS Set System Acceleration ................................................................................................. 39

DS Set Motor PWM Level and Direction ............................................................................. 40

GC Close Gripper ................................................................................................................ 41

GO Open Gripper ................................................................................................................ 41

HA Go to Hard Home Position ............................................................................................ 42

HG Go to Soft Home Position .............................................................................................. 43

HH Execute Hard Home ....................................................................................................... 44

HL Hard Home on Limit Switchs ........................................................................................ 45

HS Set Soft Home ............................................................................................................... 46

MA Stop All Motors and Auxiliary Ports ............................................................................ 47

MC Start All Motors, Coordinated ...................................................................................... 48

MI Start All Motors, Independent ....................................................................................... 49

MM Stop Single Motor ....................................................................................................... 50

MS Start Single Motor ......................................................................................................... 51

MX Start XYZ Move ........................................................................................................... 52

PD Set Motor Destination Position, Absolute .................................................................... 53

PR Set Motor Destination Position, Relative ..................................................................... 54

PX Set Axis Destination Position, Absolute ........................................................................ 55

PY Set Axis Destination Position, Relative ......................................................................... 56

VG Set System Velocity ....................................................................................................... 57

VS Set Motor Velocity ........................................................................................................ 58

XA Set XYZ Rotation Angle ............................................................................................... 59

XH Set XYZ Home Position ................................................................................................ 60

XO Set XYZ Offset ............................................................................................................. 61

XS Set Auxiliary Port Level and Direction .......................................................................... 62

XT Set XYZ Tool Length .................................................................................................... 63

XY Set XYZ Height of the Elbow Rotation Axis (HO) ....................................................... 64

Teach Pendant CommandsFR Receive Teach Pendant File from Host ......................................................................... 65

FT Transmit Teach Pendant File from Host ....................................................................... . 65

FX Execute Teach Pendant Program ................................................................................... 66

TA Abort/Terminate Teach Pendant Program ...................................................................... 66

TC Clear Teach Pendant Display ......................................................................................... 67

TD Print to Teach Pendant Display ..................................................................................... 68

TE Enable/Disable Teach Pendant to Move Motors ............................................................ 69

TH Give Control to Host ...................................................................................................... 70

TX Give Control to Teach Pendant ....................................................................................... 70

TK Return to Host the Next Key Code ................................................................................ 71

TL Return to Host the Last Key Code ................................................................................. 71

TR Reset the Teach Pendant ................................................................................................ 72

TS Set Teach Pendant Display Cursor ................................................................................. 73

TT Execute Teach Pendant Diagnostic and Return Results .................................................. 74

Page 4: Prog Manual Robo

Gain CommandsKA Set Proportional Gain .................................................................................. 75KS Set Differential Gain .................................................................................... 75KC Set lntegral Gain ......................................................................................... 75RA Read Proportonal Gain ............................................................................... 76RE Read Differential Gain ................................................................................ 76RO Read Integral Gain ..................................................................................... 76KR Restore User Gains from EEPROM ........................................................... 77KS Store User Gains to EEPROM .................................................................. 77KX Restore Factory Gains ................................................................................ 78

Input/Output CommandsIB Read Input or Switch .................................................................................. 79IP Read Input Port .......................................................................................... 80IX Read Switch Port ....................................................................................... 81OB Set Output Bit ............................................................................................ 82OP Set Output Port .......................................................................................... 83OR Read Output Port ....................................................................................... 84OT Toggle Output Bit ....................................................................................... 85WA Abort All Wait on Inputs and Switches ......................................................... 86WI Wait on Input or Switch .............................................................................. 87

CHAPTER 2 : TEACH PENDANT PROGRAM EXAMPLES

Introduction ..................................................................................................... 89Setup ............................................................................................................... 89Jump ............................................................................................................... 93Creating Moves .............................................................................................. 96

APPENDIX A: THE HOST COMMAND SET ........................................................... 97System Commands ............................................................................................ 98Configuration Commands ................................................................................... 99Motor Read Commands ..................................................................................... 99Motor Set Commands ........................................................................................ 100Teach Pendant Commands ................................................................................. 101Gain Commands ................................................................................................. 101Input and Output Commands ............................................................................... 102

APPENDIX B: THE MOTOR PORTS ........................................................................ 103

APPENDIX C: ED-MK4 BLOCK DIAGRAM ........................................................... 105

APPENDIX D: CARTESIAN COORDENATE SYSTEM SUPPORT ....................... 109

Page 5: Prog Manual Robo
Page 6: Prog Manual Robo

Chapter 1

The Host Command Set

The host command set provides maximum control and flexibirity over the ED-MK4controller The command set can be broken up into seven major groupings:

1: System Status Commands2: Configuration Commands3: Motor Read Commands4: Motor Set Commands5: Teach Pendant Control Commands6: Gain Commands7: Input and Output Commands

System Status commands provide information concerning system and motorconfigurations, error detection and control, version information, diagnostics, usagetime and timer control.

Configuration commands allow you to set the controller in one of three modes (XR-3,SCARA or GENERIC) and each motor in one of four modes (Idle, trapezoidal,velocity or open-loop).

Motor Read commands provides information on the current settings of the variousmotor registers and include limit switch and gripper status informaton.

Motor Set commands are used to control motor initialization, position, velocity,accereraton and movement.

Teach Pendant Cortrol commands provides the interface for directly controlling thependant display, to read keypad input, to transfer or control teach pendant files and toprovide an easy means for teaching points.

Gain commands are used to stabilize the motor control loop and to retrieve or storecontrol loop parameters.

Input and Output commands provides the interface to control outputs and read inputsor switches.

Page1 / 114

Page 7: Prog Manual Robo

All commands are of the form:

AA<,parameter 1><,pararneter 2>

AA is usually a two character code and parameter 1 and parameter 2 are additionalcharacter information needed by some commands.

For example, PD,C,-5OOO sets the destination position of motor C to -5000 encodercounts.

All commards must be terminated by a line-feed and/or cartage return. Multipleline-feeds or carriage returns are ignored. Characters are in ASCII representation.Alpha characters can be upper or lower case. All responses from the Mark IV areterminated by a carrage return and line-feed.

Many of the commards can be used while the system is under the control of the teachpendant This allows you to run a host application program of your design to testanalyze and modify the controller even while a teach pendant program is executing.

For example. the host can commard the controller to execute a teach pendant program,monitor the various motor registers, fine tune the control loop gain parameters andterminate the program.

The rest of this chapter provides detailed descriptions of each command. In addition,the appendix gives a short form version of each command.

Page2 / 114

Page 8: Prog Manual Robo

Read Motor Status SA

Returns which motors are executing a trapezoidal move.

Format: SA

The trapezoidal move status of each motor is contained in a single byte within theED-MK4 controller. Each bit within the status byte corresponds to one motor. Bit 0corresponds to motor port A. If the bit is set (1) the corresponding motor is stillexecuting a trapezoidal move. If the bit is cleared (0) the corresponding motor is eitherstationary or in a mode other than trapezoidal.

SA returns the decimal representation of the motor status byte and ranges in valuefrom 0 to 255. The value returned must be decoded to determine the state of eachmotor. Decoding is accomplished by taking the hex representation of the valuereceived and testing each bit individually.

Example: SA Sent by the host computer.38 Received from the Mark 4.

The hex equivalent is 26 or 00100110 in binary.Therefore motors B, C and F (read right to left) arestill executing a trapezoidal move.

Position and motor velocity commands can not be issued to motors in trapezoidalmode if they are still executing a trapezoidal move. The command to set accelerationor system velocity can not be issued if any motor is still executing a trapezoidal move.Commands to start motors can not be issued if any motor related to the movecommand is still executing a trapezoidal move.

For example, an MC command for an XR-3 robot move affects motors B thru F. MCcan not be issued if any of the B thm F motors are still executing a trapezoidal move.G or H motor, however, can still be executing a movement.

Therefore, in the case of the MC command you must use the SA command todetermine if the affected motors are busy. For setting acceleration or system velocityyou would use the SS command described below.

This command can be used while under teach pendant mode.

Page3 / 114

Page 9: Prog Manual Robo

Read System Configuration SC

Returns the system configuration byte representing eight system mode selects.

Format: SC

The value returned is the decimal representation of the byte and ranges from 0 to 255.The value returned must be decoded to determine the state of the various systemconditions. Decoding is accomplished by taking the hex representation of the valuereceived and testing each bit individually.

Bit 7: 1 = system is in host mode 0 = system is in pendant modeBit 6: 1 = the pendant is enabled 0 = the pendant is disabled *Bit 5: 1 = generic controller mode 0 = robot controller modeBit 4: 1 = SCARA mode 0 = XR-3 mode **Bit 3: 1 = the gripper is disabled 0 = the gripper is enabled ***Bit 2: 1 = XYZ mode 0 = joint modeBit 1: always 0 (reserved).Bit 0: always 0 (reserved).

* Bit 6 is valid only under host mode (bit 7 = 1). It is used by the host whenteaching points by allowing the pendant to move motors. The host can thendisable the pendant, read the motor positions and store them as a record to bereplayed later. Bit 6 is 0 when under teach pendant mode.

** Bit 4 is valid only under robot controller mode (bit 5 = 0).

*** Bit 3 is valid only under robot controller mode (bit 5 = 0). A standard gripper isnormally controlled by port A. In some applicatons the gripper may either not beused or implemented by some other mechanism such as a solenoid controlled byan output. In those cases it may be desirable to use port A as a general purposemotor port similar to ports G and H. Setting bit 3 = 1 will allow port A to act inthe same manner as ports G and H. If the system is configured as a genericcontroller (bit 5 = 1) then bit 3 will equal 1. Note that all gripper commandsbecome invalid if the gripper is disabled.

Bit 7 is controlled by the TH and TX commands in addition to the CONFIG key on theteach pendant.

Page4 / 114

Page 10: Prog Manual Robo

Bit 6 is controlled by the TE command.

Bits 5 and 4 are controlled by the CR command in addition to the CONFIG key on theteach pendant.

Bit 3 is controlled by the CG command in addition to the CONFIG key on the teachpendant.

Bit 2 can be controlled only by the CONFIG key on the teach pendant.

Unlike the teach pendant mode, when any of these modes are changed by the hostcomputer, the new configuration is not saved to EEPROM.

This command can be used while under teach pendant mode.

Page5 / 114

Page 11: Prog Manual Robo

Stop/Start Delay Timer SD

Controls a general purpose timer in the Mark IV.

Format: SD,d

0< d <=3000. Units of 1/10 second.

The SD command causes the timer to be loaded with the value specified. The timerbegins counting down to zero at a rate of 1 count per 0.1 second. Hence, sending avalue of zero causes the timer to stop.

A maximum of 300 seconds or 5 minutes can be programmed.

Bit 5 of the system status byte reflects the status of the timer. If the bit is set (1) thetimer is still counting and if the bit is cleared (0) the timer has finished or is zero.

Note that the timer is non-cumulative. Each time the SD command is sent the timer isreset to the new value.

This command can not be used while under teach pendant mode.

Page6 / 114

Page 12: Prog Manual Robo

Read Host Error Stack SE

Returns the last value pushed onto the error stack.

Format: SE

A first-in-last-out register, able to hold 24 pieces of information, is maintained in thecontroller for holding error codes. If a system error should occur, the coderepresenting the error is pushed onto the stack.

Bit S of the system status byte reflects the status of the error stack If the bit is set (1),an error exists and the error stack should be read to determine the source of the error.The bit remains set until the error stack is empty. SE returns zero if the error stack isempty.

The appendix provides a list of error codes and their meanings.

Note: Reading a current limit error does not reset the current limit circuitry. Thisallows you to remove the condition that caused the current limit before continuing. Toreset the current limit circuitry, the SR command must be issued.

This command can be used while under teach pendant mode.

Page7 / 114

Page 13: Prog Manual Robo

Read Motor Mode SM

Returns the specified motors mode.

Format: SM,m

m = A, B, C, D, E, F, G or H.

This command returns the current mode the specified motor is in The following tablelists the possible modes and their corresponding return values.

0 Idle mode.1 Trapezoidal mode.2 Velocity mode.3 Open Loop mode.

This command can be used while under teach pendant mode.

Page8 / 114

Page 14: Prog Manual Robo

Read Teach Pendant Error Byte SP

Returns the code of the last error recognized by the teach pendant.

Format: SP

Bit 0 of the system status byte reflects the status of the pendant error byte. If the bit isset (1), an error exists and the pendant error byte should be read to determine thesource of the error. SP returns zero if no pendant error exists.

The host computer cannot directly clear the pendant error byte. If the teach pendanthas control of the system the error will be annunciated on the display and the errorbyte cleared. Therefore, if it is desirable that the host computer be able to clear thependant error byte, it must send a TX command to give control to the pendantfollowed by the TH command to take control back.

The appendix provides a list of error codes and their meanings. This command can beused while under teach pendant mode.

Page9 / 114

Page 15: Prog Manual Robo

Reset Motor Current Limit Circuitry SR

Reset all motor amplifier current limit circuits.

Format: SR

Required when a current limit error occurs.

Has no effect on current limit circuits that have not tripped.

Be sure the condition that caused the current limit is removed betore issuing theSR command!

If the SR command is issued while a current limit condition still exists the currentlimit circuitry will trip again.

This command can not be used while under teach pendant mode.

Page10 / 114

Page 16: Prog Manual Robo

Read System Status SS

Returns the system status byte representing eight system conditions.

Format: SS

The value returned is the decimal representation of the byte and ranges from 0 to 255.The value returned must be decoded to determine the state of the various systemconditions. Decoding is accomplished by taking the hex representation of the valuereceived and testing each bit individually.

Bit 7: 1 = At least one motor is performing a trapezoidal move. *Bit 6: 1 = A system error has occurned. **Bit 5: 1 = The general purpose delay timer is active.Bit 4: 1 = At least one wait on input or wait on switch is still pending.Bit 3: 1 = No teach pendant is connected.Bit 2: 1 = The teach pendant ENTER key has been pressed. ***Bit 1: 1 = The teach pendant ESCAPE key has been pressed. ***Bit 0: 1 = A teach pendant error has occurred. ****

* Issuing an SA command allows determining which motor(s) is still executing atrapezoidal move.

** Issuing an SE command returns the error code.

*** Automatically cleared when SS is issued.

**** Issuing an SP command returns the error code but does not clear the error.

This command can be used while under teach pendant mode.

Page11 / 114

Page 17: Prog Manual Robo

Execute Diagnostics ST

Execute RAM test and teach pendant diagnostics.

Format: ST

If the RAM test fails an error code will be pushed onto the error stack.If the teach pendant is not connected or if the teach pendant returns an error error codewill be pushed onto the error stack.

Note: This command may take a moment to complete.

Normally an SS command would be issued after using ST to determine if a error wasgenerated. If an error is detected the SE command would be issu to read and clear theerror(s).

See also the SX command.

This command can not be used while under teach pendant mode.

Page12 / 114

Page 18: Prog Manual Robo

Read Usage Time SU

Returns the amount of time the controller has been on since leaving the factory.

Format: SU

The value returned is in the range of 0 to 2147483647 in units of minutes.

The usage time is updated once per minute. Therefore turning on the controller for less

than one minute will have no effect on the usage time stored.

This command can be used while under teach pendant mode.

Page13 / 114

Page 19: Prog Manual Robo

Read Version and I.D. Number SV

Returns the version of the controller and its (unique) serial or identification number.

Format: SV

The controller returns a string containing a copyright notice, the version of firmwarebeing used and the serial number.

The serial number may contain both alpha and numeric characters.

A typical response is:

Copyright (C) 1988 by Rhino Robots, Inc. V 1.00. SN 3009.

The version number is 1.00 and the serial number is 3009.

This command can be used while under teach pendant mode.

Page14 / 114

Page 20: Prog Manual Robo

Execute Diagnostics and Return Results sxExecute RAM test and teach pendant diagnostics and return the results

Format: SX

If the RAM test fails an error code will be pushed onto the ermr stack.If the teach pendant is not connected or if the teach pendant returns an error, an errorcode will be pushed onto the error stack.

Note: This command may take a moment to complete.

The controller will respond with the results of the tests.

For example, in an 8K RAM system:

Teach Pendant: Online.Ram Test: Passed. Last Addr= lFFFFH. Bytes OK = 8192.

Teach Pendant: Offline/Error.Ram Test: FAILED. Last Addr= lFFOH. Bytes OK = 8177.

In this last example the RAM test failed when hex address 1FFO was tested. Thenumber of bytes that passed up until the failure was decimal 8177.

See also the ST command.

This command can not be used while under teach pendant mode.

Page15 / 114

Page 21: Prog Manual Robo

Read the Delay Timer Value SZ

Returns the current value in the general purpose timer.

Format: SZ

The value returned can range from 0 to 3000 in units of 1/10 second.

For example, a value returned of 1200 is the same as 120 seconds or 2 minutes.

This command can be used while under teach pendant mode.

Page16 / 114

Page 22: Prog Manual Robo

Set Coordinate Position CC

Convents encoder position to xyz position and vice versa.

Format: CC,d

0<= d <=1.

A value of d = 0 causes the absolute destination registers to be set to the valuescorresponding to the current xyz position. Normally this is already the case. A valueof d = 1 causes the xyz destination registers to be set to the values corresponding tothe current encoder position.

No motor may be executing a trapezoidal move, a hard home must have beenpreviously executed and the system must be configured for either an XR-3 or SCARArobot arm.

This command is used when mixing joint and xyz moves. CC,0 is issued whenchanging from a series of MX (xyz) moves to an MI, MC or MS (joint) move.CC,1 is issued when changing from a series of joint moves to an MX move.

The command only needs to be used when robot motors or axes have been moved.Accessory motors have no eflect on the xyz position.

As an example of what can happen if you do not use the CC command, assume youare at some xyz position. An MI or MC move is issued changing the x,y and zposition. Then the x and y position is set for a new location and the MX commandissued. Since the z axis position has not been reset the robot will go to the wronglocation. Issuing the CC,1 command before the MX will set the z axis positioncorresponding to the new z position.

This command can not be used while under teach pendant mode.

Page17 / 114

Page 23: Prog Manual Robo

Enable/Disable Gripper Mode CG

Enable or disable the XR-3 or SCARA gripper

Format: CG,d

0<=d <=1.

A value of d = 0 disables the gripper and d = 1 enables the gripper. When enabled, thegripper will close then open.

The robot type must be XR-3 or SCARA,the gripper motor (motor port A) must be intrapezoidal mode and no motor in trapezoidal mode may be busy.

Setting the robot type to XR-3 or SCARA using the CR command will automaticallyenable the gripper and it will close then open. Setting the robot type to GENERIC willautomatically disable the gripper.

This command can not be used while under teach pendant mode.

Page18 / 114

Page 24: Prog Manual Robo

Set Motor Mode CM

Set the specified motors mode to idle, trapezoidal, velocity or open loop.

Format: CM,m,d

m = A, B, C, D, E. F, G or H.0 <= d <=3.

The following table shows the valid modes and the corresponding values for d.

0) Idle mode.1) Trapezoidal mode,2) Velocity mode.3) Open Loop mode.

In Idle mode the motor port is turned off.

Both Trapezoidal mode and Velocity mode require an encoded motor.

Open Loop mode can use either an encoded or unencoded motor.

You can not change motor port A’s mode if it is configured as a gripper port and is inthe process of being initialized.

A hard home can not be in progress.

Changing a moto C’s mode while it is moving will cause the motor to stopimmediately.

If motor port A was not in trapezoidal mode and is changed to trapezoidal mode, youmust issue a CG,1 command in order to enable motor port A as a gripper port.

This command can not be used while under teach pendant mode

Page19 / 114

Page 25: Prog Manual Robo

Set Robot Type CR

Set the ED-MK4 to control an XR-3, a SCARA or no robot.

Format: CR,d

0< d <=2.

The following table shows the valid robots and the corresponding values for d:

0) XR-3 controller.1) SCARA controller.2) GENERIC controller.

No motor may be busy executing a trapezoidal move. Nor can the robot type bechanged if a hard home is in progress or if the gripper is being initialized. This can bechecked by issuing the SS command.

All motor ports will be set to trapezoidal mode.

If the robot type is specified as XR-3 or SCARA the gripper will be enabled and willclose and then open. If the robot type is specified as GENERIC the gripper will bedisabled.

This command can not be used while under teach pendant mode.

Page20 / 114

Page 26: Prog Manual Robo

Read System Acceleration AR

Returns the system acceleration.

Format: AR

The value returned is in the range of 0 to 100 and represents the percentage ofmaximum system acceleration.

This command can be used while under teach pendant mode.

Page21 / 114

Page 27: Prog Manual Robo

Read Motor PWM Level and Direction DR

Returns the specified motors PWM level and its direction.

Format: DR,m

m=A. B,C,D,E. F,G or H.

The value returned ranges from -100 to 100 whose absolute magnitude represents thepercentage of maximum motor power and whose sign represents the direction themotor is turning in.

This command can be used while under teach pendant mode.

Page22 / 114

Page 28: Prog Manual Robo

Read Gripper Status GS

Returns the status (open or closed) of the gripper.

Format: GS

If the returned value is 1 the gripper is closed

If the returned value is 0 the gripper is open.

If the gripper is disabled the returned value will be 0. This command can be usedwhile under teach pendant mode.

Page23 / 114

Page 29: Prog Manual Robo

Read Soft Home Position HR

Returns the specified motor's soft home position.

Format: HR,m

m=A, B, C, 0, E, F,G or H.

The value returned ranges from -32767 to 32767 in encoder counts and represents theposition the specified motor would move to if an HG (go to soft home) were issued.

The soft home position is defined as 0 after power up or after executing a hard home.It is also defined as the current motor position when an HS (set soft home) is issued.

This command can be used while under teach pendant mode.

Page24 / 114

Page 30: Prog Manual Robo

Read Actual Position PA

Returns the current or actual position of the specified motor.

Format: PA,m

m=A, B,C, D, E, F,G or H.

The value returned ranges from -32767 to 32767 in encoder counts. This commandcan be used while under teach pendant mode.

Page25 / 114

Page 31: Prog Manual Robo

Read Destination Position PW

Returns the desired position of the specified motor.

Format: PW,m

m=A, B,C, D, E, F,O or H.

The value returned ranges from -32767 to 32767 in encoder counts and represents theposition the specified motor would move to when an MC (move coordinated), MI(move independent) or an MS (move single motor) command is issued.

This command can be used while under teach pendant mode.

Page26 / 114

Page 32: Prog Manual Robo

Read XYZ Destination Position PZ

Returns the desired xyz position of the specified axis.

Format: PZ,m

m = X, Y, Z, A or T.

The value returned represents the position in millimeters or degrees the robot wouldmove to when an MX (move xyz) command is issued. The X, Y and Z axes are inunits of millimeters and the A and T axes are in units of degrees. The value returned isfixed at two decimal places (two digits after the decimal point).

This command can be used while under teach pendant mode.

Page27 / 114

Page 33: Prog Manual Robo

Read Limit Switches RL

Returns the limit switch byte representing the state of each of the eight limit switches.

Format: RL

The value returned is the decimal representation of the byte and ranges from 0 to 255.The value returned must be decoded to determine the state of the various systemconditions. Decoding is accomplished by taking the hex representation of the valuereceived and testing each bit individually. The limit switch associated with motor portA is the low bit.

A bit value of 1 indicates the corresponding limit switch is open or inactive.A bit value of 0 indicates the corresponding limit switch is closed or active.

Example: RL Sent by the host computer.38 Return value. The corresponding hex code is 26H

or 00100110 in binary. Thereforh limit switches B,C and F (read right to left) are open and all othersare closed.

This command can be used whi!e under teach pendant mode.

Page28 / 114

Page 34: Prog Manual Robo

Read XYZ Rotation Angle UA

Returns the angle of rotation of the users coordinate system with respect to the robotcoordinate system.

Format: UA

The value returned is a floating point number in units of degrees.

See also XA for the setting of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can be used while under teach pendant mode.

Page29 / 114

Page 35: Prog Manual Robo

Read XYZ Home Position UF

Returns the linear distance between the robot coordinate system origin and the centerof the tool tip (gripper).

Format: UH,x

x = X, Y, Z, A or T.

The value returned is a floating point number in units of mihimeters for the X, Y andZ axes and units of degrees for the A and T axes.

The A axis does not exist on the SCARA robot.

See also XH for the setting of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system

This command can be used while under teach pendant mode.

Page30 / 114

Page 36: Prog Manual Robo

Read XYZ Offset UO

Returns the linear or angular displacement between the user coordinate system and therobot coordinate system.

Format: UO,x

x = X, Y, Z, A or T.

The value returned is a floating point number in units of millimeters for the X, Y, andZ axes and units of degrees for the A and T axes

The A axis does not exist on the SCARA robot.

See also XO for the setting of this parameter.

The appendix presents a short discussion on the cartesian coordinate system.

This command can be used while under teach pendant mode

Page31 / 114

Page 37: Prog Manual Robo

Read Tool Length UT

Returns the distance from the hand flex axis to the tool tip (gripper end)

Format: UT

The value returned is a floating point number in units of millimeters.

See also XT for the sefling of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can be used while under teach pendant mode.

Page32 / 114

Page 38: Prog Manual Robo

Read Height of Elbow Rotation Axis UY

Returns the height of the elbow rotation axis from the reference surface.

Format: UY

The value returned is a floating point number in units of millimeters.

This parameter has no meaning if the current robot type is SCARA.

See also XY for the setting of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can be used while under teach pendant mode.

Page33 / 114

Page 39: Prog Manual Robo

Read Motor Actual Velocity VA

Returns the actual velocity of the specified motor.

Format: VA,m

m = A, B, C, D, E, F, G or H.

The value returned ranges from -100 to 100 whose absolute magnitude represents thepercentage of maximum motor velocity and whose sign represents the direction themotor is turning in.

This command can be used while under teach pendant mode.

Page34 / 114

Page 40: Prog Manual Robo

Read Motor Desired Velocity VR

Returns the desired velocity of the specified motor.

Format: VR,m

m=A, B,C, D, E, F, G or H.

The value returned ranges from -100 to 100 whose absolute magnitude represents thepercentage of maximum motor velocity and whose sign represents the desireddirection the motor. For trapezoidal mode motors the direction has no meaning being afunction of desired position.

Whenever the gripper is enabled or commanded to open or close, a factory set velocitywill be used for the gripper. The motor velocity read will have no meaning.

This command can be used while under teach pendant mode.

While under teach pendant mode the motor velocity returned may not be what wasprogrammed depending on the mode the pendant is in or the function being executed.Once the system returns to play mode and no function is being executed the motorvelocity will return to its original value.

Page35 / 114

Page 41: Prog Manual Robo

Read System Velocity VX

Returns the system velocity

Format: VX

The value returned ranges from 0 to 100 and represents the percentage of maximumsystem velocity.

This command can be used while under teach pendant mode.

Page36 / 114

Page 42: Prog Manual Robo

Read Auxiliary Port Level and Direction XR

Returns the specified auxiliary port's PWM level and its direction.

Format: XR,d

0 <= d <=1.

The value returned ranges from -100 to 100 whose absolute magnitude represents thepercentage of maximum motor power and whose sign represents the direction themotor is turning in.

This command can be used while under teach pendant mode.

Page37 / 114

Page 43: Prog Manual Robo

Clear Actual Position AC

Set the actual position of the specified motor to 0.

Format: AC,m

m = A, B, C, D, E, F, G or H.

If the specified motor is in trapezoidal mode, it must not be currently executingtrapezoidal move. This can be checked by issuing the SA command.

Example: AC,C Motor C's actual position is set to 0.

Normally used during startup to initialize a motor when a home on switch is notavailable. Especially useful under generic controller mode when limit switches are notbeing used.

This command can not be used while under teach pendant mode.

Page38 / 114

Page 44: Prog Manual Robo

Set System Acceleration AS

Set system acceleration as a percentage of system maximum acceleration.

Format: AS,d

0 <= d <= 100.

System acceleration is a global parameter that affects all motors. If systemacceleration is 0, motors in trapezoidal mode will not be able to move and motors invelocity mode will be stopped.

Motors in trapezoidal mode must not be currently executing a trapezoidal move. Thiscan be checked by issuing the SS command.

Motors in velocity mode will immediately begin using the new acceleration value.

Example: AS,50 System acceleration is set to 50% of maximum systemacceleration.

This command can not be used while under teach pendant mode.

Page39 / 114

Page 45: Prog Manual Robo

Set PWM Level and Direction DS

Sets an open loop mode motor's pwm level and direction.

Format: DS,m,d

m=A, B, C, D, E, F,G or H.-100 <= d <=100.

The specified motor must be in open loop mode. This can be checkedty usinc an SMcommand. PWM level is a percentage of the absolute value of maximum motor power.A minus sign indicates negative voltage or direction.

Example: Assuming maximum motor power is 20 volts.DS,E,40 The voltage applied to the motor is 8 V (.4 * 20).DS,E,-50 The voltage applied to the motor is -10 V (.5 * 20).

This command can not be used while under teach pendant mode.

Page40 / 114

Page 46: Prog Manual Robo

Close Gripper GCOpen Gripper GO

Controls the gripper position.

Format: GCGO

The system must be in XR-3 or SCARA mode with the gripper enabled. The grippermust not be currently executing a move. This can be checked by issuing the SAcommand.

When the gripper is commanded to close, the motor moves to a position beyond whichthe gripper can travel. This means that when the gripper closes on an object, full motorpower is applied. Stall detection on closing is disabled. Stall will be detected if thegripper is commanded to open and can not. Velocity is at a factory set value and cannot be modified.

The gripper is controlled by motor port A. Consequently motor port A's absolutedestination and velocity registers are modified.

This command can not be used while under teach pendant mode.

Page41 / 114

Page 47: Prog Manual Robo

Go To the Hard Home Position HA

Moves all motors that are in trapezoidal mode to their 0 encoder position

Format: HA

A hard home must have been previously executed.

If the controller is under XR-3 mode, motors B thru F will move in a coordinatedfashion. The busy status of motors B thru F should be checked with the SA command.

If the controller is under SCARA mode, motors B thru E will move in a coordinatedfashion. The busy status of motors B thru E should be checked with the SA command.

If the controller is under GENERIC mode all motors under trapezoidal mode moveaccording to their set motor velocities. The busy status of all motors in trapezoidalmode should be checked with the SA or SS command.

The gripper motor is not affected.

Motor destination registers of affected motors become 0.

This command can not be used while under teach pendant mode

Page42 / 114

Page 48: Prog Manual Robo

Go To the Soft Home Position HG

Moves all motors that are in trapezoidal mode to their soft home position.

Format: HG

If the controller is under XR-3 mode, motors B thru F will move in a coordinatedfashion. The busy status of motors B thru F should be checked with the SA command.

If the controller is under SCARA mode, motors B thru E will move in a coordinatedfashion. The busy status of motors B thru E should be checked with the SA command.

If the controller is under generic mode all motors under trapezoidal mode moveaccording to their set motor velocities. The busy status of all motors in trapezoidalmode should be checked with the SA or SS command.

The gripper motor is not affected if enabled.

Motor destination registers of affected motors are set to their soft home pqsition.

This command can not be used while under teach pendant mode.

Page43 / 114

Page 49: Prog Manual Robo

Execute a Hard Home HH

Moves motors that are in trapezoidal mode to their hard limit switch positions.

Format: HH

If any motor is in trapezoidal mode, it must not be currently executing a trapezoidalmove. This can be checked by issuing an SS command.

If the controller is under XR-3 mode, motors B thru F will move to their hard limitswitch position and their actual and destination positions will be set to 0. The gripper,if enabled, will close and after all motors have found their 0 position, will open.

If the controller is under SCARA mode, motors B thru E will move to their hard limitswitch position and their actual and destination positions will be set to 0. The gripper,if enabled, will close and after all motors have found their 0 position, will open.

If an error occurs the hard home execution will be terminated and the gripper willopen.

If the controller is under GENERIC mode, all motors under trapezoidal mode wil havetheir actual and destination positions set to 0 but no movement will take place.

See also the HL command.

The hard limit switch position is found by taking the motor position at both ends ofswitch closure and calculating the center of the switch. The switch is alwaysapproached from the same direction for purposes of counting the encoder states as theswitch is traveled across.

This command can not be used while under teach pendant mode.

For execute the HARDHOME command,The microswitches on all the axes must be turned on

(press down) already.

Page44 / 114

Page 50: Prog Manual Robo

Hard Home on Limit Switch HL

Moves a motor that is in trapezoidal mode to its hard limit switch position.

Format: HL,m[,d]

m = A, B, C, D, E, F, 0 or H.d = 0, 1

The optional parameter d specifies an initial direction to look for a switch closure. If,when d is specified, the switch is not found or the motor stalls, the routine fails. Whend is not specified, the motor will change direction after a first failure and try again.The routine fails if the switch is again not found or a stall occurs a second time. Theparameter d is provided for those systems where the limit switch is at an end of traveland HL without d would cause the motor to initially travel in the wrong direction.

If the specified motor is in trapezoidal mode, it must not be currently executing atrapezoidal move. This can be checked by issuing the SA command.

The specified motor's actual and destination registers are set to 0.

Normally used to hard home those motors with limit switches that the HH commanddoes not handle. For example, motors G and H when the controller is under XR-3mode or motors A thru H when the controller is under generic mode. This command isinvalid for motor A if it is enabled as the gripper port.

The hard limit switch position is found by taking the motor position at both ends ofswitch closure and calculating the center of the switch. The switch is alwaysapproached from the same direction for purposes of counting the encoder states as theswitch is traveled across.

This command can not be used while under teach pendant mode.

Page45 / 114

Page 51: Prog Manual Robo

Set Soft Home HS

Store the current motor position of all motors into their respective soft home positionregister.

Format: HS

After power up all joint coordinate soft home registers are set to 0. XYZ coordinatesoft home registers are unknown.

After a successful hard home all affected motors have their joint coordinate soft homeregisters set to 0 and the XYZ coordinate soft home registers are set according to therobot selected.

Although valid at all times motors in trapezoidal mode should not be currentlyexecuting a trapezoidal move. This can be checked by issuing the SA command.

This command can not be used while under teach pendant mode.

Page46 / 114

Page 52: Prog Manual Robo

Stop All Motors and Aux Ports MA

Stops all motors regardless of motor or controller mode. Turns off all auxiliary ports.

Format: MA

Auxiliary port PWM level registers are set to 0. No other registers are affected.

This command can not be used while under teach pendant mode.

Page47 / 114

Page 53: Prog Manual Robo

Start Coordinated Move MC

Valid motors in trapezoidal mode start and end movement at the same time.

Format: MC

Only motors under trapezoidal mode with a destination position different from theircurrent position are affected. Affected motors must have a non-zero motor velocity.Motors whose relative destination registers are non-zero will make a relativemovement while all other motors will make an absolute movement. The relativedestination register becomes zero when the move command is issued.

If the controller is under XR-3 mode only motors B-F are affected. Motors B thru Fmust not be executing a trapezoidal move and can be checked using the SA command.

If the controller is under SCARA mode only motors B-E are affected. Motors B thru Fmust not be executing a trapezoidal move and can be checked using the SA command.

If the controller is under GENERIC mode all motors are affected. No motor may beexecuting a trapezoidal move. This can be checked by using either the SA or SScommand.

This command can not be used while under teach pendant mode.

Page48 / 114

Page 54: Prog Manual Robo

Start All Motors, Immediate Mode MI

Motors in trapezoidal mode move to their destination positions under their respectivemotor velocities.

Format: MI

Only motors under trapezoidal mode with a destination position different from theircurrent position are affected. Affected motors must have a non-zero motor velocityMotors whose relative destination registers are non-zero will make a relativemovement while all other motors will make an absolute movement. The relativedestination register becomes zero when the move command is issued.

Motors begin movement at the same time but may or may not stop at the same timedepending on the distance each motor must move and the motors set velocity.

If the controller is under XR-3 mode only motors B-F are affected. Motors B thru Fmust not be executing a trapezoidal move and can be checked using the SA command.

If the controller is under SCARA mode only motors B-E are affected. Motors B thru Emust not be executing a trapezoidal move and can be checked using the SA command.

If the controller is under generic mode all motors are affected. No motor may beexecuting a trapezoidal move. This can be checked by using either the SA or SScommand.

This command can not be used while under teach pendant mode.

Page49 / 114

Page 55: Prog Manual Robo

Stop Single Motor MM

Stops the specified motor regardless of motor or controller mode.

Format: MM,m

m = A, B, C, D, E, F, G or H.

This command can not be used while under teach pendant mode.

Page50 / 114

Page 56: Prog Manual Robo

Start Single Motor MS

Moves the specified motor to its destination position under its set motor velocity.

Format: MS,m

m = A, B, C, D, E, F, G or H.

The motor must be in trapezoidal mode with a non-zero velocity. If the relativedestination register is non-zero a relative move will be made. If the relative destinationregister is zero and the destination register is the same as the current position then nomovement will take place.

The specified motor must not be currently executing a trapezoidal move. This can bechecked by issuing an SA command.

This command is invalid for motor port A if it is enabled as the gripper.

This command can not be used while under teach pendant mode.

Page51 / 114

Page 57: Prog Manual Robo

Start an XYZ Move MX

Move to the predefined xYZ position in a coordinated fashion.

Format: MX

The ED-MK4 must be configured for the XR-3 or SCARA robot types.

If the XR-3 is used motors B thru F must be configured for trapezoidal mode and havea non-zero desired motor velocity.

If the SCARA is used motors B thru E must be configured for trapezoidal mode andhave a nor-zero desired motor velocity.

A hard home must have been previously executed.

If the controller is under XR-3 motors B thru F must not be executing a trapezoidalmove and can be checked using the SA command.

If the controller is under SCARA mode motors B thru E must not be executing atrapezoidal move and can be checked using the SA command.

If, on issuance of the MX command, the desired position is in bounds the robot willmove to the new position in a coordinated fashion. Any axis whose relative xyzdestination position is non-zero will make a relative movement and the relativedestination register will become zero.

This command can not be used while under teach pendant mode.

Page52 / 114

Page 58: Prog Manual Robo

Set Destination Position, Absolute PD

Sets the desired position a motor in trapezoidal mode will move to in ercoder counts.

Format: PD,m,d

m = A, B, C, D, E, F, C or H.-32767 <= d <= 32767.

If the specified motor is in trapezoidal mode, it must not be currently executing atrapezoidal move. This can be checked by issuing the SA command.

Example: PD,C,2000 Assuming motor C is not executing a trapezoidal move.Motor C's destination position becomes 2000

encoder counts from the hard home or 0position.

If the relative destination register is non-zero, then on issuance of a move commandthe destination register will be overwritten.

This command can not be used while under teach pendant mode.

Page53 / 114

Page 59: Prog Manual Robo

Set Destination Position, Relative PR

Sets the relative movement a motor in trapezoidal mode will travel. Motor desiredposition becomes the old desired position plus the relative movement.

Format: PR,m,d

m = A1 B, C, D, E, F, G or H.-32767 <= d <=32767.

If the specified motor is in trapezoidal mode, it must not be currently executing atrapezoidal move. This can be checked by issuing the SA command.

Position wrap-around may occur.

Example: Assuming motor C is not executing a trapezoidalmove and is at encoder position 30,000.

PR,C,-2000 When commanded to move, motor C will move2,000 encoder counts in the negative direction toencoder position 28,000.

Assuming motor C is not executing a trapezoidalmove and is at encoder position 30,000.

PR,C,10000 When commanded to move, motor C will move10,000 encoder counts in the positive direction.Since 10,000 plus 30,000 exceeds the allowedposition range, position wrap-around occurs andmotor C will come to rest at encoder position-25,535. Wrap-around position is calculated bysumming the current position and the relativemovement to make and subtracting 65535.Hence, 10,000 + 30,000 - 65535 = -25,535.

After issuance of a move command the relative destination register will become zero.

This command can not be used while under teach pendant mode.

Page54 / 114

Page 60: Prog Manual Robo

Set XYZ Destination, Absolute PX

Sets the desired position an X, Y or Z axis will move to in millimeters or the angle theA or T axis will move to in degrees.

Format: PX,m,f

m = X, Y, Z, A or T.-1000.00< f <=1000.00.

If the controller is under XR-3 motors B thru F must not be executing a trapezoidalmove and can be checked using the SA command.

If the controller is under SCARA mode motors B thru E must not be executing atrapezoidal move and can be checked using the SA command.

Example: Assuming XR-3 and motors B thru F are notexecuting a trapezoidal move.

PX,X,150.00 Axis X's destination position becomes 150.00 inmillimeters.

PX,A,45.00 Axis A's destination position becomes 45.00degrees.

If the relative destination register is non-zero, then on issuance of a move commandthe destination register will be overwritten.

This command can not be used while under teach pendant mode.

Page55 / 114

Page 61: Prog Manual Robo

Set XYZ Destination, Relative PY

Sets the relative movement an X, Y or Z axis will move in millimeters or the angle theA or T axis will move in degrees.

Format: PY,m,f

m = X, Y, Z, A or T.-1000.00 <= f <= 1000.00.

If the controller is under XR-3 motors B thru F must not be executing a trapezoidalmove ard can be checked using the SA command.

If the controller is under SCARA mode motors B thru E must not be executing atrapezoidal move and can be checked using the SA command.

Example: Assuming XR-3 and motors B thru F are notexecuting a trapezoidal move.

PY,X,150.00 Axis X’s destination position increases by 150.00millimeters.

PY,A,45.00 Axis A’s destination position increases by 45.00degrees.

After issuance of a move command the relative destination register will become zero.

This command can not be used while under teach pendant mode.

Page56 / 114

Page 62: Prog Manual Robo

Set System Velocity VG

Set system velocity as a percentage of system maximum velocity.

Format: VG,d

0 <= d <= 100.

System velocity isa global parameter that affects all motors. If system velocity is 0 allmotors will be stopped.

Individual motor velocities are expressed as a percentage of system velocity using theVS command. Thus, if a motors maximum available velocity is 100 encoder countsper second and motor velocity is at 50% then setting system velocity to 80% willresult in a commanded motor velocity of 40 encoder counts per second (40 = .50 * .80* 100).

Motors in trapezoidal mode must not be currently executing a trapezoidal move Thiscan be checked by issuing the SS command. The gripper can not be in the process ofclosing or opening.

Motors in velocity mode will immediately begin tracking their new velocities.

Example: Assuming motors A and C are in trapezoidalmode and stationary, and motors D and E arein velocity mode with their respective motorvelocities set at 40% and 50%. All othermotors are in idle mode.

VS,60 Motor D begins moving at .40 * .60 * motorD's maximum velocity and motor E beginsmoving at.50 * .60. motor F's maximumvelocity.

This command can not be used while in teach pendant mode.

Page57 / 114

Page 63: Prog Manual Robo

Set Motor Velocity VS

Set motor velocity as a percentage of system velocity.

Format: VS,m,d

m = A, B, C, D, E, F, G or H.-100< d <=100.

If the specified motor is in trapezoidal mode, it must not be currently executing atrapezoidal move. This can be checked by issuing the SA command. The sign ordirection of velocity has no meaning under trapezoidal mode.

If the specified motor is in velocity mode the motor will immediately begin trackingthe new velocity. A minus sign indicates negative movement.

If the specified motor is in idle or open loop mode, the motor desired velocity will beset but no motion will take place.

If system velocity is 0 no motor movement will take place.

Example: Assuming trapezoidal mode, system velocityis 80% and the specified motor is not busy.

VS,D,-50 Motor velocity is set to 40% of maximummotor velocity.No motion takes place.Assuming velocity mode and system velocityis 80%.

VS,D,-50 Motor accelerates to 40% of maximummotor velocity in the negative direction.

Whenever the gripper is enabled or commanded to open or close, a factory set velocitywill be used for the gripper. The programmed motor velocity will have no meaning.

This command can not be used while in teach pendant mode.

Page58 / 114

Page 64: Prog Manual Robo

Set XYZ Rotation Angle XA

Sets the angle of rotation of the users coordinate system with respect to the robotcoordinate system.

Format: XA,f

-1000.00 <= f <=1000.00 degrees.

See aiso UA for the reading of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can not be used while under teach pendant mode.

Page59 / 114

Page 65: Prog Manual Robo

Set XYZ Home Position XH

Sets the linear distance between the robot coordinate system origin and the center ofthe tool tip (gripper).

Format: XH,x,f

x = X, Y, Z, A or T.-1000.00 <= f <=1000.00.

X, Y, and Z are in units of millimeters, and A and T are in units of degrees.

The A axis does not exist on the SCARA robot.

See also UH for the reading of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can not be used while under teach pendant mode.

Page60 / 114

Page 66: Prog Manual Robo

Set XYZ Offset XO

Sets the linear or angular displacement between the user coordinate system and therobot coordinate system.

Format: XO,x,f

x = X, Y, Z, A or T.-1000.00<= f <=1000.00.

X, Y, and Z are in units of millimeters, and A and T are in units of degrees.

The A axis does not exist on the SCARA robot.

See also UO for the reading of this parameter.

The appendix presents a short discussion on the cartesian coordinate system.

This command can not be used while under teach pendant mode.

Page61 / 114

Page 67: Prog Manual Robo

Set Aux Port Level and Direction XS

Sets an auxiliary port's pwm evel and direction.

Format: XS,p,d

p = 1 or 2.-100 <= d <=100

PWM level minus sign is a percentage of the absolute value of maximum motorpower. A indicates negative voltage or direction.

Example: Assuming maximum motor power is 20 volts.XS,2,40 The voltage applied to the motor is 8 V (.4 * 20).XS,2,-50 The voltage applied to the motor is -10 V (.5* 20).

This command can not be used while under teach pendant mode.

Page62 / 114

Page 68: Prog Manual Robo

Set Tool Length XT

Sets the distance from the hand flex axis to the tool tip (gripper end).

Format: XT,f-1000.00 <= f <=1000.00 millimeters.

See also UT for the setting of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can not be used while under teach pendant mode.

Page63 / 114

Page 69: Prog Manual Robo

Set Height of Elbow Rotation Axis XY

Returns the height of the elbow rotation axis from the reference surface.

Format: XY,f

-1000.00 <= f <=1000.00 millimeters.

This parameter has no meaning if the current robot type is SCARA.

See also UY for the setting of this parameter.

The appendix presents a short discussion on the Cartesian coordinate system.

This command can not be used while under teach pendant mode.

Page64 / 114

Page 70: Prog Manual Robo

Receive Teach Pendant File from Host FRTransmit Teach Pendant File to Host FT

Format: FRFormat: FT

Refer to the chapter The Utility Disk for a complete discussion on file transfer.

Page65 / 114

Page 71: Prog Manual Robo

Execute Teach Pendant Program FXAbort/Terminate Teach Pendant Program TA

Begin execution of a teach pendant program or terminate one in progress.

Format: FX

The Mark IV must be under teach pendant control and in play mode. Issuing an FXcommand is the same as pressing the RUN/HALT key on the pendant. The pendantwill display any appropriate error messages such as NO PROGRAM or NO_HARDwhich means a hard home is required. The host computer can not halt or suspend theprogram. Issuing a second FX while a program is executing will result in an errorsince the pendant is no longer in play mode.

Format: TA

Once a program is executing, it can be terminated by issuing the TA command.

Page66 / 114

Page 72: Prog Manual Robo

Clear Teach Pendant Display TC

Clears the teach pendant display and sets the cursor to the home position.

Format: TC

The cursor is set to the top row, left most character.

This command can not be used while under teach pendant mode.

Page67 / 114

Page 73: Prog Manual Robo

Print to Teach Pendant Display TD

Prints a message to the pendant display at the current cursor position.

Format: TD,"message"TD,message

The message must be less than or equal to 16 characters. If a space, tab or punctuationmark is in the message, the message must be delimited by double quote marks.

Example: TD ,"hi there" Sent by the host computer.The pendant will display hi there at the current cursor position.

TD,hi there Sent by the host computer.This will generate an error since the space character is considered a delimiter and

themessage is not contained within double quote marks.

TD,hithere Sent by the host computer.The pendant will display hithere at the current cursor position.

Generally, before issuing a TD command, a TS (set cursor position) would be issuedin order to correctly place the message.

Example: TS, 1, 1 Sent by the host computer.TD,"hi there" Sent by the host computer.

The message hi there is printed at the home position.TS, 1, 13 Sent by the host computer.TD, "hi there" Sent by the host computer.

The message hi t is printed on the right side of the top row.

Refer to the TS command for further details about the cursor position.

This command can not be used while under teach pendant mode.

Page68 / 114

Page 74: Prog Manual Robo

Enable/Disable Teach Pendant to TEMove MotorsUnder host computer control, allow or disallow the pendant to move motors.

Format: TE,d

0 <= d <=1.

This command allows a host computer application to let the pendant take control overmoving the motors. After the host computer detects an ENTER or ESCAPE key, thehost can read the various motor positions and store them as a point for later replay.

A value of d = 0 disables the pendant while a value of d = 1 allows the pendant to taketemporary control.

Refer to the chapter Using the Teach Pendant under the section Teaching Points fora complete discussion on how to use this feature.

This command can not be used while under teach pendant mode.

Page69 / 114

Page 75: Prog Manual Robo

Give Control to Host Give THControl to Teach Pendant TXToggles system control between the host computer and the teach pendant system.

Format: TH

For the host computer to take full control over the ED-MK4 the teach pendant must bein the PLAY mode. There is no effect if the ED-MK4 is already under host control orif no teach pendant is connected.

Format: TX

A teach pendant must be attached in order for the host computer to give control away.There is no effect if the ED-MK4 is already under teach pendant control.

Page70 / 114

Page 76: Prog Manual Robo

Return to Host the Next Key Code TKReturn to Host the Last Key Code TL

Returns the next key pressed on the pendant or the last key pressed.

Format: TK

Waits until a key is pressed and returns the associated key code.

Format TL

Returns the code of the last key pressed.

The diagram below shows the key codes associated with each key.

Page71 / 114

Page 77: Prog Manual Robo

Reset the Teach Pendant TR

Resets the teach pendant and clears the display.

Format: TR

This command is similar to the TC (clear display) command in that the display iscleared and the cursor is set to the home position (row 1, column 1). The pendant willrespond by printing "l’m Ok" on the display.

It should not be necessary to ever use the TR command.

A teach pendant must be connected to the ED-MK4.

This command can not be used while under teach pendant mode.

Page72 / 114

Page 78: Prog Manual Robo

Set Teach Pendant Display Cursor TS

Sets the cursor position on the pendant's LCD display.

Format: TS,row,column

1 <= row <=2.1 <= column <=16.

This command is used prior to issuing a TD (print message) command in order toplace the message at the desired location within the display.

The teach pendant display is a 2 row by 16 character LCD. Row 1 is the top row ofthe display and column 1 is the leftmost character.

Example: TS,1 ,1 Sent by the host computer.The cursor is placed at the home position, that is, the top row, leftmost character.

TS,2,1 Sent by the host computerThe cursor is placed in the bottom row, leftmost character.

TS,2,16 Sent by the host computer.The cursor is placed in the bottom row, rightmost character.

A teach pendant must be connected to the ED-MK4.

This command can not be used while under teach pendant mode.

Page73 / 114

Page 79: Prog Manual Robo

Execute Teach Pendant Diagnostics and TTReturn Results

Causes the teach pendant to test itself and return the results.

Format: TT

The Mark IV responds with 0 (zero) if the teach pendant is functioning properly and Eor a number if the teach pendant detects an error.

If a number is returned it will represent the location of a stuck or held key.

This command can not be used while under teach pendant mode.

Page74 / 114

Page 80: Prog Manual Robo

Set Proportional Gain KASet Differential Gain KBSet Integral Gain KC

Set the proportional, differential or integral gain multiplier for the specified motor forthe current robot type.

Format: KA,m,dKB,m,dKC,m,d

m = A, B, C, D, E, F, G or H.0 <= d <=255.

If the robot type is changed the gains will be reset. See also KS (store user gains) andKR (reset user gains).

This command can be used while under teach pendant mode.

Page75 / 114

Page 81: Prog Manual Robo

Read Proportional Gain RARead Differential Gain RBRead Integral Gain RC

Return the proportional, differential or integral gain multiplier for the specified motorfor the current robot type.

Format: RA,mRB,mRC,m

m = A, B, C, D, E, F, C or H.

The value returned is in the range of 0 to 255.

If the robot type is changed the gains will be reset. See also KS (store user gains) andKR (reset user gains).

This command can be used while under teach pendant mode.

Page76 / 114

Page 82: Prog Manual Robo

Restore User Gains from EEPROM KRStore User Gains to EEPROM KS

KR resets the gains previously stored by the user from EEPROM for all motors for thecurrent robot type.KS stores the gains for all motors for the current robot type to FEPROM

Format: KR

The desired robot type should be set before issuing the KR command.

Format: KS

If the gains have been modified KS should be issued before changing robot types orshutting the system down.

These commands can be used while under teach pendant mode.

Page77 / 114

Page 83: Prog Manual Robo

Restore Factory Gains KX

Resets the gains stored by the factory for all motors for the current robot type.

Format: KX

The desired robot type should be set before issuing a KX command.

This command can be used while under teach pendant mode.

Page78 / 114

Page 84: Prog Manual Robo

Read Input or Switch Bit lB

Returns the state of the specified input or switch bit.

Format: IB,b

1 <= b <=16.

A bit specifier of 1 to 8 addresses input bits 1 to 8 while a bit specifier of 9 to 16addresses switch bits 1 to 8 respectively.

A returned value of 1 indicates the input is on or the switch is closed.A returned value of 0 indicates the input is off or the switch is open.

Example: IB,3 Sent by the host computer.0 Return value.

Input 3 is off.

Example: IB,12 Sent by the host computer. Return value1 Return value

Switch 4 is closed or on.

An input is considered on if current is flowing through the input port.

This command can be used while under teach pendant mode.

Page79 / 114

Page 85: Prog Manual Robo

Read Input Port IP

Returns the state of all eight input bits.

Format: IP

The value returned is the decimal representation of the byte and ranges from 0 to 255.The

value returned must be decoded to determine the state of each input. Decoding isaccomplished by taking the hex representation of the value received and testing eachbit individually. Input 1 is the low bit.

A bit value of 1 indicates the corresponding input is on.A bit value of 0 indicates the corresponding input is off.

Example: IP Sent by the host computer.38 Return value.

The corresponding hex code is 26H or 00100110 in binary. Therefore inputs 2, 3and 6 (read nght to left) are on and inputs 1, 4, 5, 7 and B are off.

An input is considered on if current is flowing through the input port.

This command can be used while under teach pendant mode.

Page80 / 114

Page 86: Prog Manual Robo

Read Switch Port IX

Returns the state of all eight switch input bits.

Format: IX

The value returned is the decimal representation of the byte and ranges from 0 to 255The value returned must be decoded to determine the state of each switch input.Decoding is accomplished by taking the hex representation of the value received andtesting each bit individually. Switch input 1 is the low bit.

A bit value of 1 indicates the corresponding switch is closed or on.A bit value of 0 indicates the corresponding switch is open or off.

Example: Ix Sent by the host computer.38 Return value.

The corresponding hex code is 26H or 00100110 in binary. Therefore switches 2,3 and 6 (read right to left) are on or closed and switches 1, 4.5, 7 and 8 are off oropen.

This command can be used while under teach pendant mode.

Page81 / 114

Page 87: Prog Manual Robo

Set Output Bit OB

Turn on or off an output port.

Format: OB,b,s

1 <= b <= 8.0 <= s <= 1.

If s = 1 the specified output is turned on.If s = 0 the specified output is turned off.

Example: OB,2,1 Sent by the host computer.Output 2 turns on.

Turning on an output allows current to flow thmugh the port.

This command can not be used while under teach pendant mode.

Page82 / 114

Page 88: Prog Manual Robo

Set Output Port OP

Set the output port to the hexadecimal representation of the value sent.

Format: OP,d

0 <= d <=255.

The value to be sent is the decimal representation of the byte to be written.Output us the low bit.

Example: OP,38 Sent by the host computer.The corresponding hex code is 26H or 00100110 in binary. Therefore outputs 2, 3and 6 (read right to left) are turned on and outputs 1, 4, 5, 7 and 8 are turned off.

Turning on an output allows current to flow through the output.

This command can not be used while under teach pendant mode.

Page83 / 114

Page 89: Prog Manual Robo

Read Output Port OR

Returns the state of all eight output bits.

Format: OR

The value returned is the decimal representation of the byte and ranges from 0 to 255.The value returned must be decoded to determine the state of each output. Decoding isaccomplished by taking the hex representation of the value received and testing eachbit individually. Output port 1 is the low bit.

A bit value of 1 indicates the corresponding output is on. A bit value of 0 indicates thecorresponding output is off.

The returned value represents the last state the outputs were set to and not the actualstate of the output. Refer to the chapter on inputs and outputs for further details.

Example: OR Sent by the host computer.38 Return value.

The corresponding hex code is 26H or 00100110 in binary. Therefore outputs 2, 3and 6 (read right to left) are on and outputs 1 4,5, 7 and 8 are off.

If an output is on it allows current to flow.

This command can be used while under teach pendant mode.

Page84 / 114

Page 90: Prog Manual Robo

Toggle Output Bit OT

Toggle the specified output port to the specified state.

Format: OT,b,s

1 <= b <=8.0 <=s <=1.

If the specified output is the complement of the desired state the output will equal thedesired state for 1/60 second then return to the original state. If the specified output isalready in the desired state the output will be complemented.

Turning on an output allows current to flow through the output.

This command can not be used while under teach pendant mode.

Page85 / 114

Page 91: Prog Manual Robo

Abort all Waits WA

Removes all pending wait on inputs and wait on switches.

Format: WA

See the WI (wait on input or switch) command.

This command can not be used while under teach pendant mode.

Page86 / 114

Page 92: Prog Manual Robo

Wait On Input or Switch WI

Detect when the specified input or switch matches the specified state.

Format: WI,b,s

1 <= b <=16.0 <= s <= 1.

A bit specifier of 1 to 8 addresses input bits 1 to 8 while a bit specifier of 9 to 16addresses switch bits 1 to 8 respectively. The rest of this section treats switches asinputs.

The host must poll the system status byte (bit 4) to determine when all wait on inputshave matched. This is different from the teach pendant system which waits until thestate is matched.

In the ED-MK4 controller, each input bit has a corresponding wait flag. When a WIcommand is received the flag corresponding to the specified input bit is set if thespecified state does not match the actual state of the input. The flag is cleared if theactual state of the specified input bit matches the specified state. The input iscontinually polled until a match occurs or the WA (abort all waits) command isissued.System status byte (bit 4) is set if any wait on inputs are still pending and cleared ifthere are no wait on inputs pending.

Example: Assume input bit 2 is off and bit 4 is on.WI,2,1 Sent by the host computer.

System status byte bit 4 is set because input 2 does not match the specified state.WI,4,1 Sent by the host computer.

Input bit 2 turns on.System status byte bit 4 is cleared because no other wait on inputs are pending.

Input bit 4 turns off.This has no effect since the WI,4,1 has already been executed.

This command can not be used while under teach pendant mode.

Page87 / 114

Page 93: Prog Manual Robo

Page88 / 114

Page 94: Prog Manual Robo

Chapter 2

Teach Pendant Program Examples

INTRODUCTION

The following examples show how the teach pendant might be used to program theMark IV controller and a connected robot arm. The examples will use the XR-3 robotarm but the same concepts apply to the SCARA or any accessory.

The equipment needed is the Mark IV controller with teach pendant and the XR-3robot arm.

Be sure all power is turned off and connect all the equipment according to the set upprocedures described in chapter two.

Once all the equipment is connected, turn on the Mark IV controller. If the controllerwas previously configured for XR-3 or SCARA with motor port A set in trapezoidalmode and the gripper enabled, the gripper will close then open. The LCDshoulddisplay the word PLAY in the upper right hand corner.

As shipped from the factory, the controller is configured for XR-3 robot operation,joint mode, gripper enabled and all motors in trapezoidal mode.

SETUP

If you're not sure what configuration the system is in, now is the time to check andmodify it if necessary. The following will present a step by step key sequence toconfigure the system for the examples presented.

The configuration we shall set is:Robot type will be XR-3.Motors A through F will be in trapezoidal mode.Motors C through H will be in idle mode.The gripper will be enabled.The coordinate system will be joint.

We will then invoke the hard home procedure to initialize the robot arm.

Page89 / 114

Page 95: Prog Manual Robo

Key to Press Display

Initial display PLAY

Selecting the Robot Type

CONFIG CONFIG SYSTEMGO TO HARD HOME

UP ARROW CONFIG SYSTEMTRANSFER MENU

UP ARROW CONFIG SYSTEMSETTINGS MENU

ENTER SETTINGS CFGMODE MENU

UP ARROW SETTINGS CFGCOORD MENU

UP ARROW SETTINGS CFGTYPE MENU

ENTER TYPE CFGcurrent robot type

If the current robot type is not XR-3, use the arrow keys to select XR-3 then pressENTER. If the current robot type is already XR-3 then press ESCAPE. If the grippermotor is in trapezoidal mode and enabled the gripper will close then open.

Selecting Motor ModesSETTINGS CFGTYPE MENU

UP ARROW SETTINGS CFGGRIP MENU

Page90 / 114

Page 96: Prog Manual Robo

UP ARROW SETTINGS CFGMODE MENU

ENTER MODE CFGMOTOR A MENU

1 ENTER MOTORACFGcurrent motor mode

2 If the current motor mode is not TRAPEZOIDAL then press either arrow keyuntil TRAPEZOIDAL is selected and press ENTER. Otherwise press ESCAPE.

MODE CFG MOTOR A MENU

3 UPARROW MODE CFGMOTOR B MENU

Repeat steps 1 through 3 for motors B through F. For motors G and H select IDLEmode during step 2 since nothing is connected to those ports.

Enabling the Gripper

ESCAPE SETTINGS CFGMODE MENU

DOWN ARROW SETTINGS CFGGRIP MENU

ENTER GRIP CFGcurrent grip status

If the second line of the display shows ENABLED then press ESCAPE.Otherwise if the display shows DISABLED, press either arrow key to select ENABLEthen press ENTER. If you had to enable the gripper it will close then open.

Page91 / 114

Page 97: Prog Manual Robo

Selecting the Coordinate SystemSETTINGS CFGGRIP MENU

UP ARROW SETTINGS CFGMODE MENU

UP ARROW SETTINGS CFGCOORD MENU

ENTER COORD CFGcurrent coordinate system.

If the current coordinate system is JOINT then press ESCAPE. Otherwise use thearrow keys to select JOINT then press ENTER.

SETTINGS CFGCOORD MENU

ESCAPE PLAY

At this point all the changes you have made have been saved to EEPROM. If youpower down the controller you won't need to reconfigure the system unless you'vechanged equipment such as switching to the SCARA arm, added accessories or wishto use the xyz coordinate system for pendant programming.

Executing a Hard Home

CONFIG CONFIG SYSTEMGO TO HARD HOME

ENTER PLAYHARD HOME

This display will remain until the hard home has completed execution.

On completion PLAY-

Page92 / 114

Page 98: Prog Manual Robo

JUMPS

Jump instructions are of two types: conditional or unconditional. The first examplewill show an unconditional jump wherein an output is turned off and on continuously.The second example will show the same program but the program will terminate if aswitch is turned oft.

Be sure you are in PLAY mode before starting. If the system is in EDIT mode simplypress ESCAPE. If the system is in RUN mode first press HALT followed by ESCAPE.

Press the EDIT key to begin EDIT mode. If the error message NO_HARD is displayedthen a hard home must be executed. (See SETUP described above.) The robot willreturn to its hard home position if it has been moved since executing a hard home.

If the display shows EDIT READY then a program already exists. Press ESCAPE toleave EDIT then press ERASE. Answer "yes" to remove the existing file then pressEDIT again.

The program we wish to create is designed to turn on and oft an output continuously.This requires a jump instruction so that the instructions controlling the output can berepeated. In order to use a jump instruction a target label telling the system where tojump to must be specified.

Recall that all outputs are turned oft when EDIT mode is staned, saving us the troubleof initializing them.

The completed program will be shown followed by the key sequence used to create it.

SL, 2 Line 1 Set target label 2.OB, 1, 1 Line 2 Turn output 1 on.OB, 1, 0 Line 3 Turn output 1 off.GL, 2 Line 4 Go to label 2.

Page93 / 114

Page 99: Prog Manual Robo

The corresponding key sequence is:Set Label SL, Line 02 SL,2_ Line 0Enter SL,2 Line 1

Set Output OB, Line 11 OB,1,_ Line 1On OB,1,1,_ Line 1Enter OB,1,1 Line 2

Set Output OB,_ Line 21 OB,1,_ Line 2Off OB,1,0_ Line 2Enter OB,l,0 Line 3

Go To Label GL, Line 32 GL,2_ Line 3Enter GL,2 Line 4

Once the program has been input, press ESCAPE to leave EDIT mode. Pressing RUNwill execute the program and you should see the LED associated with output 1flashing on and off.

To terminate the program press HALT followed by ESCAPE. If instead of pressingESCAPE you press RUN, the program will continue execution. STOP will alsoterminate the program but this is usually reserved for emergency use.

The second example is similar to the first but terrnination of the program will dependon a switch setting. This is implemented using a conditional jump instruction. If thecondition is met, the jump is taken. fl the condition is not met, execution continues tothe next instruction. If no next instruction exists, the program will terminate.

SL,2 Line 1 Set target label 2.05,1,1 Line 2 Turn output 1 on.OB,1,0 Line 3 Turn output 1 off.11,12,1,2 Line 4 If switch 4 is on then jump to label 2.

Page94 / 114

Page 100: Prog Manual Robo

In this example the unconditional jump instruction has been replaced with aconditional jump. If the switch is on1 the program will continue to execute. If theswitch is off, execution will terminate since there are no more instructions.

We can either input this program as before, after erasing the previous one, or we canmodify the existing program.

To modify the program begin EDIT mode by pressing the EDIT key. Use the UPARROW or DOWN ARROW key to step through the program until the jumpinstruction at line four has been reached.

Remember that most instructions are executed when stepping through the program.Jump instructions are not.

There are three methods to modify the program. We can delete the current line andthen insent the new instruction or we can replace the current fine or, lastly, we can beat the line previous to the one in question, insert the new instruction, step to the oldinstruction and delete it. Obviously, replacing the line is the simplest approach.

To replace the current line use the following key sequence:

On Inp/Sw Go To LI,_ Line 41 LI,1_ Line 42 LI,12,_ Line 4On LI,12,1,_ Line 42 LI,12,1,2_ Line 4Replace LI,12,1,2 Line 4

Press ESCAPE to leave EDIT mode. The program will continue to execute wish, youcan terminate the program

Be sure switch 4 is on then press RUN. until switch 4 is turned off. Again, if you bypressing HALT followed by ESCAPE.

Page95 / 114

Page 101: Prog Manual Robo

CREATING MOVES

To create moves involves selecting the motor you wish to move and pressing the UPARROW or DOWN ARROW to effect movement. Assuming you are in edit mode,pressing ENTER will then store the new point in memory.

With some limitations you can select and move different motors in any order and atany time before pressing the ENTER key. Refer to the section “The Motor Keys”inchapter 6 “The Teach Pendant Command Set”, for specific details.

Although not generally useful, you can mix robot joint and xyz moves using thependant. To mix joint and xyz moves however requires you leave edit mode, changethe coordinate system through the CONFIG key and reenter edit mode. Because editmode is reentered, the robot will return to the hard home position and you will have tostep through the program to get back to the point at which you were. Also keep inmind that reentering edit mode will cause any previously programmed outputs to bereset.

Page96 / 114

Page 102: Prog Manual Robo

Appendix A

The Host Command Set

All commands are of the form:

AA<,parameter 1><,parameter 2>

AA is the specific command code and parameter 1 and parameter 2 are additionalcharacter information needed by some commands.

Parameters are delimited by a comma ',' but can be a space or tab character.

Characters are in ASCII representation.

All commands must be terminated by a line-feed and/or carriage return.

Multiple line-feeds or carriage returns are ignored.

Alpha characters can be upper or lower case.

Unless otherwise specified:

b: 1 <= bit <= 8 bit specifierd: an integer number data specifierf: a floating point number data specifierm: A <= m <= H motor specifiers: 0 <= s <= 1 state specifier, 1 = ON or CLOSEDx: x, y, z, a or t xyz mode axis specifier

Commands preceded by an asterisk (*) are available while the controller is underteach pendant mode.

For more detailed information refer to the chapter on The Host Command Set.

System Commands

Page97 / 114

Page 103: Prog Manual Robo

*SA Read motor status.*SC Read system configuration.

Bit 7: 1 = host mode 0 = pendant modeBit 6: 1 = pendant enabled 0 =pendant disabledBit 5: 1 = generic controller 0 = robot controllerBit 4: 1 = SCARA mode 0 = XR-3 modeBit 3: 1 = gripper disabled 0 =gripper enabledBit 2: 1 = xyz coordinate 0 = joint coordinateBits 1 and 0 are always 0.

SD,d Stop/start delay timer. 0 <= d <=3000.*SE Read host error stack.*SM,m Read motor mode.

0 = Idle mode1 = Trapezoidal mode2 = Velocity mode3 = Open loop mode

*SP Read teach pendant error byte.SR Reset motor current limit circuitry.

*SS Read system status.Bit 7: 1 = At least one motor is busy.Bit 6: 1 = A system error has occurred.Bit 5: 1 = The delay timer is active.Bit 4: 1 = Wait on input/switch still pending.Bit 3: 1 = No teach pendant is connected.Bit 2: 1 = The ENTER key has been pressed.Bit 1: 1 = The ESCAPE key has been pressed.Bit 0: 1 A teach pendant error has occurred.

ST Execute diagnostics.*SU Read usage time.*SV Read version and l.D. number.

SX Execute diagnostics and return results.*SZ Read the delay timer.

Configuration Commands

Page98 / 114

Page 104: Prog Manual Robo

CC,d Set coordinate position. 0 for joint or 1 for xyz.CG,s Enable (1) gripper mode (0) disable.CM,m,d Set motor mode.

0 = Idle mode1 = Trapezoidal mode2 = Velocity mode3 = Open loop mode

CR,d Set robot type.0 = XR-3 robot mode.1 = SCARA robot mode.2 = GENERIC controller mode.

Motor Read Commands

*AR Read system acceleration.*DR,m Read motor pwm level and direction.*GS Read gripper status.*HR,m Read soft home position.*PA,m Read actual position.*PW,m Read destination position.*PZ,x Read xyz destination position.*RL Read limit switches.*UA Read xyz rotation angle.*UH,x Read xyz home position.*UO,x Read xyz offset.*UT Read xyz tool length.*UY Read xyz height of the elbow rotation axis (HO).*VA, m Read motor actual velocity.*VR,m Read motor desired velocity.*VX Read system velocity.*XR,m Read auxiliary port level and direction. (1 <= d <=2).

Page99 / 114

Page 105: Prog Manual Robo

Motor Set Commands

AC, m Clear motor actual position.AS,d Set system acceleration.DS,m,d Set motor pwm level and direction.GC Close gripper.GO Open gripper.HA Go to the hard home position.HG Go to the soft home position.HH Execute a hard home.HL,m Hard home on limit switch.HS Set soft home.MA Stop all motors and auxiliary ports.MC Start all motors1 coordinated.Ml Start all motors, independent.MM,m Stop single motor.MS,m Start single motor.MX Start xyz move.PD,m,d Set motor destination position, absolute.PR,m,d Set motor destination position, relativePX,x,f Set axis destination position, absolute.PY,x,f Set axis destination position, relative.VG,d Set system velocity.VS,m,d Set motor velocity.XA,f Set xyz rotation angle.XH,x,f Set xyz home position.XO,x,f Set xyz offset.XS,m,d Set auxiliary port level and direction. (1 <= m <=2).XT,f Set xyz tool length.XY,f Set xyz height of the elbow rotation axis (HO).

Page100 / 114

Page 106: Prog Manual Robo

Teach Pendant Commands

*FR Receive teach pendant file from host.*FT Transmit teach pendant file to host.*FX Execute teach pendant program.*TA Abort/terminate teach pendant program

TC Clear teach pendant display.TD,'msg' Print to teach pendant display.TE,d Enable (1) disable (0) teach pendant to move motors.

*TH Give control to host.*TK Return to host the next key code.*TL Return to host the last key code.

TR Reset the teach pendant.TS,r,c Set teach pendant display cursor.TT Execute teach pendant diagnostics and return results.

*TX Give control to teach pendant.

Gain Commands

*KA,m,d Set proportional gain.*KB,m,d Set differential gain.*KC,m,d Set integral gain.*RA,m Read proportional gain.*RB,m Read differential gain.*RC,m Read integral gain.*KR Restore user gains from EEPROM.*KS Store user gains to EEPROM.*KX Restore factory gains.

Page101 / 114

Page 107: Prog Manual Robo

Input and Output Commands

*IB,b Read input or switch bit.*IP Read input port*IX Read switch port.

OB,b,s Set output bit.OP,d Set output port.

*OR Read output port.OT,b,s Toggle output bit.WA Abort all wait on inputs and switches.WI,b,s Wait on input or switch bit.

Page102 / 114

Page 108: Prog Manual Robo

Appendix B

The Motor Ports

Each motor port has the following pin designations:

1: TTL logic ground.2: Encoder channel A.3: TTL +5 volt source4: Encoder channel B.5: Chassis ground. (Not connected to logic ground or motor ground.)6: Limit switch (active low).7: Motor power, positive terminal.8: Motor power, positive terminal.9: Motor power, negative terminal.10: Motor power, negative terminal.

The motor power terminals provide approximately 20 volts and are rated for 5 to 6amps continuously. If the rating is exceeded the current limit circuitry will activateand shut down the amplifier. The current limit circuitry is designed to protect againstshorting of the motor terminals. The current limit is set above motor stall current toprevent firing from normal operation.

Page103 / 114

Page 109: Prog Manual Robo

The incremental encoder outputs two square wave TTL level signals that are 90degrees out of phase which each other providing a quadrature waveform. It is thecontrollers responsibility to scan the encoder and update the internal position registers.In order for position informatior not to be lost the encoder channel frequency must notexceed 1600 Hz A motor with a 24 state or 6 slot encoder must not exceed 4000 rpm.

The limit switch input is internally pulled high using a resistor tied to the +5 volt rail.When the switch closes or becomes active this signal is pulled low.

Page104 / 114

Page 110: Prog Manual Robo

Appendix C

ED-MK4 Block Diagram

The Mark IV controller circuitry can be broken up into 4 major function blocks:

The Computer BlackThe Motor Control BlockThe Communication BlockThe I/O Block

Page105 / 114

Page 111: Prog Manual Robo

The Computer Block is the heart of the machine and is composed of an 80185microprocessor with RAM (random access memory), EPROM (ultra-violet lighterasable programmable read only memory) and EEPROM (electrically erasableprogrammable read only memory) comprising the memory secton.

The EPROM contains the executable program that the ED-MK4 operates under. TheEEPROM contains storage for certain dynamic variables whose value needs to beretained when power is turned off. These variables include gains, usage time, theserial number and possibly a teach pendant program. The RAM is used for dynamicvariables during program execution.

The program stored in EPROM consists of two shells plus many support functions.One of the shells is the host operating system and the other shell is the teach pendantoperating system. The host operating system simply executes kernel commandsreceived by a host computer. The proper sequencing of kernel commands is theresponsibility of the application program running under the host computer. The teachpendant operating system is such an application program but runs within the ED-MK4itself. In many respects you can consider the teach pendant operating system to be ahost computer controlling the ED-MK4. It ensures the proper sequence of commandsare met through the teach pendant and issues the appropriate kernel commands to thehost execution program.

Page106 / 114

Page 112: Prog Manual Robo

In the background is another program that runs on a timed interrupt basis. Itsresponsibility is to ensure the proper operation of the motors. That is, it carries out theproper execution of motor move commands which includes executing the PID loopwherein it calculates the motor power level to be output. In addition, it performsvarious polling functions such as updating input flags, setting outputs, updating theusage time and checking for system errors such as stalls or current limits.

The Motor Control Block consists of an 5751 microcontroller and ten motoramplifiers, eight of which include incremental encoder ports. The 8751microcontroller is a small computer running its own program that is stored on the chipitself. The program is designed to continually scan the encoder ponts and update itsinternal position registers. These position registers are read by the 80188microprocessor on a timed basis. The 8751 also generates the PWM and directionsignals needed by the amplifiers. The PWM and direction values are received by the8751 from the 80188 also on a timed basis. In fact, it is the 5751 which provides thetiming sional to the 80185 for polling purposes.

Each of the amplifiers are fully optically isolated from the rest of the system to ensuremotor noise does not enter the system and degrade performance. The isolators alsoserve to protect the system from damage in the event an amplifier and/or motor sufferscatastrophic failure. To ensure such a catastrophe does not occur, each amplifier isequipped with current limit circuitry designed to shut down all amplifiers should anyone amplifier attempt to exceed its current capability.

The Communication Block consists of two 8251 UARTs plus line drivers andreceivers to provide RS-232C signal level compatibility. One UART is used tocommunicate with a host computer and the other UART communicates with the teachpendant.

The I/O Block occupies a separate board which is mounted directly behind the frontpanel of the ED-MK4. This block appears as a set of registers or memory locations tothe 80188. All inputs and outputs are optically isolated and current limited to providenoise immunity and protection to the main system.

Page107 / 114

Page 113: Prog Manual Robo

Page108 / 114

Page 114: Prog Manual Robo

Appendix D

CARTESIAN COORDINATE SYSTEM SUPPORT

The ED-MK4 Controller suppons the programming of location points in the Cartesiancoordinate system. Five coordinates are used in defining a coordinate: the X, Y and Zpositions given as linear distances in millimeters and axes A and T which are angulardisplacements given in degrees. The A axis is the attitude of the hand, correspondingto the wrist flex motor (C motor) on the XR-3. Note that the SCARA does not have awrist flex axis, therefore this coordinate is ignored when in the SCARA mode. The Taxis is the rotation coordinate, corresponding to the wrist rotate motor (B motor).

The operating system maintains two coordinate systems, one tied to the robotmechanism and one which the user operates in. See Figure I-1. in most applicationsthese two coordinate systems overlap completely and have identical values for alllocations. However if the user offsets his coordinate system from the robot bothlinearly and by rotation, the ED-MK4 first translates the user coordinates into robotcoordinates and then issues appropriate motor commands to the robot to move the tooltip to the specified location.

The XR-3 robot coordinate system is aligned as shown in Figure 1-2 and the SCARAas show in Figure 1-5. If you look from the rear of the robot to gripper, the positive Xaxis is to the right, the positive Y axis is straight forward and the positive Z axis isstraight up. The origin of the robot coordinate system is located at the waist rotationaxis on the surface on which the robot rests. Since the robot can be used with orwithout the aluminum base, the Z values of the home position is variable and can beset using the appropriate host kernel commands. Notice that for the XR-3 robot boththe height of the Tool tip and height of the shoulder pivot point must be accuratelystated if correct operation is to result. The ED-MK4 comes from the factory with thehome positions already set for the normal set up of the robot on an aluminum base andusing the standard gripper.

Page109 / 114

Page 115: Prog Manual Robo

When a Cartesian location point is specified, the ED-MK4 performs the necessarytransformations which convert the coordinates into joint angles and ultimately intoencoder counts. During the transformation process, all the joint angles are checked tosee if they lie within the mechanical limits of the robot; if they do not, an error isgenerated and the move instruction is ignored. These limits exist as an outer limit andan inner limit forming a band around the waist rotation axis. The checks made forvalid locations are made in the robot coordinate system after the user coordinatesystem to robot coordinate system translation is complete; therefore a user Cartesianpoint with some value may be valid with a given set of coordinate system offsets butmay be invalid with the same values giver a different set of offsets.

The ED-MK4 is shipped from the factory configured for the dimensions of thestandard XR-3 and SCARA robots. Both are assumed to be mounted on the aluminumbase with the rubber feet attached. If the robot installation is different from this1 theuser will be required to measure the robot from the users reference surface andconfigure the ED-MK4 accordingly.

Configuration is accomplished through the appropriate host kernel commands, XA,XH, XO, XT, and XY. The host kernel commands UA, UH, UO, UT, and UY allowreading the current settings. The following table shows the parameters available andtre factory set defaults.

XR-3 Parameters SCARA Parametersx-Axis Home Position 0.00 0.00y-Axis Home Position 99.22 457.20z-Axis Home Position 321.47 64.00a-Axis Home Position 0.00 0.00t-Axis Home Position 0.00 0.00x-Axis Offset 0.00 0.00y-Axis Offset 0.00 0.00z-Axis Offset 0.00 0.00a-Axis Offset 0.00 0.00t-Axis Offset 0.00 0.00Rotation Angle 0.00 0.00HO 287.73 0.00Tool Length 169.86 0.00

Units are in millimeters or degrees.

Page110 / 114

Page 116: Prog Manual Robo

The Home position is the linear distance between the robot coordinate system originand the center of the tool tip (gripper). All dimensions are therefore in the robot'scoordinate system. The parameter HO is the height of the elbow rotation axis abovethe reference surface; this parameter is needed only for the XR-3 and not the SCARArobot. The Tool Length parameter is measured from the hand flex axis to the tool tip(gripper end).

Page111 / 114

Page 117: Prog Manual Robo

Page112 / 114

Page 118: Prog Manual Robo

Page113 / 114

Page 119: Prog Manual Robo

Page114 / 114