Professional Documents
Culture Documents
Communication
Option Manual
90210-1344DEB
F Series Controller Preface
Kawasaki Robot Communication Option Manual
Preface
This manual describes the communication option function for Kawasaki Robot F series controller. This
manual should be read with careful review of the separate basic manuals (including Safety Manual)
delivered with the robot and related manuals mentioned in this manual. Once the contents of all the
manuals are thoroughly read and understood the robot can be used.
This manual provides as much detailed information as possible on the standard operating methods for
using this function. 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.
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.
Copyright © 2017 Kawasaki Heavy Industries Ltd. All rights reserved.
i
F Series Controller Symbols
Kawasaki Robot Communication Option Manual
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 within the boxes with these symbols.
! DANGER
! WARNING
WARNING
Failure to comply with indicated matters may possibly lead to
injury or death.
! CAUTION
[NOTE]
Denotes precautions regarding robot specification,
handling, teaching, operation and maintenance.
! WARNING
ii
F Series Controller Table of Contents
Kawasaki Robot Communication Option Manual
Table of Contents
Preface··················································································································· i
Symbols ················································································································ ii
1 TCP/IP Communication Function ·································································· 1-1
1.1 Overview of Ethernet-Connected TCP/IP Communication ···································· 1-2
1.1.1 Remote Terminal Function ·········································································· 1-2
1.1.2 Socket Communication Function ··································································· 1-2
1.1.2.1 TCP Communication Instructions ·································································· 1-3
1.1.2.2 UDP Communication Instructions ································································· 1-4
1.1.3 File Transfer Function ················································································ 1-5
1.1.4 Support Specifications for TCP/IP Communication ············································ 1-5
1.2 Ethernet Network Configuration and Connection with Robot Controller ···················· 1-6
1.2.1 Direct Connection without Hub····································································· 1-6
1.2.2 Network Connection with Hub ····································································· 1-7
1.3 Setting IP Address and Confirming Connection·················································· 1-8
1.3.1 Setting IP Address and Subnet Mask Data ························································ 1-8
1.3.2 Checking Connection to the Network···························································· 1-10
1.4 Using KRterm Remote Terminal Function ····················································· 1-12
1.4.1 What is KRterm? ··················································································· 1-12
1.4.2 System Requirements ·············································································· 1-12
1.4.3 Installing Software and Registering Robot IP Address ········································ 1-13
1.4.3.1 Installing KRterm and Registering Robot IP Address ········································· 1-13
1.4.4 Operating KRterm ·················································································· 1-14
1.4.4.1 Daily Operations ···················································································· 1-14
1.4.4.2 Menu ·································································································· 1-16
1.4.4.2.1 File ···································································································· 1-16
1.4.4.2.2 Com(munication) ··················································································· 1-17
1.4.4.2.3 View ·································································································· 1-19
1.4.4.2.4 Help ··································································································· 1-19
1.4.4.3 Vertical/Horizontal Scroll Bar····································································· 1-19
1.4.4.4 Title Display ························································································· 1-20
1.4.5 Notes and Restrictions ·············································································· 1-21
1.4.6 To Avoid Saving/Loading of Mistaken Robot Data ··········································· 1-22
1.5 Data Communication Instructions in UDP ······················································ 1-24
1.5.1 Communication Errors in UDP_SENDTO and UDP_RECVFROM ······················ 1-29
1.6 Data Communication Instructions in TCP ······················································ 1-31
1.6.1 Communication Errors in Socket Communication············································· 1-46
iii
F Series Controller Table of Contents
Kawasaki Robot Communication Option Manual
iv
F Series Controller
Kawasaki Robot Communication Option Manual
1
TCP/IP
Communication
Function
1-1
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
To use the functions below, create an Ethernet network as shown in the diagram below by connecting
Ethernet port on robot controller and external devices (e.g. personal computer) using
10BASE-T/100BASE-TX/1000BASE-T cable.
Hub
By installing KRterm, software provided by Kawasaki, in a Windows PC, operations such as entering
AS monitor commands from personal computer are made possible via Ethernet-connected TCP/IP
communication in addition to the RS232 communication (standard feature).
This communication function provides commands based on socket interface in TCP/IP communication
enabling data communication between robot controller and other devices.
1-2
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Connect Connect
TCP_LISTEN TCP/IP TCP/IP socket()
connect()
TCP_ACCEPT
Ethernet Network
Send/receive data Send/receive data
TCP_RECV send()
TCP_SEND recv()
Disconnect Disconnect
TCP_CLOSE sockclose()
TCP_END_LISTEN
1-3
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Connect Connect
TCP/IP TCP/IP socket()
blind()
TCP_CONNECT listen()
accept()
Send/receive data Ethernet network Send/receive data
TCP_ SEND recv()
TCP_ RECV send()
Disconnect Disconnect
TCP_CLOSE sockclose()
There are two UDP communication instructions: UDP_SENDTO (sends data) and
UDP_RECVFROM (receives data).
Personal Computer
Robot Controller
Process
AS Application Program
Send data
UDP_RECVFROM
UDP/IP UDP/IP sendto()
Receive data
Ethernet network
UDP_SENDTO
recv_from()
1-4
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
The robot controller is equipped with FTP client function so that saving/loading can be done for all
types of data: robot data, program data, auxiliary data, error logs and all the data by using FTP (TCP/IP)
communication, as through USB memory. Operation is performed by auxiliary function on teach
pendant (TP).
Personal Computer
Robot Controller Robot Controller
(R/C) (R/C)
Ethernet Ethernet
Cable Cable
Ethernet
Cable
Hub
File transfer
File transfer
(Example)
-AS taught data is saved from robot controller to the server through LAN by instructions from robot
controller.
-AS taught data is loaded from the server through LAN to robot controller by instructions from robot
controller.
1. 10BASE-T/100BASE-TX/1000BASE-T Ethernet
2. Network connection transmission rate: 10 Mbps/100 Mbps/1000 Mbps
3. Connected using RJ045 Connector
4. Protocols: IP, ARP, RARP, ICMP, TCP, UDP, TELNET (Server), FTP
1-5
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
This section explains how an Ethernet network is created using an example of connecting a personal
computer (external computer) with a robot controller.
The personal computer can be connected with the robot controller in two ways:
1. Connection of two robot controllers to one external computer without using a hub
2. Connection of two or more computer systems (including robot controllers) using Ethernet via a hub.
Robot Controller
10BASE-T/100BASE-TX/1000BASE-T
Cross cable x 2
Ethernet Interface
Board
RJ45 Connector
Port 1 Port 2
Front Rear
1-6
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
This diagram shows the network using a hub connected with 10BASE-T/100BASE-TX/1000BASE-T.
10BASE-T/100BASE-TX/
1000BASE-T
Transceiver Connect if
cable
necessary.
Hub
10BASE-T/
100BASE-TX/
1000BASE-T
Straight Cable
1-7
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
To set the IP address and confirm connection, the robot controller and a Windows PC have to be
connected to the network. After connecting the hardware, an IP address for the robot controller must be
set on the network of robot controller in order to use the TCP/IP communication function.
Register the IP address and the subnet mask for the robot controller before using the TCP/IP
communication function.
To set the IP address and subnet mask, execute NETCONF monitor command via the keyboard screen
of teach pendant or a KRterm remote terminal screen on a RS232-connected personal computer.
Example
>NETCONF
IP address = 192.168.0.2
Change?(If not, press RETURN only)
123.123.123.123
IP address = 123.123.123.123
Change?(If not, press RETURN only)
Host name =
Change?(If not, press RETURN only)
KAWASAKI
1-8
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Gateway IP = 0.0.0.0
Change?(If not, press RETURN only)
255.255.255.0
Gateway IP = 255.255.255.0
Change?(If not, press RETURN only)
Domain name =
Change?(If not, press RETURN only)
kawasaki_robot
IP address can be set via teach pendant. See the “Operation Manual” for setting the IP address via TP
(Aux. 0812 Network Setting).
After registering the IP address, reboot the robot controller by turning control power OFF ON.
1-9
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Once Ethernet-connected interface for the robot controller is opened and properly started, connect a
Windows PC to the same network and confirm the connection using the ping command in Command
Prompt screen. Before checking with ping command, the Windows PC needs to be set for Ethernet
connection (register IP address and subnet mask) and rebooted.
1. Open Command Prompt screen in a Windows PC.
2. In Command Prompt screen, enter:
>ping IP_address
IP_address is the IP address of the robot controller to be connected. If the connection is functioning
properly, the following message appears.
If the connection is not properly established, error messages such as timeout error will be displayed.
1-10
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
This error can occur due to following causes. Check and correct the error and retry until connection is
successful.
Generally, there are LEDs on the hub or Ethernet connection interface devices. The signal status can be
checked by these LEDs. Use this information for troubleshooting when connection does not succeed.
1-11
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
KRterm has Ethernet-connected remote terminal function. When installed on Windows PC, the
software allows remote terminal operation of robots from personal computer. Before terminal operation,
it is necessary to identify which robot to be used by its IP address. When the robot is successfully
connected, terminal operations such as entering monitor commands are possible. After the necessary
operations are finished, end the connection using the designated instructions.
Instructions for operating the KRterm remote terminal function are explained below.
KRterm is terminal software exclusive for the Kawasaki robot controller. When this software is installed
on a personal computer and the personal computer is connected to controller by Ethernet connection, the
following operations are possible by TCP/IP communication.
・AS monitor command input from personal computer
・Saving/loading controller memory contents to/from personal computer
etc.
Hardware Personal computer running Microsoft Windows with an Intel 80486 or CPU
OS Microsoft Windows 7/8/8.1/10
DELL PRECISION M6600 (Windows 7)
Confirmed
Sony VAIO Fit 13A (Windows 8)
operation
Sony VAIO Duo 13 (Windows 8.1)
models*
Sony VAIO Fit 13A (Windows 10)
1-12
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Install (copy) KRterm software provided by Kawasaki in the desired directory of your Windows PC.
After that, follow the instructions of installer.
After installation is complete, select KRterm icon with your mouse and double-click it. Then KRterm
starts and window screen appears.
1-13
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Register the robot controllers to be connected. Select [Com][Options] from the menu bar. In the
window that appears, enter the IP address and the name for the robot controllers on the network and
click <OK>.
1. Turn ON the controller. Do not initialize the controller. TELNET server function starts and the
robot controller is now waiting for connection from client personal computer.
2. Start KRterm.
Double-click on the KRterm icon. KRterm starts and a window appears. In this window, select
[Com] [Connect by List] from the menu bar.
1-14
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Select the IP address of the robot to be connected using the cursor keys. Click <OK>.
Personal computer tries to connect with the specified IP address. When the connection is successfully
established, login: appears following several other messages. Enter “as” after this message, and the
robot will return a prompt “>”.
When uploading or downloading teach data between personal computer and controller, enter
SAVE/LOAD monitor commands the same as in AS terminal.
1-15
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
After all operations are finished, abort the connection. Select [Com] [Disconnect] from the menu bar.
1.4.4.2 Menu
1.4.4.2.1 File
To save the characters displayed on screen as a log file, specify a file as above. (Default for extension
log files is .log.)
Exit
Terminates KRterm.
1-16
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1.4.4.2.2 Com(munication)
Connect by History
Displays connection history. Establishes connection with the selected settings.
Connect by List
The IP addresses and connection names registered in [Options] are displayed in a list.
Select the desired IP address and click <OK> to establish connection with that robot.
<OK>
Connects with the selected IP address.
<Cancel>
Terminates without making any connections.
Reconnect
Terminates the current connection and reconnect with the same settings.
Disconnect
Terminates connection.
1-17
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Options
Registers the IP address, port number and names of the robots on the network. Maximum of 256 robots
can be registered.
IP address
Enter the IP address of the robot to be connected.
Port No.
Port No.23 (to connect TELNET) is input by default.
Name
Enter the name (nickname) of the robot to be connected.
<Add>
Adds the entered IP address and name to the end of the list.
<Insert>
Inserts the IP address and name above the cursor.
<Edit>
Overwrites the selected IP address and name with new contents.
<Delete>
Deletes the selected IP address and name from the list.
1-18
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
<OK>
Overwrites contents and puts in effects all changes made to KRterm.INI and terminates the Option
screen.
<Cancel>
Terminates the screen without saving the changed contents. (KRterm.INI is not overwritten.)
1.4.4.2.3 View
Font
Selects the font of the characters used on the screen.
Screen
Set a number of scroll buffer and colors of screen background and text.
1.4.4.2.4 Help
Contents
Opens the table of contents for KRterm operation instructions.
About KRterm
Displays KRterm version information.
The vertical scroll bar appears when the data exceeds the number of rows in the screen. Maximum of
1000 for KRterm rows can be displayed using the scroll bar.
1-19
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Example
[192.168.0.2:robot]
The current client is shown in the format [client IP address: name]. When no connection is established,
nothing is displayed here.
[C:KawasakiRobot¥KRterm]
If only the file name is specified in AS language LOAD/SAVE command, the data will be saved/loaded
to/from this directory. The directory can be changed through [Menu] [File] [Set Current Folder].
[Logging Now]
This is displayed while the screen data is being saved to the log file.
1-20
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
When connection is aborted during an execution of a monitor command, that command (e.g. EDIT)
should first be terminated in the robot controller using ABORT.
Do not disconnect from the personal computer side until the command has been executed. If you have
disconnected by mistake, immediately re-connect and check if that command was executed properly.
When the connection is aborted from the robot side (i.e. the OS displays a disconnection message),
KRterm automatically cuts off connection. If it does not cut off automatically, manually disconnect
KRterm.
AS commands FDIRECTORY, FDELETE, FORMAT are not supported in KRterm. (Use Windows
Explorer to perform such operations.)
1-21
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Because more than one robot is connected to the network, there is the chance that a wrong robot data
may be loaded to the robot. Also, data from a wrong robot may overwrite a saved file.
To avoid this, KRterm checks if the data is correct before loading. At the beginning of the data, the IP
address data is stored when saving the file. (See line starting with .NETCONF below).
.***********************************************************************************************************************************************
.*=== AS GROUP === : ASF_01000000C 2017/01/30 22:49
.*USER IF AS : UASF01000000C 2017/01/30 22:49
.*USER IF TP : UTPF01000000C 2017/01/30 22:48
.*ARM CONTROL AS : AASF01000000C 2017/01/30 22:48
.*USER IF AS MESSAGE FILE : MASF010000CEN 2017/01/30 22:41
.*USER IF TP MESSAGE FILE : MTPF010000CEN 2017/01/30 22:41
.*ARM DATA FILE : ARMF01000000C 2017/01/30 22:48
.*KERNELL : _KNL300300000 2017/01/24
.*DRIVER : _DRV300400000 2017/01/24
.*RFS : _RFS300500300 2017/01/24
.*=== SERVO GROUP === : SVF_01000000C 2017/01/20 10:03
.* ARM CONTROL SERVO : SVSF01000000C 2017/01/20 10:01
.* SERVO DATA FILE : SVPF01000000C 2017/01/20 10:03
.* ARM CONTROL SERVO FPGA : SVFF010000006 2016/10/27 10:37
.*
.*Cpu board type : 2AA
.*Controller ID : 001
.*CFast : 2GB SATA Flash Drive FF36076A1B0806095692
.*FB1 Port :
.*FB2 Port :
.*FIELDBUS : _FBS300200000 2017/01/30
.*=== WEB SERVER === : WEB server is not running.
.* [Shipment setting data]
.* There is no Shipment setting data.
.**********************************************************************************************************************************************
.NETCONF 192.168.0.2,"fcon",255.255.255.0,192.168.0.254,0.0.0.0,0.0.0.0,""
.NETCONF2 192.168.11.2,255.255.255.0,0.0.0.0
.ROBOTDATA1
ZROBOT.TYPE 30 13 6 1 -751 RS010N-A001 ( 2017-01-30 23:47 )
ZSYSTEM 1 5 1 -106
ZLINEAR 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 179
CONT_CODE 701 -10516
ZZERO 268431437 268433832 268432605 268430390 268431772 268431133 268435456 268435456 268435456 268435456
268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 537194416
1-22
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
KRterm checks if the IP address in the line beginning with .NETCONF is the same as the IP address of
the robot controller. If they are not the same, KRterm asks whether loading should be continued or not.
Check if the data is correct and enter 9 to continue, and 0 to terminate.
1-23
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
The following instructions enable data communication between robot controller and computer system
via Ethernet UDP/IP protocol.
Example
Keyword Parameter
Always enter a space between the keyword and the first parameter.
1-24
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
UDP_SENDTO variable for returned value, IP address array variable, port number,
character string variable array for sending data,
number of elements, timeout
Function
Sends data string based on UDP protocol. The data to be sent is specified in a character string variable
array. This instruction creates socket, sends data and closes socket in one sequence. If communication
error occurs, the error code is stored in the returned value storage variable and program execution does
not stop.
Parameter
Variable for returned value
· Specifies variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.5.1 for details on communication error codes.
Port number
· Specifies the port number that indicates the channel of the other end of the connection (process). The
socket is bound to this port number.
· Acceptable range is 8192 to 65535, otherwise error occurs.
1-25
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Number of elements
· Specifies the number of elements to send in the character string variable array.
· These array elements are sent to the recipient in order of index number.
Timeout
· Specifies the time (seconds) to wait before outputting timeout error when connection is not established.
Default is 1 second.
· When a timeout error occurs, the error code is stored in the returned value storage variable.
· Timeout error does not stop AS program execution.
Example
Increasing the count whenever robot operation is performed.
.PROGRAM pg1
:
Motion instructions
:
count = count + 1
$cnt[0]=$ENCODE(/D,count)
CALL send(.$cnt[])
.END
1-26
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
UDP_RECVFROM variable for returned value, port number, character string
variable array for received data, number of elements, timeout,
IP address array variable, Max. number of bytes
Function
Receives and stores data in the character string variable array based on UDP protocol. This instruction
creates socket, receives data, and closes socket in one sequence. If a communication error occurs, the
error code is stored in the returned value storage variable, and program execution does not stop.
Parameter
Variable for returned value
· Specifies variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error. Error message is displayed only on the keyboard screen of teach pendant.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.5.1 for details on communication error codes.
Port number
· Specifies the port number that indicates the channel of the other end of the connection (process). The
socket is bound to this port number.
· Acceptable range is 8192 to 65535, otherwise error occurs.
Number of elements
· Sets the variable to substitute the number of elements in the received character string variable array.
· Should be specified as a variable.
1-27
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Timeout
· Specifies the time (seconds) to wait before outputting timeout error when connection is not established.
The default setting is 1 second.
· When a timeout error occurs, the error code is stored in the returned value storage variable.
· Timeout error does not stop AS program execution.
Example
1-28
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-29
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-30
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
The following program instructions are provided to allow data transmission between robot controller
and other computer systems via Ethernet TCP.
TCP_LISTEN ........ Program Instruction to start waiting for connection request (used by server-side to
start communication service)
Creates socket, binds it to the specified port number and waits for connection request to the socket. This
is used when robot controller is used as the server.
TCP_ACCEPT ........ Program Instruction to check connection request (used by server-side to start
communication service)
Checks if the specified port has received connection request for socket communication. This instruction
is completed when the specified port receives connection request.
Use TCP_ACCEPT after creating a socket using TCP_LISTEN. After connection is confirmed by this
command, use the TCP_SEND and TCP_RECV instructions below to send/receive data.
After connecting via TCP_CONNECT, use TCP_SEND and TCP_RECV instructions to send/receive
data to/from the server.
1-31
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Example
Keyword Parameter
1-32
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_LISTEN variable for returned value, port number
Function
Program Instruction to start waiting for connection request (used by server-side to start communication
service)
Creates socket, binds it to the specified port number, and waits for connection request to that socket. If
communication error occurs during execution, the error code is stored in the specified returned value
storage variable and program execution does not stop.
Parameter
Variable for returned value
· Specifies variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Port number
· Specifies the port number that indicates the channel of the other end of the connection. The socket is
bound to this port number.
· Acceptable range is 8192 to65535, otherwise error occurs.
1-33
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_ACCEPT variable for returned value, port number, timeout,
client IP address array variable
Function
Program Instruction to check connection request (used by server-side to start communication service)
Checks if the connection request for socket communication has been received by the specified port, and
if it has, establishes connection. Connection is completed when this instruction terminates normally. If
communication error occurs during execution, the error code is stored in the specified returned value
storage variable and program execution does not stop.
Parameter
Variable for returned value
· Sets the variable that stores the execution results.
· Socket ID number (0 or more) is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Port number
· Specifies the port number currently waiting for connection request.
· It is necessary to make the port in connection request waiting condition by TCP_LISTEN instruction
before specifying the port number.
Timeout
· Specifies the time (seconds) to wait before outputting timeout error when connection is not established.
Default is 1 second. Acceptable range is 1 to 60, otherwise error occurs. If not specified, 1 is assumed.
· When a timeout error occurs, the error code is stored in the returned value storage variable.
· Timeout error does not stop AS program execution.
1-34
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Example
IP address is stored in the array variable elements ipa[0] through ipa[3], when the connection is
established with computer “192.168.0.3.”
ipa[0] : 192
ipa[1] : 168
ipa[2] : 0
ipa[3] : 3
1-35
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_CONNECT variable for returned value, port number,
server IP address array variable, timeout
Function
Program Instruction to request connection (Used by client-side to start communication service)
Creates socket and binds to the specified port number. Then, connection request is sent to the specified
node of the IP address of the server, and connection is established.
If communication error occurs during execution, the error code is stored in the specified returned value
storage variable and program execution does not stop.
Parameter
Variable for returned value
· Specifies variable that stores the execution results.
· Socket ID number (0 or more) is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication error occurs (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Port number
· Specifies the port number that indicates the channel of the other end of the connection (process). The
socket is bound to this port number.
· Acceptable range is 8192 to65535, otherwise error occurs.
Timeout
· Specifies the time (seconds) to wait before outputting timeout error when connection is not established.
Default is 1 second. Acceptable range is 1 to 60, otherwise error occurs. If not specified, 1 is assumed.
· When a timeout error occurs, the error code is stored in the returned value storage variable.
· Timeout error does not stop AS program execution.
1-36
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Example
IP address is stored in the array variable elements ipa[0] through ipa [3], when the connection is
established with computer “192.168.0.3.”
ipa[0] : 192
ipa[1] : 168
ipa[2] : 0
ipa[3] : 3
1-37
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_SEND variable for returned value, socket ID number,
character string variable array for sending data, number of elements,
timeout
Function
Program Instruction to send data
Sends data based on TCP protocol. The data to be sent is specified as character string variable array.
If communication error occurs, the error code is stored in the returned value storage variable and
program execution does not stop.
Parameter
Variable for returned value
· Sets variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Socket ID number
· Specifies the socket ID number obtained by TCP_ACCEPT or TCP_CONNECT instruction.
Number of elements
· Specifies the number of elements to send in the character string variable array.
· The specified number of elements is sent to the recipient in order of index number.
1-38
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Timeout
· Specifies the time (seconds) to wait before outputting timeout error when connection is not established.
Default is 1 second. Acceptable range is 1 to 60, otherwise error occurs. If not specified, 1 is assumed.
· When a timeout error occurs, the error code is stored in the returned value storage variable.
· Timeout error does not stop AS program execution.
1-39
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_RECV variable for returned value, socket ID number,
character string variable array for received data, number of elements,
timeout, max. number of characters
Function
Program instruction to receive data
Receives data based on TCP protocol, and stores it in the specified character string variable array.
If communication error occurs, the error code is stored in the returned value storage variable and
program execution does not stop.
Parameter
Variable for returned value
· Specifies variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Socket ID number
· Specifies the socket ID number obtained by TCP_ACCEPT or TCP_CONNECT instruction.
Number of elements
· Sets the variable to substitute the number of elements in the received character string variable array.
· Should be specified as a variable.
1-40
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Timeout
· Specifies the time (seconds) to wait before outputting timeout error when connection is not established.
Default is 1 second. Acceptable range is 1 to 60, otherwise error occurs. If not specified, 1 is assumed.
· When a timeout error occurs, the error code is stored in the returned value storage variable.
· Timeout error does not stop AS program execution.
Example
When character string “abcdefghijklmnopqrstuvwxyz” is received, this data is stored in array elements
$recv_dt[0] through $recv_dt[3] of the received data storage character string variable array as shown
below. The number of elements is specified as “rcv_cnt,” and the maximum number of characters in the
element is specified as 10.
$recv_dt[0]:”abcdefghij”
$recv_dt[1]:”klmnopqrst”
$recv_dt[2]:”uvwxyz”
rcv_cnt :3
1-41
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_CLOSE variable for returned value, socket ID number
Function
Program Instruction to abort connection (Used to terminate communication service)
Cuts off connection for socket communication and closes socket. If communication error occurs, the
error code is stored in the returned value storage variable, and program execution does not stop.
When TCP_CLOSE execution is stopped by communication error etc., the connection may not be
completely disconnected. In this case, execute TCP_CLOSE instruction again. This will internally
shutdown (force CLOSE) the connection.
Parameter
Variable for returned value
· Sets variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Socket ID number
· Specifies the socket ID number obtained by TCP_ACCEPT or TCP_CONNECT instruction.
1-42
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_END_LISTEN variable for returned value, port number
Function
Program Instruction to abort connection
Ends waiting for connection request on the socket specified by TCP_LISTEN and closes that socket. If
communication error occurs, the error code is stored in the returned value storage variable, and program
execution does not stop.
Parameter
Variable for returned value
· Specifies variable that stores the execution results.
· 0 is stored when execution completes normally.
· Error code is stored when communication error occurs. However, program execution does not halt at
communication error.
· Error code is not stored when non-communication errors occur (e.g. parameter error). In this case, the
program execution results in error and stops.
· See 1.6.1 for details on communication error codes.
Port number
· Specifies the socket currently waiting for connection request (socket specified in TCP_LISTEN
instruction).
1-43
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Program Instruction
TCP_STATUS variable for returned value, port number, socket-ID-array,
error-code-array, sub-error-code-array, IP_address-array
Function
Stores to the specified array variables, the status of the sockets used in the TCP communication
instructions. Data are stored in order of sockets ID No., as controlled within the robot controller. The
data with the same array number in each parameter are data from same socket.
When there is an error in the parameter, the program execution stops.
Parameter
Variable for returned value
· Stores the number of sockets used.
· The data is not stored when there is an error in the parameter.
Port number
· Stores the port numbers of the sockets used.
· Only stores data generated by TCP_LISTEN, TCP_CONNECT instructions. The data for the socket
generated by TCP_ACCEPT instruction is stored as “0.”
Socket-ID-array
· Stores the socket ID of the socket in use.
Error-code-array
· Stores the error codes for the communication errors that occurred recently.
· These may include internal controller TCP/IP error codes not explained in 1.6.1.
Sub-error-code-array
· Stores the description codes for the error codes (not open to the public).
IP_address-array
· Stores the IP address of the connected device in character string.
Example: 192.168.0.1
· Only stores data generated by TCP_ACCEPT, TCP_CONNECT instructions. The data for the socket
generated by TCP_LISTEN instruction is stored as “0.0.0.0.”
1-44
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Example
When the following instructions are executed in the above condition, the data is stored as below.
TCP_STATUS sock_cnt,port_no[0],sock_id[0],err_cd[0],sub_cd[0],$ip_adrs[0]
sock_cnt : 4
port_no[0] : 8192
port_no[1] : 0
port_no[2] : 49152
port_no[3] : 49153
sock_id[0] : 1
sock_id[1] : 2
sock_id[2] : 3
sock_id[3] : 4
err_cd[0] : 0
err_cd[1] : 0
err_cd[2] : 0
err_cd[3] : -21670
sub_cd[0] : 0
sub_cd[1] : 0
sub_cd[2] : 0
sub_cd[3] : 90
$ip_adrs[0] : 0.0.0.0
$ip_adrs[1] : 192.168.0.2
$ip_adrs[2] : 192.168.0.5
$ip_adrs[3] : 192.168.0.4
1-45
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
The following errors may be detected during execution of socket communication instructions, but will
not stop the execution of the program*. All errors are recorded in the error log.
NOTE* Program execution halts if error occurs when the controller is in the middle of processing
TCP_ACCEPT.
1-46
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-47
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-48
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-49
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-50
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-51
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-52
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
The functions below are provided to enable saving/loading of robot data using the FTP Client Function
via Ethernet connection between the robot controller and an external computer system.
[NOTE]
Enable server function in “Aux.0815: FTP Sever Setting” otherwise, [2: FTP Server]
in the device list cannot be selected in Aux.0213 and 0210.
1-53
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Sets the items below for the robot controller by “Aux. 0812 Network Setting.” The data below is saved
or loaded as robot data.
Sets the items below for the FTP server by “Aux. 0815 FTP Server Setting.” The set data is saved or
loaded as auxiliary data.
1-54
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-55
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Through the FTP server, data and programs in memory are stored into a file in the directory specified by
path in “Aux. 0815 FTP Server Setting.”
In the screen below, select the type of data to be saved by cursor or the function number.
1-56
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
[NOTE]
<Limit on the number of characters that can be used for file names in the FTP server>
The maximum number of characters in a file name is 60 when saving the file. However, in
some Windows FTP server, only 8 characters are displayed and the rest of the characters may
appear as (~). Name files with 8 characters or less when using this kind of server.
Loads data stored in file units in the directory specified by Path in “Aux. 0815 FTP Server Setting” to
memory.
In the screen below, enter the file name. Then, select loading method, all data or specified data only, in
the screen below by function number or cursor.
1-57
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Displays the list of names of files stored in the directory specified by path in “Aux 0815 FTP Server
Setting.”
Auto-saving is a function that automatically saves data from the robot controller to the remote host daily
at a specified time and by a specified procedure.
Set the procedure for the execution of autosaving. Data below is saved/loaded as auxiliary data.
1-58
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
Data is automatically saved to the directory specified by path in “Aux. 0815 FTP Server Setting” under
the conditions set in “Aux. 0210 Autosave Configuration.” Processing conditions are indicated below.
(2) Start autosaving on the specified day of the week at the specified time.
Start autosaving process on only specified day of the week at the specified time.
1-59
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
[2.All data (Only Selected Program)] or [3. Program] is selected, boxes are displayed to select programs
on the right side of the Specified Program.
1-60
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1.7.3 Communication Error Codes which Occur with the FTP Client Function
Even if troubles relating to the save/load function by the FTP function are detected, these are not errors,
only a warning is displayed. However, the communication errors are recorded in the error log. Errors are
detected in the following cases.
1-61
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-62
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-63
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-64
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-65
F Series Controller 1 TCP/IP Communication Function
Kawasaki Robot Communication Option Manual
1-66
F Series Controller
Kawasaki Robot Communication Option Manual
2
Bluetooth
Communication
Function
2-1
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
Robot controller
Tablet
The Bluetooth communication function of F series controller supports the standards shown below.
2-2
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
! CAUTION
・ See the Bluetooth adapter user manual for instructions other than how to install
a Bluetooth adapter to the controller.
2-3
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
The installation method differs depending on the type of the Bluetooth adapter.
The following describes how to install a tested Bluetooth adapter to the controller.
1. LM506
Insert a Bluetooth adapter into one of the four USB connectors. The USB connectors on the
controller are located as shown below.
Front Rear
2-4
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
2. Parani-UD100
Parani-UD100 cannot be inserted into the USB connector (2 ports) on the front side of the controller.
It can be installed into the USB connector on the rear side of the controller or inside the controller,
requiring a mounting plate and a cable.
CPU board
Bluetooth adapter
mounting plate Push rivet
Push rivet
2) Connect the Bluetooth adapter to the USB connector with a cable, and fix the Bluetooth
adapter to the mounting plate with a tying band.
Tying band
(Use the hole in the
mounting plate to fix
it.)
USB cable
Bluetooth
adapter
2-5
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
(2) Installing into the USB connector on the rear side of the controller
1) Refer to the figure below to fix the Bluetooth adapter mounting plate at a predetermined
location with two screws.
Bluetooth adapter
mounting plate
Screw
Screw
Rear
Bluetooth adapter
Screw
mounting plate
Screw
Top view of the rear unit main body with enclosed structure
2) Connect the Bluetooth adapter to the USB connector #3 on the rear side of the controller
with a cable, and fix the Bluetooth adapter to the mounting plate with a tying band.
2-6
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
Bluetooth
adapter
Top view of the rear unit main body with enclosed structure
2-7
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
The following Bluetooth-related setting items are available on the robot controller. The robot controller
can be used with the default settings. Change the settings as necessary.
[NOTE]
If multiple robot controllers with a built-in Bluetooth adapter are used in the
vicinity, incorrect controller connection can occur. To prevent this, specify a
different host name for each controller.
2-8
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
IP address
Set an IP address of the robot controller for establishing a Bluetooth network connection.
Specify the IP address and the subnet mask in [Aux. 081203 Bluetooth Setting].
The default for IP address is 10.1.2.3, and for subnet mask 255.255.255.0.
Login account
Set a login account name for remote access with KRterm.
Specify the login account name in [Aux. 081202 Login Account Setting].
The default is “as.”
[NOTE]
The Bluetooth for the robot controller does not have a password authentication
function. Restrict access to KRterm to deny unauthorized access to the robot
controller.
2-9
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
Perform the pairing process (only at the initial setting) and the network connection setup process (every
time) on the external devices (personal computer, tablet, etc.).
An example of a Windows PC is shown below.
Pairing Procedure
First, enable the Bluetooth device on the Windows PC to be connected.
2-10
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
3. After the device name is displayed, select the robot controller to be used and click <Next>.
The selected robot controller will appear with the character string specified in the [Host Name] box
in [Aux. 081201 Ethernet Port Setting].
2-11
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
2-12
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
6. Click the paired device, and then click [Connect using] → [Access point].
Finally, the following window appears to indicate that the Bluetooth network connection has been
successfully established.
Now, you can access the robot controller using the IP address specified in [Aux. 081203 Bluetooth
Setting].
2-13
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
2. Click the paired device, and then click [Connect using] → [Access point].
Finally, the following window appears to indicate that the Bluetooth network connection has been
successfully established.
Now, you can access the robot controller using the IP address specified in [Aux. 081203 Bluetooth
Setting].
2-14
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
1. Start KRterm. Select [Menu] → [Com] → [Options]. Enter the IP address set in [Aux. 081203
Bluetooth Setting] in the [IP Address] box, “23” in the [Port No] box, and a character string in the
[Name] box. Click <OK>.
2-15
F Series Controller 2 Bluetooth Communication Function
Kawasaki Robot Communication Option Manual
When the connection is successfully established, a message “login:” appears following several other
messages. Enter the value set in [Aux. 081202 Login Account Setting].
2-16
F Series
Communication Option Manual