Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY

Kawasaki Robot Controller


D/E Series

Host Communication Ι

(Option)

Kawasaki Heavy Industries, Ltd.

90210-1177DEC
D/E Series Controller

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

PREFACE

This manual describes the Host Communication Ι (Option) for Kawasaki Robot Controller D/E series.
This manual should be read with careful review of the separate basic manuals (including Safety
Manual) delivered with the robot. Once the contents of all the manuals are thoroughly read and
understood the robot can be used.

The manual provides as much detailed information as possible. However, not every possible
operation, condition or situation that should be avoided can be described in full. Therefore,
should any unexplained questions or problems arise during robot operation, please contact
Kawasaki Machine Systems.

The descriptions in this manual are common to D and E series controllers, unless otherwise
specified. Simple differences between them are described by using “/” in order of D series
controller/ E series controller.

1. This manual does not constitute a guarantee of the systems in which the robot is utilized.
Accordingly, Kawasaki is not responsible for any accidents, damages, and/or problems
relating to industrial property rights as a result of using the system.
2. It is recommended that all personnel assigned for activation of operation, teaching,
maintenance or inspection of the robot attend the necessary education/training course(s)
prepared by Kawasaki, before assuming their responsibilities.
3. Kawasaki reserves the right to change, revise, or update this manual without prior notice.
4. This manual may not, in whole or in part, be reprinted or copied without the prior written
consent of Kawasaki.
5. Store this manual with care and keep it available for use at any time. If the robot is
reinstalled or moved to a different site or sold off to a different user, attach this manual to the
robot without fail. In the event the manual is lost or damaged severely, contact Kawasaki.
All rights reserved. Copyright © 2009 Kawasaki Heavy Industries Ltd.
1
D/E Series Controller

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

SYMBOLS

The items that require special attention in this manual are designated with the following symbols.

Ensure proper and safe operation of the robot and prevent physical injury or property damage by
complying with the safety matters given in the boxes with these symbols.

! DANGER

Failure to comply with indicated matters can result in


imminent injury or death.

! WARNING

Failure to comply with indicated matters may possibly


lead to injury or death

! CAUTION

Failure to comply with indicated matters may lead to


physical injury and/or mechanical damage.

[ NOTE ]
Denotes precautions regarding robot specification,
handling, teaching, operation and maintenance.

! WARNING

1. The accuracy and effectiveness of the diagrams, procedures, and detail


explanations given in this manual cannot be confirmed with absolute
certainty. Should any unexplained questions or problems arise, please
contact Kawasaki Machine Systems.
2. Safety related contents described in this manual apply to each individual
work and not to all robot work. In order to perform every work in safety,
read and fully understand the safety manual, all pertinent laws, regulations
and related materials as well as all the safety explanation described in each
chapter, and prepare safety measures suitable for actual work.

2
D/E Series Controller

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

INTRODUCTORY NOTES

1. HARDWARE KEYS AND SWITCHES (BUTTONS)

D/E series controller provides hardware keys and switches on the operation panel and the teach
pendant for various kinds of operations. In this manual the names of the hardware keys and
switches are enclosed with a square as follows. The terms “key” or “switch” which should
follow the relevant names are sometimes omitted for simpler expression. When pressing two or
more keys at the same time, the keys are indicated by “+” as shown in the example below.

EXAMPLES
SELECT : expresses the hardware key “SELECT”.

A + MENU : indicates pressing and holding down A then pressing MENU.

2. SOFTWARE KEYS AND SWITCHES

D/E series controller provides software keys and switches which appear on the screen of the teach
pendant for various kinds of operations depending on specifications and situations. In this
manual, the names of software keys and switches are enclosed by “< >” parentheses. The terms
“key” or “switch” which should follow the relevant names are sometimes omitted for simpler
expression.

EXAMPLES

<ENTER> : expresses an “ENTER” key that appears on the teach pendant screen.
<NEXT PAGE> : expresses a “NEXT PAGE” key on the teach pendant screen.

3. SELECTION ITEMS

Quite often an item must be selected from a menu or pull-down menu on the teach pendant screen.
In this manual the names of these menu items will be enclosed [XXX] in brackets.

EXAMPLES

[BASIC SETTING] : expresses the item “BASIC SETTING” in a menu. To select it, press
the “SELECT” key after moving the cursor to the relevant item by the
arrow keys. For detailed description, this procedure should be
described every time, but “select [XXX] item” will be used instead for
simpler expression.
3
D/E Series Controller

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

CONTENTS

Preface ................................................................................................................................................. 1
Symbols............................................................................................................................................... 2
Introductory Notes .............................................................................................................................. 3

1.0 Overview..................................................................................................................................... 5

2.0 AS Language Description .......................................................................................................... 6

3.0 Communication protocol.......................................................................................................... 23

4.0 Program Examples.................................................................................................................... 25


4.1 Program Examples for Pose of Robot...................................................................................... 25
4.2 Program Examples for I/O signals ........................................................................................... 26

5.0 AS Language List for Host Communication Ι......................................................................... 27

6.0 List of Communication Error Codes........................................................................................ 28

7.0 Precautions................................................................................................................................ 30

8.0 Specifications for RS-232C Serial Interface............................................................................ 31

9.0 Dip switch on Main CPU Board .............................................................................................. 32

4
D/E Series Controller 1. Overview

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

1.0 OVERVIEW

This function is for sending/receiving ASCII characters via RS-232C communication line by
using the predetermined protocol. A character string variable is sent/received by AS language
programming. Conversions between character string variables and real variables are possible
via AS language function. Therefore, the data for the robot target pose (position and posture)
can be sent to the host computer, and that data can be changed by the host computer.

System configuration

Connect the host computer to the RS-232C port in accessory panel on the controller or the
RS-232C port on main CPU board in the controller.

RS-232C port
Accessory
panel

RS-232C
port

RS-232C
port

Main CPU
Board (1KA or
1RA board)
Main CPU
Board (1TA
board)

Accessory
panel

D series controller E series controller

5
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

2.0 AS LANGUAGE DESCRIPTION

EXAMPLE

Keyword Parameter

SEND Port No.: Character variable,…

Parameters marked with can be omitted.

Always enter a space between the keyword and the parameter.

↵ represents the Enter (Return) key in the examples.

6
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Monitor command

TERMOFF
TERMON

Function
TERMOFF········ Sets the PC terminal port used for as host communication Ι.
TERMON·········· Sets the PC terminal port as the normal terminal.

[ NOTE ]
1.TERMOFF command can only be executed from the PC terminal. When
TERMOFF command is in effect, it is impossible to key in and display the PC
terminal screen until TERMON command is executed. Execute TERMON
command from the keyboard screen of the teach pendant.
2.If dip switch No.8 of SW2 is ON at time of control power ON, the PC terminal
port is set as the normal PC terminal. (See 9.0 Dip Switch on main CPU
Board.)

7
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Monitor command
Program instruction

SETSIO Port No.: Baud rate, Stop bit

Function
Sets the serial I/O specification.

Parameter
1. Port No.
Designates the communication port. The following two types are available.
1 or 7: Sensor port
2 or 8: PC terminal port
If omitted, “1” (Sensor port) is designated.

2. Baud rate
Sets the baud rate.
Settable value : 9600,19200 or 38400.

3. Stop bit
Sets the stop bit 1 or 2.

[ NOTE ]
1. Port number can be set interactively when using the monitor command.
2. Error check function for parity is not available.
3. Execute TERMOFF command before designating port No.2 or 8.

8
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Program instruction

PROTRESET Port No.:

Function
Outputs the control code (EOT) that indicates the end of the transmission.

Parameter
1. Port No.
Designates the communication port. The following two types are available.
1 or 7: Sensor port
2 or 8: PC terminal port
If omitted, “1” (Sensor port) is designated.

[ NOTE ]
Execute TERMOFF command before designating port No.2 or 8.

9
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Monitor command
Program instruction

PROTOCOL Timer 1, Timer 2, Timer 3, Retry 1, Retry 2, BCC

Function
Sets the time out and number of retries in the communication protocol.

Parameter
1. Timer 1
Sets the time out for when there is no answer after ENQ (control code) was sent. (Unit : s)

2. Timer 2
Sets the time interval for retry when there is no answer after the text was sent. (Unit : s)

3. Timer 3
Sets time out for when there is no answer after ACK (control code) was sent. (Unit : s)

4 Retry 1
Sets the number of retries for when there is no answer after the text was sent.

5. Retry 2
Sets the number of retries for when NAK (control code) is received after the text was sent.

6. BCC (Block check code)


Sets 1 if inserting the block check code. If not, sets 0. (See NOTE below.)

[ NOTE ]
1.Can be set interactively when using the monitor command.
2.BCC is Exclusive-OR from text to ETX (control code).

10
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Monitor command
Program instruction

SEND Port No.: Character variable, Status variable

Function
Outputs the character string from the serial port using predetermined protocol.

Parameter
1. Port No.
Designates the communication port. The following two types are available.
1 or 7: Sensor port
2 or 8: PC terminal port
If omitted, “1” (Sensor port) is designated.

2. Character variable
Designates the name of character variable to send. (Max. no. of characters : 255)

3. Status variable
Sets the real variable that stores the condition of SEND.
During operation >0
Normal termination =0
Abnormal termination 0 <
If the status variables are not designated at abnormal termination, the program will stop due to an
error.

Explanation
When SEND instruction is executed, the program does not proceed to the next step until the
communication is complete. To communicate while the robot moves, execute the
communication command using a PC program. See 3.0 Communication protocol for more
details.

[ NOTE ]
Execute TERMOFF command before designating port No.2 or 8.

11
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Monitor command
Program instruction

RECEIVE Port No.: Character variable, Status variable, Timer

Function
Inputs the character string from the serial port using predetermined protocol.

Parameter
1. Port No.
Designates the communication port. The following two types are available.
1 or 7: Sensor port
2 or 8: PC terminal port
If omitted, “1” (Sensor port) is designated.

2. Character variable
Designates the name of character variable to receive. (Max. no. of characters : 255)

3. Status variable
Sets the real variable that stores the condition of SEND.
During operation >0
Normal termination =0
Abnormal termination 0 <
If the status variables are not designated at abnormal termination, the program will stop due to an
error.

4. Timer
Designates time out to wait for ENQ (control code). (Unit : s)
If omitted, the time out is not executed.

Explanation
When RECEIVE instruction is executed, the program does not proceed to the next step until the
communication is complete. To communicate while the robot moves, execute the
communication command using a PC program. See 3.0 Communication protocol.
for more details.

[ NOTE ]
Execute TERMOFF command before designating port No.2 or 8.

12
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Real value function

VAL (Character string, Code)

Function
Returns the real value represented by the characters in the specified character string.

Parameter
1. Character string
Character string constant, character string variable, or character string expression can be used.

2. Code
Real value expression. Can be omitted. Specifies the numbering system for translating the
character string by the setting value shown below. (Use this setting value only when the
character string does not include a code to specify the numbering system.) If omitted, or the
setting value is not 1 or 2, 0 is assumed.

Setting value Notation


0 Decimal
1 Binary
2 Hexadecimal

[ NOTE ]
1. Exponential notation can be used to specify the character string.
2. The code for expressing the numbering system can be included at the beginning of the
character string.
3. When the character cannot be read as a part of the character string variable or code, it is
treated as a symbol indicating the end of the character string that is translated.

Example
VAL(“123 Elm Street”) Returns the real value 123.
VAL(“1.2E-5”) Returns the real value1.2 E-5.
VAL(“^HFF”) Returns the real value 255.

13
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$CHR (Real valued expression)

Function
Returns the ASCII character with the given ASCII value.

Parameter
1. Real value expression
Specifies the value to be translated into ASCII character. Setting range is 0 to 255.

Explanation
When the specified ASCII value is within the setting range, 0 to 255, the ASCII character
corresponding to that value is returned.

Example
$CHR(65) Returns “A” because ASCII value 65 is “A”.
$CHR(^H61) Returns “a” because ASCII value 97 is “a”.

14
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$LEFT (Character string expression, Number of extracting characters)

Function
Returns the character string containing the specified number of characters which are extracted
starting from the left side of the character string expression.

Parameter
1. Character string expression
Specifies character string constant, character string variable or character string expression.

2 Number of extracting characters


Specifies the number of characters to be extracted starting from the left of the character string.
If 0 or less than 0 is specified, a space is returned.

Explanation
Returns a character string containing the specified number of characters which are extracted
starting from the left side of the character string expression. When the number of characters is
set bigger than that of the character string expression, the whole character string is returned.

Example
$LEFT(“abcdefgh”,3) Returns the character string “abc”.
$LEFT(“*1*2*3*4*5”,15) Returns the character string “*1*2*3*4*5”.

15
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$RIGHT (Character string expression, Number of extracting characters)

Function
Returns the character string containing the specified number of characters which are extracted
starting from the right side of the character string expression.

Parameter
1. Character string expression
Specifies character string constant, character string variable or character string expression.

2 Number of extracting characters


Specifies the number of characters to be extracted starting from the right of the character string.
If 0 or less than 0 is specified, a space is returned.

Explanation
Returns the character string containing the specified number of characters which are extracted
starting from the right side of the character string expression. When the number of characters is
set bigger than that of the character string expression, the whole character string is returned.

Example
$RIGHT(“abcdefgh”,3) Returns the character string “fgh”.

16
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$SPACE (Number of spaces)

Function
Returns the specified number of spaces.

Parameter
1. Number of spaces
Specifies the number of spaces.
0 or positive value.

Example
type “a” + $space(1) + “dog” Displays “a dog”.

17
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$MID (Character string expression, Real value expression,


Number of characters extracted)

Function
Returns a part of the character string extracted from the specified character string.

Parameter
1. Character string expression
Specifies the character string variable, character string constant or character string expression
from which to extract the character string. Cannot be omitted.

2. Real value expression


Specifies the starting position of the character string to be extracted.

3. Number of characters extracted


Specifies the number of characters to extract from the character string.

Explanation
1. When the real value expression is omitted or is set less than 1, a part of the character string is
extracted from the beginning of the specified character string.

2. When the real value expression is set greater than the specified character string length (the
number of characters), a space is returned.

3. When the number of characters extracted is set 0 or negative value, a space is returned.

4. When the number of characters extracted is omitted or set greater than that of the specified
character string, the whole character string is returned. Therefore, no error occurs and the
extracted character string does not become longer than the specified character string.

Example
In the following example, the character string “cd” is substituted for the character string variable
$substring. Because “cd” are the two characters extracted starting from the third character of
the character string “abcdef”.

$substring=$MID(“abcdef”,3,2)

18
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$ENCODE (Output data, Output data,…)

Function
Returns the character string created from the output data specified in the parameters. The
character string is created in the same way as when using TYPE command.

Parameter
The output data should be one of the following types and are separated by comma.
(Regardless of the order of each element.)
1.Character string expression
2.Real value expression (Displays the result.)
3.Format specification code (Specifies the format for the output message. See below.)

Explanation
This function enables creating character strings within programs using the same print data as in
the TYPE command. Unlike TYPE, the $ENCODE function does not display the created
character strings, but instead the results are used as values in programs. The following codes are
used to specify the output format of numeric expressions. The same format is used until a
different code is specified. In any format, if the value is too large to be displayed in the given
width, asterisks (*) are shown instead of the values.

/D : Uses the default format. This is the same /G15.8 except that zeros following numeric
values and all spaces but one between numeric values are removed.

/Em.n : Displays the numeric values in exponent notation (e.g. -123.4E+2). “m” describes the
total number of characters shown on the terminal and “n” the number of decimal places.
“m” should be greater than n by five or more, and smaller than 32.

/Fm.n : Displays the numeric values in fixed point notation (e.g. -1.234). “m” describes the
total number of characters shown on the terminal and “n” the number of decimal
places.

/Gm.n : If the value is greater than 0.01 and can be displayed in Fm.n format within m digits,
the value is displayed in that format. Otherwise, the value is displayed in Em.n
format.

/Hn : Displays the values as a hexadecimal number in the n digit field.

19
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

/In : Displays the values as a decimal number in the n digit field.

The following parameters are used to insert certain characters between character strings.

/Cn : Inserts the carriage return (CR) and line feed (LF) character “n” times in the place
where this code is entered, either in front or after the print data. If this code is placed
within print data, n-1 blank lines are inserted.

/Un : Inserts certain characters to move the cursor upward “n” lines when the character string
is output to the terminal. (Set correct parameters for TERMINAL according to the
terminal type.)

/Xn : Inserts n spaces.

Example
$output=$output+$ENCODE(/F6.2,count)

The value of the real variable “count” is converted into a character string in the format specified
by /F6.2, and added to the end of the character string in “$output”. Then the combined character
string is substituted back for the character string variable “$output”.

20
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Character string function

$DECODE (Character string variable, Delimiter, Mode)

Function
Returns a character string from the specified character string variable based on a delimiter
character.

Parameter
1. Character string variable
Specifies the character string variable from where the characters are extracted. Characters
extracted as a result of this function are removed from this character string variable.

2. Delimiter
Specifies the character to read as delimiter. (Any character in the character string can be specified
as delimiter).

3. Mode
Real number for specifying the operation executed by this function.
(1) When the mode is specified with a negative number or 0, or is omitted, the characters starting
from the first character in the character string variable to the delimiter are returned. The
returned character string is removed from the character string variable.

(2) When the mode is specified with a positive number, the first delimiter that appears in the
character string is returned. The returned delimiter is removed from character string variable.
If more than one delimiter exists in the character string consecutively, all the delimiters are
returned and removed from the character string variable.

Explanation
This function searches the specified character string for the delimiter and extracts the characters
from the beginning of the character string to the delimiter. The extracted characters are returned
as the result of the function and are removed from the character string. The character string
returned as the result of the function could be either the characters before the delimiter or the
delimiter itself.
[ NOTE ]

This function changes the original string at the same time it returns the characters.
The characters are searched regardless of their case.

21
D/E Series Controller 2. AS Language Description

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

Example
In the instructions below, the numbers separated by commas or blanks are removed from the
character string “$input”. The first instruction in the DO structure removes the first set of
characters in $input and substitutes them for variable “$temp”. Next the function VAL changes
the character string gained in the previous instruction into a real value. The real value is then
substituted for the array variable “value”. Then, the program execution goes on to the next
$DECODE function and searches for the next delimiter (the delimiter is removed from $input).

i=0 Resets counter.


DO
$temp=$DECODE($input,”,”,0) Extracts characters up to the delimiter ”,”.
value[i]=VAL($temp) Converts the characters to real values.
$temp=$DECODE($input,”,”,1) Extracts the delimiter “,”.
i=i+1 Counter increment.
UNTIL $input==“ ” Continues program execution until there are no more
characters.

If the values of $input are as below, each separated by space and comma then the result of the
above program are as follows:

1234,93465.2,.4358,3458103,

value[0] 1234.0
value[1] 93465.2
value[2] 0.4358
value[3] 3458103.0

As a result of executing the program, the value of character string variable $input becomes space
character (“”).

22
D/E Series Controller 3. Communication Protocol

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

3.0 COMMUNICATION PROTOCOL

1.BCC (1Byte) is Exclusive-OR from Text to ETX (not including STX).


BCC can be omitted depending on the setting.
2.ENQ, STX, ETX, EOT and ACK are control codes.
3.EOT is always output after abnormal termination.
4.T1-3 and C1-2 correspond to the timer and counter in the PROTOCOL.

1. Basic Sequence

‘05’ ‘02’ ‘03’ ‘04’


E S E B E
N T Text T C O
Q X X C T
Sender

A A Sequence completed
C C
Receiver K K
‘06’

2. ENQ collision

Robot is always the master station.

E A A
N C C
Slave station Q K K

E S E B E
N T X C O
Master station Q X T C T
T1
(No answer after sending ENQ.)

3. Receiving NAK after sending Text.


C2
Retries the specified number of times.

S E S E B S E B E
T Text T T Text T C T Text T C O
Sender X X X X C X X C T

N N N Abnormal
A A A termination
K K K
Receiver
(Invalid text) ‘15’

23
D/E Series Controller 3. Communication Protocol

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

4. No answer after sending Text


C1
Retries the specified number of times.

E S E B E E E E E
T2
N T Text T C N N O N O
Q X X C Q Q T Q T
Sender

A A
C C (Complete) Abnormal
K K termination
Receiver
After receiving ACK from the receiver,
EOT is sent for normal termination.

5. No answer after sending ACK

E
N
Sender Q
Abnormal
termination
A E
C T3 O
Receiver K T

24
D/E Series Controller 4. Program Examples

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

4.0 PROGRAM EXAMPLES

4.1 PROGRAM EXAMPLES FOR POSE OF ROBOT

1. Communicating the robot’s current pose (X, Y, Z, O, A, T) to the host computer.

HERE a
DECOMPOSE X[0]=a

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

Err=0
SEND 1: $out,err

Execution time for the above program is about 0.2 seconds.

2. Communicating pose data from the host computer to the robot.

err=0
RECEIVE 1: $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

POINTa=TRANS(loc[0],loc[1],loc[2],loc[3],loc[4],loc[5])

Execution time for the above program is about 0.3 seconds.

25
D/E Series Controller 4. Program Examples

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

3. Shifting the position of the taught point “a” by dlt[ ].

err=0
RECEIVE1:$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
POINTa=SHIFT(a BY dlt[0],dlt[1],dlt[2])

4.2 PROGRAM EXAMPLES FOR I/O SIGNALS

1. Sending True (-1) / False (0) to indicate the status of input signals

RECEIVE 1: $inp,err For example, $inp=“3”


signo=VAL($inp)
sigdata=SIG(signo+1000)
$temp=$ENCODE(/I 2,sigdata)
SEND $temp,err If IN3 is ON, -1 is sent.

2. Setting output signals

RECEIVE 1: $inp,err Turning OUT1 ON, send 1.

signo=VAL($inp)
signal signo

26
D/E Series Controller 5. AS Language List for Host Communication Ι

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

5.0 AS LANGUAGE LIST FOR HOST COMMUNICATION Ι


P :Program instruction
M :Monitor command
F :Function
S :System switch
Description (Format) Function
SETSIO Port No.: Baud rate, Stop bit Sets the specifications for the serial I/O. P, M
Sets the PC terminal port for use with
TERMOFF M
host communication Ι.
TERMON Sets the PC terminal port for the terminal. M
PROTOCOL Timer 1, Timer 2, Timer 3, Sets the time out and retry count for the
P, M
Retry 1, Retry2, BCC communication protocol.
Outputs EOT (control code) for
PROTRESET Port No.: P
communication.
SEND Port No.: Character variable, Outputs the character string from the
P, M
Status variable serial port with the specified protocol.
RECEIVE Port No.: Character variable, Outputs the character string from the
P, M
Status variable serial port with the specified protocol.
Returns the character string generated
$ENCODE (Output data, Output data…) from the output data specified in the F
parameters.
$DECODE (Character string variable, Extracts the character string separated by
F
Delimiter, Mode) the specified delimiter.
Returns the ASCII characters with the
$CHR (Real valued expression) F
given ASCII value.
$LEFT (Character string expression, Returns character string extracted from
F
Number of extracting character) the left side of specified character string.
Returns character string extracted from
$RIGHT (Character string expression,
the right side of specified character F
Number of extracting character)
string.
Returns the specified number of space
$SPACE (Number of spaces) F
characters.
$MID (Character string expression, Returns a part of the character string
Real value expression, extracted from the specified character F
Number of characters extracted) string.
Returns the real value represented by the
VAL (Character string, Code) F
character string.

27
D/E Series Controller 6. List of Communication Error Codes

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

6.0 LIST OF COMMUNICATION ERROR CODES

P0111 : Cannot use this command / instruction here.


Probable cause : TERMOFF command is executed from the key board screen of the teach
pendant.
Countermeasure : Execute TERMOFF command from PC terminal.
(See 2.0 AS Language Description.)

P2008 : Device is not ready.


Probable cause : Attempted to use host communication Ι on a port already set for PC terminal.
Countermeasure : Set the PC terminal port for the host communication Ι by TERMOFF
command. (See 2.0 AS Language Description.)

(E4000) : Data communication error.


Probable cause : Data is not received within the specified time after ENQ code was sent.
Countermeasure : Check the communication protocol for the host communication, or check for
cable disconnections. (See 3.0 Communication Protocol.)

E4004 : Communication retry error.


Probable cause : There was no answer after sending text or an error occurred when receiving
NAK code. (See NOTE below.)
Countermeasure : Check the communication protocol for the host communication Ι.
(See 3.0 Communication Protocol.)

E4005 : Communication process was stopped.


Probable cause : A stop monitor command, ABORT, PCABORT, etc., was executed.
Countermeasure : This message is disabled when operation has been suspended during execution
of SEND / RECEIVE commands for host communication.

E4006 : No data received after request.


Probable cause : Text data was not received after request was sent. (See NOTE below.)
Countermeasure : Check the communication protocol for the host communication Ι.
(See 3.0 Communication Protocol.)

28
D/E Series Controller 6. List of Communication Error Codes

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

E4007 : Received data is too long (MAX=255 characters).


Probable cause : Received more than 255 characters in the character string. In this case, only
the first 255 characters are accepted.
Countermeasure : Check the communication protocol for the host communication Ι.
(See 3.0 Communication Protocol.)

E4008 : Abnormal data (EOT) received, communication stopped.


Probable cause : Received abnormal code during communication processing.
Countermeasure : Check the communication protocol for the host communication Ι.
(See 3.0 Communication Protocol.)

(E4009) : Communication time out error.


Probable cause : Data was not received within the specified time after executing RECEIVE
instruction. This error does not occur when the default is set.
Countermeasure : Check the communication protocol for the host communication Ι.
(See 3.0 Communication Protocol.)

(P2020) : Incorrect device number.


Probable cause : Designated unacceptable port No.
Countermeasure : Designate acceptable port No. (See 2.0 AS Language Description.)

E4011 : Communication port already in use.


Probable cause : TERMON command was executed from the key board screen of the teach
pendant while the PC terminal port was communicating SEND and RECEIVE
commands/instructions. (See 2.0 AS Language Description.)

[ NOTE ]
1. Check the connecting method for the cable, communication conditions, etc.
2. For detecting errors in communication protocol, set the conditions by
PROTOCOL instruction.

29
D/E Series Controller 7. Precautions

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

7.0 PRECAUTIONS

1. The robot pose cannot be specified in real time.

2. Sending/receiving instructions are effective only when the instruction is executed. Therefore,
data cannot be sent/received in full duplex.

3. Character strings exceeding 255 characters cannot be sent or received in one protocol.

4. Sending/receiving data cannot be used as a real variable, instruction, or command.

5. Real communication speed is approximately 30 – 50 % of baud rate due to the time required
for internal processing.

6. For instructions, commands and functions relating to communication, a character string


variable cannot be used as an array.

7. Other control codes in addition to those used in protocols can be sent/received. However,
character string variables which include these control codes cannot be displayed or
saved/loaded to files. Thus, avoid using these control codes.

30
D/E Series Controller 8. Specifications for RS-232C Serial Interface

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

8.0 SPECIFICATIONS FOR RS-232C SERIAL INTERFACE

Interface system : EIA RS-232C


Transmission speed : 1200,2400,4800,9600,or 19200bps (selectable)
Parity : None
Data length : 8 bit
Stop bit : 1 or 2bits (selectable)
Control method : Asynchronous communication method with no flow control
Connection specification : See the figure below.

Cable type : D-sub9pin (female) – D-sub9pin (female)


(Sanwa Supply, INC. KRS-403XFIK)

1 1 1 1
2 RxD 2 2 RxD 2
Sensor port on 1KA/1RA
3 TxD 3 3 TxD 3
board inside the controller.
or 4 4 4 4
5 SG 5 5 SG 5
PC terminal port.
6 6 6 6
7 RTS 7 7 RTS 7
D-sub9pin (male)
8 CTS 8 8 CTS 8
9 9 9 9

Controller Host computer


[D‐sub9pin (male)] [D‐sub9pin (male)]

31
D/E Series Controller 9. Dip Switch on Main CPU Board.

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

9.0 DIP SWITCH ON MAIN CPU BOARD

To return the PC terminal port to normal use condition after using RS-232C port in the accessory
panel for host communication Ι, execute TERMON command, or follow the procedure shown
below.

D series controller 1KA or 1RA board

+3.3V
+12V
GND

-12V

+5V
CN8 TP1 TP2 TP3 SW2
SW2 TP6 TP7
CN11
SW1

Dip switch SW2


バッテリー

LD1 LD2 LD3


Battery
Battery

connector CN7

1KNボード
1KN/1QN board CN6

1
2
CN9 IPボード
IP board 3
CN2
CN3
4
1KJボード
1KJ board
5
1KK board
1KKボード CN5
6
7
CN10 (P2) CN4 (P1) 8

OFF ON

Turn ON No.8 of the SW2 on the 1KA or 1RA


board before turning ON the control power.
E series controller
1TA board

Dip switch SW1

1
2
3
4
5
6
7
8
OFF ON

Turn ON No.8 of the SW1 on the 1TA board before


turning ON the control power.
32
D/E Series Controller 9. Dip Switch on Main CPU Board.

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

After finishing this operation, turn OFF dip switch No.8 of the SW2.

[ NOTE ]
When turning the controller power ON, be sure to shut the door of
the controller. If the door is open, the controller power cannot be
turned ON because the safety circuit is activated.

! CAUTION

If No.1 of a dip switch SW1 on 1TA is wrongly set, E series controller will not
work. In that case, turn ON the controller power after setting No.1 of the dip
switch SW1 to ON once and turn OFF the controller power after setting No.1 of
the dip switch SW1 to OFF. See E series controller Trouble shooting manual for
more details.

33
D/E Series Controller

COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY


Kawasaki Robot Manual for Host Communication Ι

MEMO

34
COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY

Kawasaki Robot Controller D/E Series


Host Communication Ι (Option)

October 2002 : 1st Edition


January 2007: 2nd Edition
March 2009: 3rd Edition

Publication : KAWASAKI HEAVY INDUSTRIES, LTD.

90210-1177DEC

All rights reserved. Copyright © 2009 KAWASAKI HEAVY INDUSTRIES, LTD.

You might also like