logo资料库

Kuka_CREAD-CWRITE.pdf

第1页 / 共57页
第2页 / 共57页
第3页 / 共57页
第4页 / 共57页
第5页 / 共57页
第6页 / 共57页
第7页 / 共57页
第8页 / 共57页
资料共57页,剩余部分请下载后查看
CREAD/CWRITE
1 Introduction
1.1 Target group
1.2 Robot system documentation
1.3 Representation of warnings and notes
Safety
Notes
2 Description of functions
Functions
Example
3 Communication channels
3.1 Communication via a serial interface
Description
Configuration
Overview
3.2 Communication via external modules
Description
Configuration
Overview
3.3 Communication via the command channel
Description
Configuration
Overview
4 Configuring the serial interface
4.1 Overview of configuration of the serial interface
4.2 Assigning the serial interface to the operating system
Description
File
4.3 Configuring the serial interface
File
Parameter
4.4 Configuring the 3964R procedure
File
Parameter
4.5 Configuring the Xon/Xoff protocol
Description
File
Parameter
4.6 Displaying sent/received data with Telnet
Precondition
Procedure
Example
4.7 3964R procedure
4.7.1 3964R procedure sends data
Overview
Description
4.7.2 3964R procedure receives data
4.7.3 Initialization conflict
5 Configuring the external modules
File
Parameter
6 Programming
6.1 Programming overview
6.2 Symbols and fonts
6.3 CHANNEL
Function
Syntax
Description
Example
6.4 COPEN
Function
Syntax
Description
6.5 CREAD
Function
Syntax
Description
Read mode
Reading with interrupts
6.6 CWRITE
Function
Syntax
Description
Write mode
6.7 CCLOSE
Function
Syntax
Description
6.8 CIOCTL
Function
Syntax
Description
6.9 SREAD
Function
Syntax
Description
6.10 SWRITE
Function
Syntax
Description
6.11 CAST_TO
Function
Syntax
Description
6.12 CAST_FROM
Function
Syntax
Description
6.13 Permissible data types in CAST statements
6.14 "State" variable
6.14.1 Structure type STATE_T
Description
CMD_STAT RET1
INT MSG_NO
INT HITS
INT LENGTH
6.14.2 Return values for the variable "RET1"
Description
CREAD
CWRITE
SREAD/SWRITE
CCLOSE
6.15 "Format" variable
6.15.1 "Format" variable for CREAD/SREAD
6.15.2 "Format" variable for CWRITE/SWRITE
Element F
Element W
Element G
Element U
6.15.3 Conversion characters
6.15.4 Which format for which variable?
Procedure
Description
CREAD/SREAD
CWRITE/SWRITE
6.15.5 Conversion examples
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
7 Example programs
7.1 Serial interface: sending and receiving position data
7.1.1 Sending position data
Main program
Subprograms
7.1.2 Receiving position data
Main program
Subprograms
7.2 Serial interface: outputting the date
Data list
SRC file
7.3 External module: calling a function by means of LD_EXT_FCT
7.4 Command channel: starting, stopping and deselecting a program
7.5 Combining CREAD/CWRITE with CAST statements
Example 1
Example 2
8 Appendix
8.1 File paths
8.2 Hardware requirements
Cables
Connector pin allocation
9 KUKA Service
9.1 Requesting support
Introduction
Information
9.2 KUKA Customer Support
Availability
Index
KUKA Robot Group Communication CREAD/CWRITE Programming CREAD/CWRITE and related statements For KUKA System Software (KSS) 5.4, 5.5, 7.0 Issued: 19.06.2007 Version: 1.3 V1.3 19.06.200
CREAD/CWRITE © Copyright 2007 KUKA Roboter GmbH Zugspitzstraße 140 D-86165 Augsburg Germany This documentation or excerpts therefrom may not be reproduced or disclosed to third parties without the express permission of the KUKA ROBOT GROUP. Other functions not described in this documentation may be operable in the controller. The user has no claims to these functions, however, in the case of a replacement or service work. We have checked the content of this documentation for conformity with the hardware and software de- scribed. Nevertheless, discrepancies cannot be precluded, for which reason we are not able to guaran- tee total conformity. The information in this documentation is checked on a regular basis, however, and necessary corrections will be incorporated in the subsequent edition. Subject to technical alterations without an effect on the function. KIM-PS4-DOC V0.4 22.03.200 6 pub de 2 / 57 V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en
Contents Contents Introduction ...................................................................................................... 1 Target group ................................................................................................................... 1.1 Robot system documentation ......................................................................................... 1.2 Representation of warnings and notes ........................................................................... 1.3 Description of functions .................................................................................. 2 Communication channels ............................................................................... 3 Communication via a serial interface .............................................................................. 3.1 Communication via external modules ............................................................................. 3.2 Communication via the command channel ..................................................................... 3.3 Configuring the serial interface ...................................................................... 4 4.1 Overview of configuration of the serial interface ............................................................. 4.2 Assigning the serial interface to the operating system ................................................... Configuring the serial interface ....................................................................................... 4.3 Configuring the 3964R procedure ................................................................................... 4.4 4.5 Configuring the Xon/Xoff protocol ................................................................................... Displaying sent/received data with Telnet ...................................................................... 4.6 3964R procedure ............................................................................................................ 4.7 4.7.1 3964R procedure sends data .................................................................................... 3964R procedure receives data ................................................................................. 4.7.2 4.7.3 Initialization conflict .................................................................................................... Configuring the external modules .................................................................. 5 Programming .................................................................................................... 6 Programming overview ................................................................................................... 6.1 6.2 Symbols and fonts .......................................................................................................... CHANNEL ....................................................................................................................... 6.3 COPEN ........................................................................................................................... 6.4 6.5 CREAD ........................................................................................................................... CWRITE .......................................................................................................................... 6.6 CCLOSE ......................................................................................................................... 6.7 6.8 CIOCTL ........................................................................................................................... 6.9 SREAD ........................................................................................................................... 6.10 SWRITE .......................................................................................................................... 6.11 CAST_TO ....................................................................................................................... 6.12 CAST_FROM .................................................................................................................. 6.13 Permissible data types in CAST statements ................................................................... 6.14 "State" variable ............................................................................................................... 6.14.1 Structure type STATE_T ............................................................................................ 6.14.2 Return values for the variable "RET1" ....................................................................... 6.15 "Format" variable ............................................................................................................ "Format" variable for CREAD/SREAD ....................................................................... 6.15.1 6.15.2 "Format" variable for CWRITE/SWRITE .................................................................... Conversion characters ............................................................................................... 6.15.3 5 5 5 5 7 9 9 9 10 11 11 11 11 12 13 14 15 15 16 17 19 21 21 21 22 22 23 25 27 27 28 29 30 32 32 33 33 34 35 35 36 37 V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en 3 / 57
CREAD/CWRITE 6.15.4 Which format for which variable? ............................................................................... 6.15.5 Conversion examples ................................................................................................ Example programs ........................................................................................... 7 Serial interface: sending and receiving position data ..................................................... 7.1 7.1.1 Sending position data ................................................................................................ 7.1.2 Receiving position data .............................................................................................. Serial interface: outputting the date ................................................................................ 7.2 External module: calling a function by means of LD_EXT_FCT ..................................... 7.3 7.4 Command channel: starting, stopping and deselecting a program ................................. Combining CREAD/CWRITE with CAST statements ..................................................... 7.5 8 Appendix ........................................................................................................... File paths ........................................................................................................................ 8.1 Hardware requirements .................................................................................................. 8.2 9 KUKA Service ................................................................................................... Requesting support ......................................................................................................... 9.1 KUKA Customer Support ................................................................................................ 9.2 Index .................................................................................................................. 38 40 41 41 41 41 42 44 44 44 47 47 47 49 49 49 55 4 / 57 V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en
1. Introduction 1 Introduction 1.1 Target group This documentation is aimed at users with the following knowledge and skills: Advanced KRL programming skills Advanced knowledge of the robot controller system Advanced system knowledge of the controllers with which the KR C con- troller communicates For optimal use of our products, we recommend that our customers take part in a course of training at KUKA College. Information about the training pro- gram can be found at www.kuka.com or can be obtained directly from our subsidiaries. 1.2 Robot system documentation The robot system documentation consists of the following parts: Operating instructions for the robot Operating instructions for the robot controller Operating and programming instructions for the KUKA System Software Documentation relating to options and accessories Each of these sets of instructions is a separate document. 1.3 Representation of warnings and notes Safety Warnings marked with this pictogram are relevant to safety and must be ob- served. Danger! This warning means that death, severe physical injury or substantial material damage will occur, if no precautions are taken. Warning! This warning means that death, severe physical injury or substantial material damage may occur, if no precautions are taken. Caution! This warning means that minor physical injuries or minor material damage may occur, if no precautions are taken. Notes Notes marked with this pictogram contain tips to make your work easier or ref- erences to further information. Tips to make your work easier or references to further information. V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en 5 / 57
CREAD/CWRITE 6 / 57 V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en
2 Description of functions 2. Description of functions Functions Example CREAD and CWRITE are flexible statements which can be used to communi- cate between the robot controller and another controller. They can also be used for communication within the robot controller. CREAD reads data from a channel. CWRITE writes data to a channel. CREAD/CWRITE can be used for communication via the following channels: Serial interfaces (>>> 3.1 "Communication via a serial interface" page 9) External modules (>>> 3.2 "Communication via external modules" page 9) Communication via external modules is not possible in KSS 7.0. Command channel (CWRITE only) (>>> 3.3 "Communication via the command channel" page 10) The robot controller receives position data from another controller (e.g. from a camera system) at the serial interface. The robot controller uses CREAD to read these position data from the serial interface. V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en 7 / 57
CREAD/CWRITE 8 / 57 V1.3 19.06.2007 KSS-ED-CRCWR-54-55-70 en
分享到:
收藏