ROBOT TRAINER
WITH ED-MK4
COMMAND SET MANUAL
ED-7220C
CHAPTER I : THE HOST COMMAND SET
Introduction ... 1
System 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 Commands AR 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
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 Commands FR 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
Gain Commands
KA Set Proportional Gain ... 75
KS Set Differential Gain ... 75
KC Set lntegral Gain ... 75
RA Read Proportonal Gain ... 76
RE Read Differential Gain ... 76
RO Read Integral Gain ... 76
KR Restore User Gains from EEPROM ... 77
KS Store User Gains to EEPROM ... 77
KX Restore Factory Gains ... 78
Input/Output Commands IB Read Input or Switch ... 79
IP Read Input Port ... 80
IX Read Switch Port ... 81
OB Set Output Bit ... 82
OP Set Output Port ... 83
OR Read Output Port ... 84
OT Toggle Output Bit ... 85
WA Abort All Wait on Inputs and Switches ... 86
WI Wait on Input or Switch ... 87
CHAPTER 2 : TEACH PENDANT PROGRAM EXAMPLES Introduction ... 89
Setup ... 89
Jump ... 93
Creating Moves ... 96
APPENDIX A: THE HOST COMMAND SET ... 97
System Commands ... 98
Configuration Commands ... 99
Motor Read Commands ... 99
Motor Set Commands ... 100
Teach Pendant Commands ... 101
Gain Commands ... 101
Input and Output Commands ... 102
APPENDIX B: THE MOTOR PORTS ... 103
APPENDIX C: ED-MK4 BLOCK DIAGRAM ... 105
Chapter 1
The Host Command Set
The host command set provides maximum control and flexibirity over the ED-MK4 controller The command set can be broken up into seven major groupings:
1: System Status Commands 2: Configuration Commands 3: Motor Read Commands 4: Motor Set Commands
5: Teach Pendant Control Commands 6: Gain Commands
7: Input and Output Commands
System Status commands provide information concerning system and motor
configurations, error detection and control, version information, diagnostics, usage time 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 various motor 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 the pendant display, to read keypad input, to transfer or control teach pendant files and to provide an easy means for teaching points.
Gain commands are used to stabilize the motor control loop and to retrieve or store control loop parameters.
Input and Output commands provides the interface to control outputs and read inputs or switches.
All commands are of the form:
AA<,parameter 1><,pararneter 2>
AAis usually a two character code and parameter 1 and parameter 2 are additional character information needed by some commands.
For example, PD,C,-5OOO sets the destination position of motor C to -5000 encoder counts.
All commards must be terminated by a line-feed and/or cartage return. Multiple line-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 are terminated by a carrage return and line-feed.
Many of the commards can be used while the system is under the control of the teach pendant This allows you to run a host application program of your design to test analyze 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 and terminate 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.
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 the ED-MK4 controller. Each bit within the status byte corresponds to one motor. Bit 0 corresponds to motor port A. If the bit is set (1) the corresponding motor is still
executing a trapezoidal move. If the bit is cleared (0) the corresponding motor is either stationary or in a mode other than trapezoidal.
SA returns the decimal representation of the motor status byte and ranges in value from 0 to 255. The value returned must be decoded to determine the state of each motor. Decoding is accomplished by taking the hex representation of the value received 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) are still executing a trapezoidal move.
Position and motor velocity commands can not be issued to motors in trapezoidal mode if they are still executing a trapezoidal move. The command to set acceleration or 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 move
command is still executing a trapezoidal move.
For example, anMCcommand for an XR-3 robot move affects motors B thru F. MC can 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 theMCcommand you must use the SAcommand to
determine if the affected motors are busy. For setting acceleration or system velocity you would use theSScommand described below.
This command can be used while under teach pendant mode.
Read System Configuration
SC
Returns the system configuration byte representing eight system mode selects. Format: SCThe 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 system conditions. Decoding is accomplished by taking the hex representation of the value received and testing each bit individually.
Bit 7: 1 = system is in host mode 0 = system is in pendant mode Bit 6: 1 = the pendant is enabled 0 = the pendant is disabled * Bit 5: 1 = generic controller mode 0 = robot controller mode
Bit 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 mode
Bit 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 when teaching points by allowing the pendant to move motors. The host can then disable the pendant, read the motor positions and store them as a record to be replayed 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 is normally controlled by port A. In some applicatons the gripper may either not be used or implemented by some other mechanism such as a solenoid controlled by an output. In those cases it may be desirable to use port A as a general purpose motor port similar to ports G and H. Setting bit 3 = 1 will allow port A to act in the same manner as ports G and H. If the system is configured as a generic controller (bit 5 = 1) then bit 3 will equal 1. Note that all gripper commands become invalid if the gripper is disabled.
Bit 7 is controlled by theTHandTXcommands in addition to the CONFIG key on the teach pendant.
Bit 6 is controlled by theTEcommand.
Bits 5 and 4 are controlled by theCRcommand in addition to the CONFIG key on the teach pendant.
Bit 3 is controlled by theCGcommand in addition to the CONFIG key on the teach pendant.
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 host computer, the new configuration is not saved to EEPROM.
This command can be used while under teach pendant mode.
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 timer begins counting down to zero at a rate of 1 count per 0.1 second. Hence, sending a value 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) the timer 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 theSDcommand is sent the timer is reset to the new value.
This command can not be used while under teach pendant mode.
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 the controller for holding error codes. If a system error should occur, the code
representing 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.SEreturns zero if the error stack is empty.
The appendix provides a list of error codes and their meanings.
Note: Reading a current limit error does not reset the current limit circuitry. This allows you to remove the condition that caused the current limit before continuing. To reset the current limit circuitry, theSRcommand must be issued.
This command can be used while under teach pendant mode.
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 table lists 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.
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 is set (1), an error exists and the pendant error byte should be read to determine the source of the error. SP returns zero if no pendant error exists.
The host computer cannot directly clear the pendant error byte. If the teach pendant has control of the system the error will be annunciated on the display and the error byte cleared. Therefore, if it is desirable that the host computer be able to clear the pendant error byte, it must send aTXcommand to give control to the pendant followed by theTHcommand to take control back.
The appendix provides a list of error codes and their meanings. This command can be used while under teach pendant mode.
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 the SR command!
If the SR command is issued while a current limit condition still exists the current limit circuitry will trip again.
This command can not be used while under teach pendant mode.
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 system conditions. Decoding is accomplished by taking the hex representation of the value received 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 anSAcommand allows determining which motor(s) is still executing a trapezoidal move.
** Issuing anSEcommand returns the error code. *** Automatically cleared when SSis issued.
**** Issuing anSPcommand returns the error code but does not clear the error. This command can be used while under teach pendant mode.
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 code will be pushed onto the error stack.
Note: This command may take a moment to complete.
Normally an SS command would be issued after usingSTto determine if a error was generated. If an error is detected theSEcommand would be issu to read and clear the error(s).
See also theSXcommand.
This command can not be used while under teach pendant mode.
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.
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 firmware being 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.
Execute Diagnostics and Return Results
sx
Execute 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 error code 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. The number 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.
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.
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 values corresponding to the current xyz position. Normally this is already the case. A value of d = 1 causes the xyz destination registers to be set to the values corresponding to the current encoder position.
No motor may be executing a trapezoidal move, a hard home must have been
previously executed and the system must be configured for either an XR-3 or SCARA robot arm.
This command is used when mixing joint and xyz moves. CC,0 is issued when changing 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 you are at some xyz position. AnMIorMCmove is issued changing the x,y and z position. Then the x and y position is set for a new location and the MX command issued. Since the z axis position has not been reset the robot will go to the wrong location. Issuing the CC,1 command before theMXwill set the z axis position corresponding to the new z position.
This command can not be used while under teach pendant mode.
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, the gripper will close then open.
The robot type must be XR-3 or SCARA,the gripper motor (motor port A) must be in trapezoidal mode and no motor in trapezoidal mode may be busy.
Setting the robot type to XR-3 or SCARA using the CR command will automatically enable the gripper and it will close then open. Setting the robot type to GENERIC will automatically disable the gripper.
This command can not be used while under teach pendant mode.
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 in the 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 stop immediately.
If motor port A was not in trapezoidal mode and is changed to trapezoidal mode, you must 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
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) SCARAcontroller. 2) GENERICcontroller.
No motor may be busy executing a trapezoidal move. Nor can the robot type be changed if a hard home is in progress or if the gripper is being initialized. This can be checked by issuing theSScommand.
All motor ports will be set to trapezoidal mode.
If the robot type is specified as XR-3or SCARAthe gripper will be enabled and will close and then open. If the robot type is specified asGENERICthe gripper will be disabled.
This command can not be used while under teach pendant mode.
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 of maximum system acceleration.
This command can be used while under teach pendant mode.
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 the percentage of maximum motor power and whose sign represents the direction the motor is turning in.
This command can be used while under teach pendant mode.
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 used while under teach pendant mode.
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 the position 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 anHS(set soft home) is issued. This command can be used while under teach pendant mode.
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 command can be used while under teach pendant mode.
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 the position the specified motor would move to when an MC (move coordinated), MI
(move independent) or anMS(move single motor) command is issued. This command can be used while under teach pendant mode.
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 would move to when anMX(move xyz) command is issued. The X, Y and Z axes are in units of millimeters and the A and T axes are in units of degrees. The value returned is fixed at two decimal places (two digits after the decimal point).
This command can be used while under teach pendant mode.
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 system conditions. Decoding is accomplished by taking the hex representation of the value received and testing each bit individually. The limit switch associated with motor port A 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 others are closed.
This command can be used whi!e under teach pendant mode.
Read XYZ Rotation Angle
UA
Returns the angle of rotation of the users coordinate system with respect to the robot coordinate system.
Format: UA
The value returned is a floating point number in units of degrees. See alsoXAfor 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.
Read XYZ Home Position
UF
Returns the linear distance between the robot coordinate system origin and the center of 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 and Z 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.
Read XYZ Offset
UO
Returns the linear or angular displacement between the user coordinate system and the robot 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, and Z axes and units of degrees for the A and T axes
The A axis does not exist on the SCARA robot. See alsoXOfor 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
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 alsoXTfor 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.
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 alsoXYfor 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.
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 the percentage of maximum motor velocity and whose sign represents the direction the motor is turning in.
This command can be used while under teach pendant mode.
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 the percentage of maximum motor velocity and whose sign represents the desired
direction the motor. For trapezoidal mode motors the direction has no meaning being a function of desired position.
Whenever the gripper is enabled or commanded to open or close, a factory set velocity will 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 was programmed 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 motor velocity will return to its original value.
Read System Velocity
VX
Returns the system velocity Format: VX
The value returned ranges from 0 to 100 and represents the percentage of maximum system velocity.
This command can be used while under teach pendant mode.
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 the percentage of maximum motor power and whose sign represents the direction the motor is turning in.
This command can be used while under teach pendant mode.
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 executing trapezoidal move. This can be checked by issuing the SAcommand.
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 not available. Especially useful under generic controller mode when limit switches are not being used.
This command can not be used while under teach pendant mode.
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 system
acceleration is 0, motors in trapezoidal mode will not be able to move and motors in velocity mode will be stopped.
Motors in trapezoidal mode must not be currently executing a trapezoidal move. This can be checked by issuing theSScommand.
Motors in velocity mode will immediately begin using the new acceleration value. Example: AS,50 System acceleration is set to 50% of maximum system
acceleration.
This command can not be used while under teach pendant mode.
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 anSM
command. 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.
Close Gripper
GC
Open Gripper
GO
Controls the gripper position. Format: GC
GO
The system must be in XR-3 or SCARA mode with the gripper enabled. The gripper must not be currently executing a move. This can be checked by issuing the SA command.
When the gripper is commanded to close, the motor moves to a position beyond which the gripper can travel. This means that when the gripper closes on an object, full motor power is applied. Stall detection on closing is disabled. Stall will be detected if the gripper is commanded to open and can not. Velocity is at a factory set value and can not be modified.
The gripper is controlled by motor port A. Consequently motor port A's absolute destination and velocity registers are modified.
This command can not be used while under teach pendant mode.
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 coordinated fashion. 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 coordinated fashion. 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 move according to their set motor velocities. The busy status of all motors in trapezoidal mode 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
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 coordinated fashion. The busy status of motors B thru F should be checked with theSAcommand. If the controller is under SCARA mode, motors B thru E will move in a coordinated fashion. The busy status of motors B thru E should be checked with theSAcommand. If the controller is under generic mode all motors under trapezoidal mode move
according to their set motor velocities. The busy status of all motors in trapezoidal mode should be checked with theSAor 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.
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 trapezoidal move. 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 limit switch 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 limit switch 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 will open.
If the controller is under GENERIC mode, all motors under trapezoidal mode wil have their 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 of switch closure and calculating the center of the switch. The switch is always
approached from the same direction for purposes of counting the encoder states as the switch 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.
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. When
d 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. The parameter d is provided for those systems where the limit switch is at an end of travel and 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 a trapezoidal 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 command does not handle. For example, motors G and H when the controller is under XR-3 mode or motors A thru H when the controller is under generic mode. This command is invalid 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 of switch closure and calculating the center of the switch. The switch is always
approached from the same direction for purposes of counting the encoder states as the switch is traveled across.
This command can not be used while under teach pendant mode.
Set Soft Home
HS
Store the current motor position of all motors into their respective soft home position register.
Format: HS
After power up all joint coordinate soft home registers are set to 0. XYZ coordinate soft home registers are unknown.
After a successful hard home all affected motors have their joint coordinate soft home registers set to 0 and the XYZ coordinate soft home registers are set according to the robot selected.
Although valid at all times motors in trapezoidal mode should not be currently executing a trapezoidal move. This can be checked by issuing the SA command. This command can not be used while under teach pendant mode.
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.
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 their current position are affected. Affected motors must have a non-zero motor velocity. Motors whose relative destination registers are non-zero will make a relative
movement while all other motors will make an absolute movement. The relative destination 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 F must 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 F must 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 be executing a trapezoidal move. This can be checked by using either the SA or SS command.
This command can not be used while under teach pendant mode.
Start All Motors, Immediate Mode
MI
Motors in trapezoidal mode move to their destination positions under their respective motor velocities.
Format: MI
Only motors under trapezoidal mode with a destination position different from their current position are affected. Affected motors must have a non-zero motor velocity Motors whose relative destination registers are non-zero will make a relative movement while all other motors will make an absolute movement. The relative destination 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 time depending 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 F must 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 E must 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 be executing a trapezoidal move. This can be checked by using either the SA or SS command.
This command can not be used while under teach pendant mode.
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.
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 relative
destination register is non-zero a relative move will be made. If the relative destination register is zero and the destination register is the same as the current position then no movement will take place.
The specified motor must not be currently executing a trapezoidal move. This can be checked 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.
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 have a non-zero desired motor velocity.
If the SCARA is used motors B thru E must be configured for trapezoidal mode and have 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 trapezoidal move and can be checked using the SA command.
If the controller is under SCARA mode motors B thru E must not be executing a trapezoidal move and can be checked using the SA command.
If, on issuance of the MX command, the desired position is in bounds the robot will move to the new position in a coordinated fashion. Any axis whose relative xyz destination position is non-zero will make a relative movement and the relative destination register will become zero.
This command can not be used while under teach pendant mode.
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 a trapezoidal 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 0 position.
If the relative destination register is non-zero, then on issuance of a move command the destination register will be overwritten.
This command can not be used while under teach pendant mode.
Set Destination Position, Relative
PR
Sets the relative movement a motor in trapezoidal mode will travel. Motor desired position becomes the old desired position plus the relative movement.
Format: PR,m,d
m = A1B, C, D, E, F, G or H.
-32767 <= d <=32767.
If the specified motor is in trapezoidal mode, it must not be currently executing a trapezoidal move. This can be checked by issuing the SA command.
Position wrap-around may occur.
Example: Assuming motor C is not executing a trapezoidal move and is at encoder position 30,000.
PR,C,-2000 When commanded to move, motor C will move 2,000 encoder counts in the negative direction to encoder position 28,000.
Assuming motor C is not executing a trapezoidal move and is at encoder position 30,000.
PR,C,10000 When commanded to move, motor C will move 10,000 encoder counts in the positive direction. Since 10,000 plus 30,000 exceeds the allowed position range, position wrap-around occurs and motor C will come to rest at encoder position -25,535. Wrap-around position is calculated by summing the current position and the relative movement 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.
Set XYZ Destination, Absolute
PX
Sets the desired position an X, Y or Z axis will move to in millimeters or the angle the A 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 trapezoidal move and can be checked using the SA command.
If the controller is under SCARA mode motors B thru E must not be executing a trapezoidal move and can be checked using the SA command.
Example: Assuming XR-3 and motors B thru F are not executing a trapezoidal move.
PX,X,150.00 Axis X's destination position becomes 150.00 in millimeters.
PX,A,45.00 Axis A's destination position becomes 45.00 degrees.
If the relative destination register is non-zero, then on issuance of a move command the destination register will be overwritten.
This command can not be used while under teach pendant mode.
Set XYZ Destination, Relative
PY
Sets the relative movement an X, Y or Z axis will move in millimeters or the angle the A 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 trapezoidal move ard can be checked using the SA command.
If the controller is under SCARA mode motors B thru E must not be executing a trapezoidal move and can be checked using the SA command.
Example: Assuming XR-3 and motors B thru F are not executing a trapezoidal move.
PY,X,150.00 Axis X’s destination position increases by 150.00 millimeters.
PY,A,45.00 Axis A’s destination position increases by 45.00 degrees.
After issuance of a move command the relative destination register will become zero. This command can not be used while under teach pendant mode.
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 all motors will be stopped.
Individual motor velocities are expressed as a percentage of system velocity using the VS command. Thus, if a motors maximum available velocity is 100 encoder counts per second and motor velocity is at 50% then setting system velocity to 80% will result 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 This can be checked by issuing the SS command. The gripper can not be in the process of closing or opening.
Motors in velocity mode will immediately begin tracking their new velocities.
Example: Assuming motors A and C are in trapezoidal mode and stationary, and motors D and E are in velocity mode with their respective motor velocities set at 40% and 50%. All other motors are in idle mode.
VS,60 Motor D begins moving at .40 * .60 * motor D's maximum velocity and motor E begins moving at.50 * .60. motor F's maximum velocity.
This command can not be used while in teach pendant mode.
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 a trapezoidal move. This can be checked by issuing the SAcommand. The sign or direction of velocity has no meaning under trapezoidal mode.
If the specified motor is in velocity mode the motor will immediately begin tracking the new velocity. A minus sign indicates negative movement.
If the specified motor is in idle or open loop mode, the motor desired velocity will be set but no motion will take place.
If system velocity is 0 no motor movement will take place.
Example: Assuming trapezoidal mode, system velocity is 80% and the specified motor is not busy.
VS,D,-50 Motor velocity is set to 40% of maximum motor velocity.
No motion takes place.
Assuming velocity mode and system velocity is 80%.
VS,D,-50 Motor accelerates to 40% of maximum motor velocity in the negative direction. Whenever the gripper is enabled or commanded to open or close, a factory set velocity will be used for the gripper. The programmed motor velocity will have no meaning. This command can not be used while in teach pendant mode.
Set XYZ Rotation Angle
XA
Sets the angle of rotation of the users coordinate system with respect to the robot coordinate 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.
Set XYZ Home Position
XH
Sets the linear distance between the robot coordinate system origin and the center of the 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.
Set XYZ Offset
XO
Sets the linear or angular displacement between the user coordinate system and the robot 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.
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 motor power. 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.
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.
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.
Receive Teach Pendant File from Host
FR
Transmit Teach Pendant File to Host
FT
Format: FR
Format: FT
Refer to the chapter TheUtility Disk fora complete discussion on file transfer.
Execute Teach Pendant Program
FX
Abort/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 FX command is the same as pressing the RUN/HALT key on the pendant. The pendant will display any appropriate error messages such as NO PROGRAM or NO_HARD which means a hard home is required. The host computer can not halt or suspend the program. Issuing a second FX while a program is executing will result in an error since the pendant is no longer in play mode.
Format: TA
Once a program is executing, it can be terminated by issuing the TA command.
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.
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 punctuation mark 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 the
message 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 issued in 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.
Enable/Disable Teach Pendant to
TE
Move Motors
Under 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 over moving the motors. After the host computer detects an ENTER or ESCAPE key, the host 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 take temporary control.
Refer to the chapter Using the Teach Pendant under the section Teaching Points for a complete discussion on how to use this feature.
This command can not be used while under teach pendant mode.
Give Control to Host Give
TH
Control to Teach Pendant
TX
Toggles 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 be in the PLAY mode. There is no effect if the ED-MK4 is already under host control or if 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.
Return to Host the Next Key Code
TK
Return 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.
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 is cleared and the cursor is set to the home position (row 1, column 1). The pendant will respond 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.
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 to place 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 of the 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 computer The 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.
Execute Teach Pendant Diagnostics and
TT
Return 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 E or 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.
Set Proportional Gain
KA
Set Differential Gain
KB
Set Integral Gain
KC
Set the proportional, differential or integral gain multiplier for the specified motor for the current robot type.
Format: KA,m,d KB,m,d KC,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 alsoKS(store user gains) and
KR(reset user gains).
This command can be used while under teach pendant mode.
Read Proportional Gain
RA
Read Differential Gain
RB
Read Integral Gain
RC
Return the proportional, differential or integral gain multiplier for the specified motor for the current robot type.
Format: RA,m RB,m RC,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) and
KR (reset user gains).
This command can be used while under teach pendant mode.
Restore User Gains from EEPROM
KR
Store User Gains to EEPROM
KS
KR resets the gains previously stored by the user from EEPROM for all motors for the
current 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 or shutting the system down.
These commands can be used while under teach pendant mode.
Restore Factory Gains
KX
Resets the gains stored by the factory for all motors for the current robot type. Format: KXThe desired robot type should be set before issuing aKXcommand. This command can be used while under teach pendant mode.
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 16 addresses 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 value
1 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.
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 is accomplished by taking the hex representation of the value received and testing each bit 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, 3 and 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.
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 255 The 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 and testing 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 or open.
This command can be used while under teach pendant mode.
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.