




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Programação Manual de Robôs
Tipologia: Manuais, Projetos, Pesquisas
1 / 119
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































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 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.
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, an MC command 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 the MC command you must use the SA command to determine if the affected motors are busy. For setting acceleration or system velocity you would use the SS command described below.
This command can be used while under teach pendant mode.
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 the teach pendant.
Bit 3 is controlled by the CG command 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.
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 the SD command is sent the timer is reset to the new value.
This command can not be used while under teach pendant mode.
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.
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 a TX command to give control to the pendant followed by the TH command 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.
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 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.
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 using ST to determine if a error was generated. If an error is detected the SE command would be issu to read and clear the error(s).
See also the SX command.
This command can not be used while under teach pendant mode.
Returns the version of the controller and its (unique) serial or identification number.
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:
The version number is 1.00 and the serial number is 3009.
This command can be used while under teach pendant mode.
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.