Serial_Read_Write_manual.pdf
(
516 KB
)
Pobierz
Deckblatt-P10.98
SOFTWARE
KR C...
CREAD CWRITE
Release 4.1
CREAD CWRITE R4.1 07.02.00 en
1of 42
e
Copyright
KUKA Roboter GmbH
This documentation or excerpts therefrommay not be reproduced or disclosed to third parties without the express permission of the publishers.
Other functions not described in this documentation may be operable in the controller. The user has no claim 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 described. Nevertheless, discrepancies
cannot be precluded, for which reason we are not able to guarantee total conformity. The information in this documentation is checked on a
regular basis, however, and necessary corrections will be incorporated in subsequent editions.
Subject to technical alterations without an effect on the function.
PD Interleaf
CREAD CWRITE R4.1 07.02.00 en
2of 42
Contents
1 General
.........................................................
5
1.1 Areas of application
............................................................
5
.....................................................................
1.3 Hardware prerequisites
5
.........................................................
5
1.4 Application in SUB and SRC programs
............................................
6
1.5 Overview of commands
.........................................................
6
1.5.1 CHANNEL
....................................................................
6
1.5.2 COPEN
......................................................................
6
.......................................................................
1.5.4 CWRITE
6
......................................................................
6
1.5.5 CCLOSE
.....................................................................
6
.......................................................................
1.5.7 SWRITE
6
......................................................................
1.6 Typographical conventions
6
......................................................
6
2 Configuration
....................................................
7
...............................................
2.1.1 Assignment of a serial channel to the KR C2
7
.......................................
7
2.1.1.1 Interface definitions in the file SERIAL.INI
.........................................
7
2.2 State and mode information
.....................................................
9
3 Commands
......................................................
11
3.1 CHANNEL
....................................................................
11
.......................................................................
3.1.2 Definition, description
11
...........................................................
3.1.3 Example: Assignment of a channel name to a physical channel
11
......................
11
3.2 COPEN
......................................................................
12
.......................................................................
3.2.2 Definition, description
12
...........................................................
12
3.2.3 Example
......................................................................
12
3.3 CREAD
.......................................................................
13
.......................................................................
3.3.2 Definition, description
13
...........................................................
14
3.4 CWRITE
......................................................................
18
.......................................................................
3.4.2 Definition, description
18
...........................................................
19
.....................................................................
3.4.3.1 Conversion of an integer value into decimal and hexadecimal notation
22
................
22
.........................................
3.4.3.3 Writing of the first 5 array elements of an array
22
.....................................
3.4.3.4 Output of values of all array elements of an array
22
..................................
22
........................................
3.4.3.6 Writing of the first 50 elements of a character string
22
................................
3.4.3.7 Conversion of the ENUM constants into ASCII format
22
...............................
23
CREAD CWRITE R4.1 07.02.00 en
3of 42
1.2 Operation
1.5.3 CREAD
1.5.6 SREAD
2.1 Configuration of the serial interface
3.1.1 Syntax
3.2.1 Syntax
3.3.1 Syntax
3.4.1 Syntax
3.4.3 Examples
3.4.3.2 Writing an integer value in binary notation
3.4.3.5 Output of the first initialized array elements
CREAD CWRITE
3.4.3.8 Writing of two real values with text
...............................................
23
3.4.3.9 Writing to the command channel
.................................................
23
3.5 CCLOSE
.....................................................................
24
.......................................................................
3.5.2 Definition, description
24
...........................................................
24
3.5.3 Example
......................................................................
24
3.6 SREAD
.......................................................................
25
.......................................................................
3.6.2 Definition, description
25
...........................................................
26
3.6.3 Example
......................................................................
26
3.7 SWRITE
......................................................................
27
.......................................................................
3.7.2 Definition, description
27
...........................................................
27
.....................................................................
3.7.3.1 Copy the content of the variable HUGO into the variable BERTA
29
.....................
29
3.7.3.2 Use of formatting characters
.....................................................
29
.....................................................................
3.9 Example program for using COPEN, CWRITE, CREAD and CCLOSE
30
................
31
4 Procedure 3964R and Xon/Xoff protocol
...........................
33
4.1 Procedure 3964R
..............................................................
33
4.1.1 Procedure data
................................................................
33
..................................................................
4.1.1.2 Procedure parameters
33
..........................................................
4.1.1.3 Variable specifications for procedure 3964R
34
.......................................
34
.........................................
4.1.1.5 Procedure 3964R settings in the file SERIAL.INI
34
...................................
35
4.1.2 Transmission with procedure 3964R
..............................................
35
4.1.2.1 Establishing the connection
.....................................................
35
4.1.2.2 Sending information
............................................................
35
.............................................................
4.1.3 Receiving with procedure 3964R
36
.................................................
36
.................................................................
4.1.3.2 Receiving information
36
...........................................................
36
4.1.3.3 KR C2 receives data
...........................................................
37
4.1.4 Initialization conflicts
...........................................................
37
4.2 Xon/Xoff protocol
..............................................................
38
5 Serial interfaces
.................................................
39
........................................................
5.2 Connector pin allocation for Sub--D, 9 pins
39
........................................
40
6 Appendix
........................................................
41
6.1 ASCII character map
...........................................................
41
CREAD CWRITE R4.1 07.02.00 en
4of 42
3.5.1 Syntax
3.6.1 Syntax
3.7.1 Syntax
3.7.3 Examples
3.8 Diagnosis
4.1.1.1 Bit sequence
4.1.1.4 Fixed specifications for procedure 3964R
4.1.2.3 KR C2 sends data
4.1.3.1 Rest condition
5.1 Sub--D connector, 9 pins
1 General
1 General
“CREAD / CWRITE” describes the logical combination of symbolic interface names with
predefined signal variables for serial interfaces as well as the declaration of signal names
for input and output channels (CHANNEL), and how to open input and output channels
(COPEN), read data from open channels (CREAD), write data to channels (CWRITE) and
close channels (CCLOSE).
1.1 Areas of application
About 95% of CREAD/CWRITE applications are in the field of serial sensor systems.
Examples include vision systems, barcode scanners and MeasureTech.
Command channel applications, e.g. automatic systemstart withCELL.SRC, account for the
other 5%.
1.2 Operation
In order to be able to access a channel, it must be declared in the “CHANNEL” declaration.
In the KR C2, the three serial interfaces COM1, COM2 and COM3 are declared by default
as SER_1, SER_2 and SER_3 in the file “$CUSTOM.DAT”.
Each channel must be opened by means of the “COPEN” statement before it can be used.
The “CREAD” statement can be used to read the channel, while the “CWRITE” statement
is used to write to the channel.
The channel is closed with the “CCLOSE” statement.
1.3 Hardware prerequisites
Depending on the type of controller and the motherboard installed, the following COM ports
are available for the serial communication of the robot (VxWorks):
KR C1
KR C2
with motherboard
SuperMicro 370SBA
KR C2
with motherboard
Soyo SY--7VBA
133u
COM1
X
--
--
COM2
X
(X)
--
COM3
--
X
X
X
Port can be configured for robots.
--
Port cannot be configured for robots.
(X)
Port can be configured for robots if two ports are required simultaneously.
In the case of applications with the KR C2 controller, it may be necessary to deactivate the
mouse drivers via the Windows Control Panel, as the serial data exchange may not run
smoothly otherwise.
CREAD CWRITE R4.1 07.02.00 en
5of 42
Plik z chomika:
maruda.master
Inne pliki z tego folderu:
KRL Reference Guide v4_1.pdf
(1021 KB)
Expert_Programming_manual.pdf
(3211 KB)
Serial_Read_Write_manual.pdf
(516 KB)
gripperspottech_r21_en.pdf
(736 KB)
System_Variables_manual.pdf
(655 KB)
Inne foldery tego chomika:
Zgłoś jeśli
naruszono regulamin