You are on page 1of 37

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
( Option )
ROBOT DIVISION

HOST COMMUNICATION ()

KAWASAKI HEAVY INDUSTRIES, LTD.

90210-1080DEA

Series

LY

KAWASAKI ROBOT CONTROLLER

Preface
This manual is subject to change without notice and without our legal responsibility. Kawasaki pursues a policy of continuing improvement in design and specification of the product. The right is therefore, reserved to vary this manual without prior notice.

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
All rights reserved. Copyright 1999. by KAWASAKI HEAVY INDUSTRIES, LTD.

This manual is copyrighted and all rights are reserved by KHI. This manual may not, in whole or part, be reproduced in any from or by any means without prior written permission from KHI. The manual is prepared with the best care but anyway it is impossible to exclude any misinterpretation by the user or any spelling mistakes. In case of doubts or if the robot behavior is different from that reported in this manual please would you get in touch with the nearest Kawasaki or Kawasakis agent.

KHI cannot anticipate every possible circumstance that might involve a potential hazard. If a procedure, work method or operating technique not specifically recommended by KHI is used, you must satisfy yourself that it is safe for you and others. In this case you are completely responsible for eventual damages on human bodies or things. If you discover physical defects in the manual, KHI will replace the manual at no charge during 90 days period after you purchased the robot. If you do not observe warnings and/or cautions to be take in the manual as described below, it might result in the serious injuries or damages on human bodies or robots. Therefore you must take extreme care to observe these warnings and cautions.

N
1

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

[SAFETY NOTICE]

Whenever you see the symbols shown below in this manual or on the machine, read and understand their messages.

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
DANGER
This danger symbol identifies special warnings or procedures which, if not strictly observed, will result in serious injury or death.

WARNING

This warning symbol identifies special warnings or procedures which, if not strictly observed, could result in serious injury or death.

CAUTION

This caution symbol identifies special instructions or procedures which, if not correctly followed, may result in injury.

[ N O T E]

This note symbol identifies supplementary information, or to emphasize a point or procedure, or to give a tip for easier operation.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Introduction
This manual is an OPERATION MANUAL described for the HOST COMMUNICATION (I) Function of KAWASAKI Robot Controller C-Series in details. The purpose of this OPERATION MANUAL is that customers can utilize Host Communication (I) Function effectively. This Manual describes Command, Instruction, Function and the Communication protocol, etc. used by this function. For the Robot operation methods and other AS Language, refer to: "OPERATION MANUAL" "AS LANGUAGE REFERENCE MANUAL"

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O

N
3

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

CONTENTS
1. Outline.................................................................................. 5

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
3. Communication Protocol .................................................... 23 4. Example of Program .......................................................... 25
4.1. Robot Location and the relating matters .............................. 25 4.2. I/O Signal and the relating matters ....................................... 26

2. AS Language Reference Guide ........................................... 6

5. Communications and the relating matters : Table of AS Language...................................................... 27 6. Table of Communication Error code .................................. 29

7. Cautions............................................................................. 31 8. Serial (RS232C) Interface Specification............................. 32 9. Communication Cable Connection Instruction ................... 33

10. Dip switch on Main CPU board ........................................ 34

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

1. Outline
Through the specified protocol, ASCII characters are sended / received on the serial interface line. The object of sending and receiving of AS Language is character-string variables. Thought the AS Language functions, the conversion between character-string variables and real variables is feasible. By using the above functions, etc., for example, Robots target point (location) is transmitted to the host station, and the Robots target point (location) can be changed from the host station.

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Sensor port Personal computer terminal port Connect with Personal computer terminal port. Communication cable or Controller Connect it directly with CN2 on Main CPU board in the Controller. Communication cable

System configuration

Host Computer

Host Computer

Refer to "9. Communication Cable Connection Instruction". NOTE

It is not possible to operate from Personal computer terminal at the case to have used the Personal computer terminal port by Host Communication (I).

N
5

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

2. AS Language Reference Guide


For the AS Language provided for the host communication (I).

How to refer to the AS Language Reference


Keyword Syntax

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
SEND SEND Port No.: Character variable, Status variable
Hatched arguments are optional arguments. Enter one or more spaces between the keyword and the first argument. A mark

shown everywhere in this manual is the RETURN key.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Option SETSIO SETSIO

MONITOR COMMAND PROGRAM INSTRUCTION Port No. : Baud rate, Stop bit

Option SETSIO

Parameter Port No. : This designates the communication port. The assignable port is two types as shown below: 1 or 7 : Sensor port 2 or 8 : Terminal port for Personal computer

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Baud rate This is set up baud rate. Set-able values are (1200, 2400, 4800, 9600 and 19200). Stop bit This sets up stop bit 2 or 1. Note

When Monitor command is used, the setting is enable by using the dialogue system. Parity error check function is not available. Execute the TERMOFF command previously at the case used specifying the personal computer terminal for Port No.

N
7

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function Set serial I/O specification.

MONITOR COMMAND TERMOFF TERMON TERMOFF TERMON TERMOFF TERMON

Note The TERMOFF command is executable only from the personal computer terminal. It is not key input and no Screen displaying as the terminal until the TERMON command (it makes the terminal port of the personal computer a usual terminal and it enables use) is executed when you executes the TERMOFF command. Execute the TERMON command by KEYBOARD Screen of Multi Function Panel.

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
It enters the state that the TERMON command is executed at the case when you turns ON dip switch No.8 on 1GA board and you makes it to control power ON. You can use the personal computer terminal port as a usual personal computer terminal. "10. Dip switch on Main CPU board"
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

Function TERMOFF ..............Sets as a port where uses the personal computer terminal port by Host Communication (I). TERMON ................Sets as a usual terminal that use the personal computer terminal port.

LY

MONITOR COMMAND PROGRAM INSTRUCTION PROTRESET PROTRESET Port No. : PROTRESET

Parameter Port No. : This designates the communication port. The assignable port is two types as shown below. 7 : RS232C port for sensor (At the time of omission) 8 : RS232C port for printer

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O

Note Execute the TERMOFF command previously at the case used specifying the personal computer terminal for Port No.

N
9

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function In a communication mode, (EOT) code is issued.

MONITOR COMMAND PROGRAM INSTRUCTION PROTOCOL PROTOCOL Timer1, Timer2, Timer3, Retry1, Retry2, BCC PROTOCOL

Parameter Timer1 After transmitting (ENQ) code, this sets up time-out time at no answer. [sec] Timer2 After transmitting text, this sets up retry frequency at no answer. [sec]

Note (1) When monitor command is used, setting is enable by using the dialogue system. (2) BCC : Exclusive-OR up to Text (ETX) code.

IN

TE N

10

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Timer3 After transmitting (ACK) code, this sets up time-out time at no answer. [sec] Retry1 After transmitting text, this sets up retry frequency at no answer. Retry1 After transmitting text, this sets up retry frequency when receiving (NAK) code. BCC This sets up Block check code. 0 : BCC is unavailable 1 : BCC is available < Refer to Note (2)>
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function Set time-out time and retry frequency in the communication protcol.

MONITOR COMMAND PROGRAM INSTRUCTION SEND SEND Port No, : Character variable , Status variable SEND

Parameter Port No. : This designates the communication port. The assignable port is two types as shown below: 1 or 7 : Sensor port 2 or 8 : Terminal port for Personal computer When omitting, it assume "1"(Sensor port). Character variables This designates the character variable to transmit. (Max number of character : 255 characters)

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Status variables This sets up real variable name to store SEND status. During operation >0 Normal termination =0 Abnormal termination < 0

If the status variables are not designated at abnormal termination, an error will occur, and the program is interupted.

Details 1. When SEND instruction was executed, the program does not step forward until the communication terminates. When communication take place along with the robot motion, the communication instruction should be executed by the PC program. 2. For the communication protocol, refer to the "3. Communication Protocol". Caution Execute the TERMOFF command previously at the case used specifying the personal computer terminal for Port No.

N
11

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function Outputs character-string from the serial port at the designated protocol.

MONITOR COMMAND PROGRAM INSTRUCTION RECEIVE RECEIVE Port No. : Character variables , Status variables , Timer RECEIVE

Parameter Port No. : This designates the communication port. The assignable port is two types as shown below: 1 or 7 : Sensor port 2 or 8 : Terminal port for Personal computer When omitting, it assume "1"(Sensor port). Character variables This designates the character variable to receive. (Max number of character : 255 characters)

Details 1. When RECEIVE instruction was executed, the program does not step forward until the communication terminates. When communication take place along with the robot motion, the communication instruction should be executed by the PC program. 2. Foe the communication protocol, refer to the "3. Communication Protocol".

IN

TE N

Note Execute the TERMOFF command previously at the case used specifying the personal computer terminal for Port No.

12

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Status variables This sets up real variable name to store RECEIVE status. During operation >0 Normal termination =0 Abnormal termination < 0 If the status variables are not designated at abnormal termination, an error will occur, and the program is interrupted. This designates the time of the ENQ waiting time-out. [sec] If this was defaulted, the time-out is inexecutable. Timer
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function Inputs character-string from the serial port with the designated protocol.

REAL VALUE FUNCTION VAL VAL (Character-string, Code) VAL

Parameter Character-string Character-string constant, Character-string variables or Character-string expression. Code

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
0 1 2 Decimal Binary Hexadecimal Example VAL(123 E1m Street) VAL(1.2E-5) VAL(^HFF) : Real value 123 is returned. : Real value 1.2E-5 is returned. : Real value 255 is returned.

Real value expression. It can be omitted. When the Character-string is required to convert, what decimal should be used is designated by the following numerals. (This is a case when a code which clearly designates decimal is not contained in the character-string.). In case of omission, and other than 0, 1 and 2, it was regarded that zero(0) has been designated. Descriptive method Set value

Note Character-string can be designated by the exponent expression. A code which represents the first descriptive method of the designated character-string can be included. As a code which represents one portion of numerals or descriptive method un-interpreted characters are treated as a code which shows the end of characteristic which is the object of all conversion.

N
13

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function Real values represented by the characters contained in the designated character-string are returned.

CHARACTER-STRING FUNCTION $CHR $CHR (Real value expression) $CHR

Parameter real value expression Numeric value which wants to be converted into the ASCII character is specified. The value which can be specified is a range from 0 to 255.

Details When the specified ASCII value is a range from 0 to 255, the corresponding ASCII character string of one character is returned. Examples $CHR (65) $CHR (^H61)

IN

TE N

14

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
The ASCII value returns the character "A" of 65. The ASCII value returns the character "a" of 97.
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function The ASCII character string of one character with the given ASCII value is returned.

CHARACTER-STRING FUNCTION $LEFT $LEFT (String expression, Extracted character number) $LEFT

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Parameter String expression The character string constant, the character string variable or the string expression is specified. Extracted character number The number of characters which wants to be extracted from the left of the character string is specified. When 0 or smaller value than 0 is specified, dead letter is returned. Details The character string for a few minutes of the extraction character is returned from the left of the specified character string. When the value of the number of extraction characters are larger than the length of the string expression, the entire string expression is returned. Example $LEFT ("abcdefgh", 3) The character string "abc" is returned. $LEFT("*1*2*3*4*5", 15) "*1*2*3*4*5" of the entire character string is returned.

N
15

Function The character string of specified character's worth is returned from the left of the specified character string.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

CHARACTER-STRING FUNCTION $RIGHT $RIGHT (String expression, Extracted character number) $RIGHT

Parameter

Details The character string for a few minutes of the extraction character is returned from the right of the specified character string. When the value of number of extraction characters are larger than the length of the string expression, the entire string expression is returned.

Example $RIGHT ("abcdefgh", 3)

IN

TE N

16

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
String expression The character string constant, the character string variable or the string expression is specified. Extracted character number The number of characters which wants to be extracted from the right of the character string is specified. When 0 or smaller value than 0 is specified, dead letter is returned. The character string "fgh" is returned.
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

Function The character string of specified character's worth is returned from the right of the specified character string

LY

CHARACTER-STRING FUNCTION $SPACE $SPACE (Blank character number) $SPACE

Parameter Blank character number A blank number of character is specified. 0 or positive value.

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Example TYPE "a" + $SPACE(1) + "dog" "a dog" is displayed.

N
17

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function The specified blank character for a few minutes of the character is returned.

CHARACTER-STRING FUNCTION $MID $MID $MID (String expression, Real value expression, Extracted character number)

Parameter String expression The character string variable, the character string constant or the string expression is specified. A partial character string is taken out of this character string.

Details A partial character string starts from the first character of the specified character string when the real value expression is omitted or the value of one or less. The number of extraction characters returns and this function returns dead letter when the character string for which the value of the real value expression is specified is larger than length (number of characters) at 0 or negative time. When the number of characters from the first character which omits the number of extraction characters or is specified to the character end is fewer than the values of the number of extraction characters, the character string obtained as a result becomes the one which contains the end of the specified character string. That is, the error might not be generated and be delayed to the length which the result specified as a result.

Examples Next, the shown instruction substitutes the character sting "cd" for character string variable $substring. Because, the character string of two characters which starts from the third character of the character string "abcdef" is "cd". $substring = $MID("abcdef",3,2)

IN

TE N

18

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Real value expression Real value expression which can be omitted. Characters in the character string how many whether is assumed to be the first character of a partial character string is specified. Extracted character number Real value expression which can be omitted. The number of characters taken out as a partial character string is specified.
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function A partial character string of the specified character string is returned.

CHARACTER-STRING FUNCTION $ENCODE $ENCODE (Output data, Output data, ) $ENCODE

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Parameter The types of output data are any of the following types shown below. Then they are punctured by commas (All elements may be arranged in any sequence) 1. Character-string expression 2. Real value mathematics expression (The calculation result value is displayed) 3. Format designation code (output message format is specified, refer to below) /D /Em.n /Fm.n /Gm.n /Hn /In value is shown in F formula. If not, in Em.n formula. It indicates value in integer number of hexadecimal system within n territory. It indicates value in integer number by decimal system within n territory.

Details The function are so designated as to character-string be composed in the program, which is obtained from TYPE instruction. $ENCODE generated character string internally in stead of indicating message. The format designation code shown below is used to specify the expression system of numerals. This setting is valid for the consecutive parameter among the functions until another format designation code appears. In any format designation, if the numerals are too large to be indicated within the designated digit number, in the indication area of the part, an asterisk character (*) is entered. This becomes format designation of default. This is practically the same as /G15.8. But the zero(0) following numerals shall be eliminated

and a blank just before numeral is removal after leaving one blank, which is different from usual.

Numerals are represented by exponent. m is number of character in the entire part of display area: n is digit number of decimal point part. (The value of m must larger than n ; 5 or more) Numerals are represented by fixed point indication. m is number of character in the entire part of display area : n is digit number of decimal point part.

If it is possible to indicate n digits after decimal point in F formula within m boundary, the

N
19

Function Returns Character-string thus generated according to the output data designated as parameter. Generated character-string is the same as the output according to TYPE instruction.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

The following formulas are used to put special characters in a character string. /Cn The combination carriage return (CR) and line feed (LF) should insert n times. When any character-string obtained from $ENCODE function was issued to the terminal, this format setting is made at the head of parameter or the last place, n-number of blank kine is displayed and for others, n-1 number of blank line is displayed. /Un Input special characters to move cursor upward by n lines when character string is output at terminal. (In order to ensure that this function works well, the TERMINAL parameter must be correctly set up matched with the type of terminal to be used.) n-number of blank is inserted.

Example

IN

TE N

20

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
/Xn $output = $output + $ENCODE (/F6.2, count): This expression means that following the character-string contained in the variables called $output, real value variable count is added in the form of a character-string expressed by the designated format.
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

CHARACTER-STRING FUNCTION $DECODE $DECODE (Character string Variables, Partition character, Mode) $DECODE

Parameter

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Mode as function value.

Character string variable Character string Value to study. After dealing with this function this variable include the rest of the original character string except the part reversed as function value. Partition Characters This is defined as characters used to partition a necessary part of character string from input character string. (This way, each character involved in this character string is partition character.) Real number to decide a manipulation based upon this function. When the value of mode is Minus, 0, or omitted, the beginning part till the first partition character of the input character string is reversed as function value and that part gets eliminated from the input character string. When the mode value is plus, the beginning part till the first characters which are not partition character of the input character string is returned as function value and that gets removed from the string. That is the partition character (all of them, it plural) at the head of input character string are returned

Details This function is used to pick up a part of character string devided by one of partition characters. When this function return return a part of character string as a function value, at the same time that particular part gets deleted from the input character string. It is possible to make character string which is reversed (and deleted at the same time) into not including partition characters or including only partition character. This function either can extract all the character till the first partition character. This function either can extract all the character till the first partition character - usually this part is required - or extract all the partition character or the beginning of character string - usually this part is disposed.

Note This function returns character strings as well as modify the contents of input character string. When finding out partition characters it does no matter that characters used in input character string or characters to define partition character are capital characters or not.

N
21

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Function It picks up a part of character string partitioned by partition character out of character string.

Example The following program is made to pick up numbers in order devided by space or comma from character string $input. The first instruction in the DO architecture requires to pick up the first number in $input and put it into a variable $temp. (On this moment this part gets deleted from $input). Next step is to convert number progression gained just now into corresponding real number value utilizing the function VAL and

DO $temp = $DECODE ($input,,,o) value[i] = VAL ($temp) $temp = $DECODE ($input,,,1) i=i+1 UNTIL $input = = " " ; Extract character string until, ; Convert into real number ; Pick up, ; Counter Increment ; Continue the process until no character are left.

IN

TE N

22

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Suppose that $input has some numbers (as a part of character string) which are partitioned by a combination of space and comma. For example, there are numbers like these. (character string) 1234, 93465.2, .4358, 3458103, If the above program is executed with this character string, the values of the first four elements of array value will be as follows. value [0] 1234.0 value [1] 93465.2 value [2] 0.4358 value [3] 3458103.0 As a result of this the content of character variable $input is null. ().
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

i=0

; Counter clear

LY

put that value into the next element of real number array value. It looks for characters dividing numbers using the function $ENCODE again. (this character gets disposed.)

3.Communication Protocol
1) Basic Sequence : 05 E N Q 02 S T X 03 E B T C X C 04 E O T

TEXT

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Receiver [NOTE1] BCC (1 Byte) is an Exclusive OR of the Text ETX (STX is not contained ). Moreover, this is executable without BCC by introducing a setting process. ENQ, STX, ETX, EOT and ACK are control codes. 2) Collision of ENQ * (The Robot is the master station at all times):
E N Q A C K A C K

A C K 06

A C K

Termination of sequence

Slave station

Master station

E N Q

S T X

TEXT

E T X

B C C

E O T

(No answer after EVQ) T1:Refer to "NOTE2".

T1

(Note 2)

3) NAK Receiving After Transmitting Text :

C2 Re-transmission on designated number of time


S T TEXT X E T X B C C S T X E

Sender

S T X

TEXT

E T X

B C C

TEXT T

B C C

E O T

Receiver

N A K

N A K

N A K

Abnormal termination

(Invalid text)

15

C2:Refer to "NOTE2".

N
23

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Sender

4) No Answer Transmitting Text : C1 Re-try on designated number of time (ENQ)


E N Q S T X

TEXT T
X

Sender

B C C

T2

E N Q

E N Q

E O T

E N Q

E O T

Sender

Receiver

IN

TE N

24

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
T2 : Refer to "NOTE2". C1 : Refer to "NOTE2". If ACK answer is returned from the receiver it terminates (normal) after sending EOT. 5) No Answer After Transmitting ACK :
E N Q

Receiver

Abnormal termination

A C K

T3

E O T

T3 : Refer to "NOTE2".

[NOTE2]

Abnormal termination always output EOT.

T1 T3 and C1 C2 cope with timer, counter of PROTOCOL.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

A C K

A C K

(END)

Abnormal termination

LY

4.Example of Program
4.1. Robot Location and the relating matters
(1). How to Transmit Robots Present Values (X, Y, Z, O, A, T) to Host : :

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
err = 0 SEND 7 : $out, err : The executing time of the above program is about 0.2 second. (2). How to Transmit Location Data from Host to Robot : : err = 0 RECEIVE 7 : $inp. err ; For example, $inp = "-831.40, 198.30, 467.00, -164.50, 93.30, -124.30." ; Total 55 characters FOR i = 0 TO 5 STEP 1 $temp = $DECODE ($inp, " , " , 0) loc[i] = VAL ($temp) $temp = $DECODE ($inp, " , " , 1) END POINT a = TRANS (loc[0], loc[1], loc[3], loc[4], loc[5]) The executing time of the above program is about 0.3 second. (3). When the Position of already taught Point a is shifted to dlt [ ] amount : : err = 0 RECEIVE 7 : $inp. err ; For example inp = "10, 20, 30" FOR i = 0 TO 2 STEP 1 $temp = $DECODE ($inp, " , " , 0) dlt[i] = VAL ($temp) $temp = $DECODE ($inp, " , ", 1) END POINT a = SHIFT (a BY dlt[0], dlt[1], dlt[2])

$out = " " For i = 0 TO 5 STEP 1 $out = $out + $ENCODE (/F8.2, X[i]) + " , " END

N
25

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

HERE a DECOMPOSE X[0] =a

4.2. I/O Signal and the relating matters


(1). When the State of Input Signal is transmitted with True (-1) and False(0) RECEIVE 7 : $inp, err signo = VAL ($inp) ; For example inp = "3"

IN

TE N

26

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
RECEIVE 7 : $inp, err signo = VAL ($inp) SIGNAL signo ; If OUT 1 is desired to turn ON, transmit 1.
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

(2). How to set output signal :

LY

sigdata = SIG (signo + 1000) $temp = $ENCODE (/12, sigdata) SEND $temp, err ; If IN3 is ON, -1 is transmitted.

5. Communications and the relating matters: Table of AS Language


P : Program instruction M: Monitor command F : Function Description (Format) SETSIO Port No. : Baud rate, Stop bit Function Serial I/O specification is set up. Class P.M

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
TERMOFF Sets as a port where uses the personal computer terminal port by Host Communication (I). TERMON Sets as a usual terminal that use the personal computer terminal port. Timeout time, re-try frequency etc. in communication protocol are set up. PROTOCOL Timer1, Timer2, Timer3 ,Retry1, Retry2, BCC Port No. : P,M In communication, (EOT) code is issued. PROTRESET SEND P Port No. : Character variables, State variables From serial port, with the designated protocol, character-string is issued. From serial port, with the designated protocol, character-string is entered. P,M RECEIVE Port No. : Character variables, State variables (Output data, Output data....) P,M $ENCODE In conformity with the designated output data designated as parameter, generated character-string is returned. Partial character-string delimitated by F $DECODE (Character-string variables, Partition character, Mode) Partition is taken out from character-string. $CHR (Real value expression) The ASCII character string of one character with the given ASCII value is returned. The character string of specified character's worth is returned from the left the left of the specified character string. $LEFT (String expression, Extracted character number) The character string of specified character's $RIGHT (String expression, Extracted character number) worth is returned from the right of the specified character string.

N
27

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

Description (Format) $SPACE (Blank character number)

Function The specified blank character for a few minutes of the character is returned. A Partial character string of the specified character string is returned.

Class

$MID

Real values represented by character-string is returned.

IN

TE N

28

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

VAL

(Character-string, Code)

LY

(String expression, Real value expression, Extracted character number)

6. Table of Communication Error code


(Error code) Error message

( -403 ) Cannot use this command or instruction here.


An error will occur when you executes the TERMOFF command from KEYBOARD Screen of Multi Function Panel. Measures : Execute the TERMOFF command from the personal computer terminal. "2. AS Language Reference Guide"

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
( -507 ) Communication error ( -514 ) Device is not ready ( -580 ) Retry error ( -581 ) Stop of process ( -583 ) Data not received.
An error will occur When the text data is not received after it demands of the reception. (Refer to "NOTE") Measures : Reconfirm the transmitting and receiving protocol of the Host Communication(I). "3. Communication Protocol"

An error will occur at the case in which it does not receive data at the time-out specification time after transmits the ENQ code. Measures : Reconfirm the transmitting and receiving protocol of the Host Communication (I).Or, there is a possibility of the disconnection of the harness, and you confirms the harness. "3. Communication Protocol"

An error will occur at the case to have used the personal computer terminal port by Host Communication (I) when you used the personal computer terminal port as a terminal. Measures : Make it to setting which can use by Host Communication (I) the personal computer terminal port by the TERMOFF command. "2. AS Language Reference Guide"

At the time of no-answer, or receiving NAK code, after transmitting text, an error will occur. (Refer to NOTE) Measures : Reconfirm the transmitting and receiving protocl of the Host Communication(I). "3. Communication Protocol"

When stop instruction was given with Abort and Pcabort in monitor command, an error will occur. Measures : It is a guide sentence when having stopped on the way is executing instruction (SEND, RECEIVE) for the Host Communication(I).

N
29

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

( -584 ) Too long receive data (MAX = 255 character)


When character-string of which size (character-string variables, max. 255 characters) was received, an error will occur. But, original 255 characters will remain. Measures : Reconfirm the transmitting and receiving protocol of the Host Communication(I). "3. Communication Protocol"

TE N

IN

30

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
( -586 ) Time out
During indicated time out as the time of starting to execute Receive instruction, if data receiving was not exercised, an error will occur. Also, at non-designation (default), no error will occur. Measures : Reconfirm the transmitting and receiving protocol of the Host Communication(I). "3. Communication Protocol"

During communication, if abnormal code (EOT) was received, an error will occur. Measures : Reconfirm the transmitting and receiving protocol of the Host Communication(I). "3. Communication Protocol"

( -591 ) Illegal device number

An error will occur at the case to have specified the logical device number which was not able to be specified. Measures : Specify the logical device number which can be specified. "2. AS Language Reference Guide"

( -597 ) Cannot attach communication port

An error will occur while using the personal computer terminal port by SEND and RECEIVE command / instruction, etc. at the case to have executed the TERMON command from KEYBOARD Screen of Multi Function Panel. "2. AS Language Reference Guide"

[NOTE] Confirm the method of the connect of the communication harness and communication condition etc.

Sets the error detection in the communication protocol by the PROTOCOL instruction.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

( -585 ) Abnormal data (EOT) received in communicating

LY

7. Cautions
(1). Impossible to indicate at real time. (2). Send/Receive Instruction is valid only when instruction is executed. Actually double communication is impossible. (3). A character string consisting of more than 255 characters can not be sent nor received at one time. (One protocol) (4). Send/Receive Data can not be used as instruction commands apart from real number variables.

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
(5). 30 50 % of Baud rate is real transfer seed so that time for internal computation should be assured. (7). It can send and receive control codes other than the control code used for the protocol.

(6). In case of instructions, commands and function is relation with communication character string variables can not be treated as array.

However, it cannot display the character string variable which contains these codes, and it saves / load onto to the file. Therefore, avoid such a method.

N
31

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

8. Serial (RS232C) Interface Specification


Interface system Transmission speed Parity Data length Stop bit Connection specification : EIA RS232C : selected from 1200, 2400, 4800, 9600 and 19200 bps : None : 8-bit : Selected from 1-bit or 2-bit : Refer to below figure :

IN

TE N

32

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Robot controller Sensor port (Main CPU board) Or, Personal computer terminal port RxD TxD SG RTS CTS 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 RxD TxD SG RTS CTS

In case of Personal Computer (DOS/V)

Connector : HBEB-9S Case : HDE-CTT (Hirose)

Connector : HBEB-9S Case : HDE-CTT (Hirose)

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

9. Communication Cable Connection Instruction


Controller Connect directly with the Personal computer terminal.

IN

TE N

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Host computer Sensor port (Main CPU board) Open the door on a controller, and connect directly with the CN2 connector on Main CPU board. Communication cable Connect with Special port (RS232C) of Host computer. or Communication cable Connect with Special port (RS232C) of Host computer. Host computer Connect Host computer with sensor port or Personal computer terminal port.

N
KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY
33

10. Dip switch on Main CPU board


Execute the TERMOFF command or operate as follows the case put into the state which can be used as a terminal after it uses the personal computer terminal port to host communication.

IN

TE N

34

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
Dip switch Main CPU Board 1 2 3 4 5 6 7
8

After adjusting No.8 of the dip switch to the turning ON side. Turn ON the Control Power.

OFF

ON

Return No.8 of the dip switch to former state (OFF side)after this work terminates.

[NOTE]

Since the safety circuit performs in the state to open the cover with the controller, it cannot turn ON the Control Power. Turn ON the Control Power with it installed the cover.

KAWASAKI ROBOT C Controller HOST COMMUNICATION (I)

LY

TE N

IN

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
KAWASAKI ROBOT C Series Controller

HOST COMMUNICATION ()
(Option)
March 1999 : 1st Edition

Publication : KAWASAKI HEAVY INDUSTRIES, LTD. ROBOT DIVISION 90210-1080DEA


All rights reserved. Copyright 1999 KAWASAKI HEAVY INDUSTRIES, LTD.

LY

Kawasaki Robotics (UK) Limited

Kawasaki Robotics GmbH

Kawasaki Heavy Industries, Ltd.

Kawasaki Robotics Co., Ltd.

TE N

Kawasaki Robotics (USA), Inc. Kawasaki Robotics (UK) Limited Kawasaki Robotics GmbH Akashi Works

IN

All descriptions in this booklet subject to change for improvement without prior notice.

D C ED O N O F PY T O R FO R IG R CU H PR S TE TO D IN TE ME DO D R CU D RE M IS F E TR E N IB RE T U N TI C O E N O
KAWASAKI HEAVY INDUSTRIES, LTD.
ROBOT DIVISION KAWASAKI ROBOTICS CO., LTD.
4-1, 2-Chome Hamamatsu-cho Minato-ku Tokyo, 105-6116 JAPAN (World Trade Center building) TEL 81-(0)3-3435-6908 FAX 81-(0)3-3437-9880 1-1, Kawasaki-cho Akashi, 673-8666 JAPAM TEL 81-(0)78-921-1565 FAX 81-(0)78-923-0685 TEL 1-248-305-7610 FAX 1-248-305-7618 28059 Center Oaks Court Wixom, Michigan, 48393 U.S.A Greengate, Middleton Manchester, M24 1SA UNITED KINGDOM Sperberweg29, 41468 Neuss, GERMANY 1-1, Kawasaki-cho Akashi, 673-8666 JAPAN TEL 44-(0)161-9565400 FAX 44-(0)161-9565404 TEL 49-(0)2131-3426-0 FAX 49-(0)2131-930973 TEL 81-(0)78-921-1560 FAX 81-(0)78-923-6548

Kawasaki Heavy Industries, LTD. Tokyo Head Office

LY

Kawasaki Robotics (USA), Inc.

You might also like