Professional Documents
Culture Documents
Host Communication Ι
Host Communication Ι
Host Communication Ι
(Option)
90210-1177DEC
D/E Series Controller
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
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
! WARNING
! CAUTION
[ NOTE ]
Denotes precautions regarding robot specification,
handling, teaching, operation and maintenance.
! WARNING
2
D/E Series Controller
INTRODUCTORY NOTES
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”.
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
CONTENTS
Preface ................................................................................................................................................. 1
Symbols............................................................................................................................................... 2
Introductory Notes .............................................................................................................................. 3
1.0 Overview..................................................................................................................................... 5
7.0 Precautions................................................................................................................................ 30
4
D/E Series Controller 1. Overview
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
5
D/E Series Controller 2. AS Language Description
EXAMPLE
Keyword Parameter
6
D/E Series Controller 2. AS Language Description
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
Monitor command
Program instruction
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
Program instruction
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
Monitor command
Program instruction
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.
[ 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
Monitor command
Program instruction
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
Monitor command
Program instruction
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
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.
[ 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
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
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.
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
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.
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
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
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.
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
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.
19
D/E Series Controller 2. AS Language Description
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.)
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
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
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).
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
1. Basic Sequence
A A Sequence completed
C C
Receiver K K
‘06’
2. ENQ collision
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.)
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
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.
E
N
Sender Q
Abnormal
termination
A E
C T3 O
Receiver K T
24
D/E Series Controller 4. Program Examples
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
err=0
RECEIVE 1: $inp,err For example, $inp=“-831.40, 198.30, 467.00, -164.50, 93.30,
-124.30,”
Total 55 characters.
POINTa=TRANS(loc[0],loc[1],loc[2],loc[3],loc[4],loc[5])
25
D/E Series Controller 4. Program Examples
err=0
RECEIVE1:$inp,err For example, $inp=“10,20,30”
1. Sending True (-1) / False (0) to indicate the status of input signals
signo=VAL($inp)
signal signo
26
D/E Series Controller 5. AS Language List for Host Communication Ι
27
D/E Series Controller 6. List of Communication Error Codes
28
D/E Series Controller 6. List of Communication Error Codes
[ 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
7.0 PRECAUTIONS
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.
5. Real communication speed is approximately 30 – 50 % of baud rate due to the time required
for internal processing.
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
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
31
D/E Series Controller 9. 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.
+3.3V
+12V
GND
-12V
+5V
CN8 TP1 TP2 TP3 SW2
SW2 TP6 TP7
CN11
SW1
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
1
2
3
4
5
6
7
8
OFF ON
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
MEMO
34
COPYRIGHTED DOCUMENT - INTENDED FOR CUSTOMER REFERENCE ONLY
90210-1177DEC