Kuka Profinet CP 1616: Kuka Robot Group Controller Option
Kuka Profinet CP 1616: Kuka Robot Group Controller Option
Kuka Profinet CP 1616: Kuka Robot Group Controller Option
Controller Option
Issued: 04.02.20
KUKA ProfiNet CP 1616
© Copyright 2008
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-PS5-DOC
V0.4
2 / 55
22.03.200
6 pub de Issued: 04.02.2008 Version: OP Profinet CP1616 V1 en
Contents
Contents
1 Introduction ...................................................................................................... 5
1.1 Target group ................................................................................................................... 5
1.2 Robot system documentation ......................................................................................... 5
1.3 Representation of warnings and notes ........................................................................... 5
1.4 Trade mark ..................................................................................................................... 5
1.5 Terms used ..................................................................................................................... 6
3 Installation ....................................................................................................... 11
3.1 System requirements ...................................................................................................... 11
3.2 Routing the data cables .................................................................................................. 11
3.3 Installing ProfiNet IO ....................................................................................................... 11
3.4 Updating ProfiNet IO ....................................................................................................... 12
3.5 Uninstalling ProfiNet IO .................................................................................................. 12
4 Configuration ................................................................................................... 13
4.1 Overview ......................................................................................................................... 13
4.2 Configure Profinet CP 1616 as Controller ...................................................................... 13
4.3 Configure KUKA Profinet CP 1616 as Device ................................................................ 15
4.4 Configure KUKA Profinet CP 1616 as Controller and as Device .................................... 16
4.5 Set IO-Routing/Transfer bit ............................................................................................. 17
4.5.1 Configuring a higher-level PC station ........................................................................ 17
4.5.2 Configuring PC station 2 ............................................................................................ 19
4.5.3 Configuring the transfer byte ..................................................................................... 20
4.5.4 Loading a configuration into the module .................................................................... 21
4.6 Configuring the pnioDrv.ini file ........................................................................................ 22
4.6.1 Example of analog input configuration in PNIODRV.INI ............................................ 23
4.7 Configuring the IOSYS.INI file ........................................................................................ 23
4.7.1 Example of analog input configuration in IOSYS.INI ................................................. 24
4.8 Install GSDML-file ........................................................................................................... 24
4.9 Configure I/O of the Controller ........................................................................................ 24
4.10 Configure I/O of the Device ............................................................................................ 26
4.11 Configuration of the external modules ............................................................................ 27
4.11.1 Description of the file io2krlDataDrv.ini ...................................................................... 27
4.11.2 Available commands/variables .................................................................................. 28
4.11.3 Details of the KRL-command function ....................................................................... 29
4.12 Transferring the configuration to the CP 1616 card ........................................................ 29
4.13 Decoupling devices (from Version 1.3 onwards) ............................................................ 30
4.13.1 Decoupling devices via HMI (from Version 1.3 onwards) .......................................... 30
4.13.2 Decoupling devices in KRL (from Version 1.3 onwards) ........................................... 31
4.14 Coupling devices (from Version 1.3 onwards) ................................................................ 32
4.14.1 Coupling devices via HMI (from Version 1.3 onwards) .............................................. 32
5 Example ............................................................................................................ 35
5.1 Example device configuration ......................................................................................... 35
5.2 Example controller I/O configuration ............................................................................... 36
5.3 KRL example for writing/reading of IO-driver .................................................................. 38
5.4 KRL example for interrupt-controlled READ of IO-driver with $Data_Ext_obj1/2 ........... 39
5.5 KRL example for use of cloCtl ........................................................................................ 40
6 Diagnosis .......................................................................................................... 41
6.1 LED-display PCI-Card CP 1616 ..................................................................................... 41
6.2 Diagnosis of the construction groups .............................................................................. 41
6.3 Diagnosis CP 1616 ......................................................................................................... 42
6.4 Display data with Telnet .................................................................................................. 42
6.5 Diagnosis of the modules installed in Robot Control ...................................................... 42
7 Repair ................................................................................................................ 43
7.1 Mount KUKA Profinet CP 1616 card ............................................................................... 43
7.2 Dismount KUKA Profinet CP 1616 card ......................................................................... 43
8 Appendix ........................................................................................................... 45
8.1 Offset-Table .................................................................................................................... 45
Index .................................................................................................................. 53
1 Introduction
This documentation is aimed at users with the following knowledge and skills:
Advanced KRL programming skills
Advanced knowledge of the robot controller system
Advanced knowledge of field buses
Knowledge of Siemens Step 7 software, Version 5.4, CP 1616 with
firmware 2.1
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.
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.
Term Description
Decoupling The ProfiNet controller (CP 1616) terminates
communication with the decoupled device.
Coupling The ProfiNet controller (CP 1616) recommences
communication with the decoupled device.
ANIN Analog input
ANOUT Analog output
CP 1616 Optional ProfiNet card for KR C2 edition05 robot
controller.
Configuration file The configuration file is a text file. It contains the
values of the parameters and settings.
pnioDrv.INI Configuration file for ProfiNet driver. Setting for
controller or device operation.
IOSYS.INI The file IOSYS.INI is the configuration file of the
I/O system. This is where the bus drivers are
activated and the inputs and outputs of the indi-
vidual bus devices are assigned.
GSDML Device file for ProfiNet devices.
MAC address Hardware address of every single network
adapter for unambiguous identification of the
device in the network.
Mapping Assignment of drive letters to directories.
Telnet Telnet is the name of a network protocol.
KCP The KCP (KUKA Control Panel) teach pendant
has all the functions required for operating and
programming the robot system.
PLC Programmable logic controller
Industrial Ethernet Ethernet is a data network technology for local
area networks (LANs). It allows the exchange of
data between the connected devices in the form
of data frames.
Subnet Exact specification of part of the IP address
space.
Subnet mask Separates an IP address into a network section
and a device section.
PM Power module. Required for power supply.
DI Digital input
DO Digital output
AN IN Analog input
AN OUT Analog output
Step 7 Configuration software from Siemens.
O_File Add-on file
WORD types 2 bytes
Swapping Swapping high and low bytes.
2 Product description
Description The CP 1616 is a PCI card for connecting PCs to Industrial Ethernet.
Connections
Item Connector Description
1 Infeed for external 6-9 V DC
power supply
2 Port 1 RJ45 port
3 Port 2 RJ45 port
4 Port 3 RJ45 port
5 Port 4 RJ45 port
LEDs The LEDs on the CP 1616 PCI card indicate the operating status and any
faults that may be present. (>>> 6.1 "LED-display PCI-Card CP 1616"
page 41)
Basic principle of The KRL-driver connects to the IO-driver through the CP 1616 functions of the
communication IO-system. This either provides asynchronous data or accepts these.
Overview
3 Installation
Laptop/PC Hardware:
PC Pentium 500 MHz with 256 MB RAM
CD-ROM drive
Software: Microsoft Windows 98SE, ME, XP
The Industrial Ethernet cables are routed to the devices from the controller
or from the switch using a star or ring topology.
From Version 1.3 onwards, the ProfiNet driver is exchanged. The configura-
tion in the pnioDrv.ini and IOSYS.INI files is not modified/expanded.
4 Configuration
4.1 Overview
For display reasons, the Step 7 software, Version 5.4, from Siemens should
not be installed on the robot controller.
Number Name
1 Slot 1 (Index 1) of the PC-Station
2 Device number
3 IP-Address
4 Device name
5 Order number
6 Diagnostic address
Number Name
7 Information field
8 Hardware catalog
For display reasons, the Step 7 software, Version 5.4, from Siemens should
not be installed on the robot controller.
The device name must be the same as the device name of the CP 1616 in
the PC-Station
During compiling the IP-address of the CP 1616 is allocated with the help of
the device name.
For display reasons, the Step 7 software, Version 5.4, from Siemens should
not be installed on the robot controller.
7.
Open Configuration by double-clicking.
The hardware configurator opens.
8. In the hardware catalog under SIMATIC PC-Station > select CP-Indus-
trial Ethernet > CP 1616
9.
Move CP 1616 by drag & drop from the hardware catalog to slot 1
(Index1) of the PC-Station.
10. Select menu sequence Edit > Object properties.
The dialog box Properties opens.
11. Activate the button Properties.
12. Under Subnet assign to the CP 1616 a network other than the CP 1616 in
the project "Use CP 1616 as Controller".
13. Confirm with OK .
14. In the dialog box Properties menu sequence Properties > PROFINET set
the operating mode of the CP 1616 to PROFINET IO-Controller and En-
able PROFINET IO-Device Operation
For display reasons, the Step 7 software, Version 5.4, from Siemens should
not be installed on the robot controller.
10.
Select CP 1616 V2.1 (PN V2.0).
11. Select the menu sequence Edit > Object properties.
The Properties dialog box is opened.
12. Press the Properties button.
13. Under Parameters, assign an Ethernet to the CP 1616 V2.1 (PN V2.0).
14. Confirm with OK.
15. In the hardware catalog, select PROFINET IO > I/O > SIMATEC PC-CP >
CP 1616 V2.1 > Migration.
16.
Configure the CP 1616 V2.1 from the ProfiNet hardware catalog by
means of Drag&Drop.
17.
Select CP 1616 V2.1. Select the menu sequence Edit > Object prop-
erties.
The Properties dialog box is opened.
18. Assign device name, Ethernet and IP address. Confirm with OK.
19. Select the menu sequence Station > Save and compile.
For display reasons, the Step 7 software, Version 5.4, from Siemens should
not be installed on the robot controller.
Procedure 1. Open the second PC station. Right mouse button > Open object.
Configuration is opened.
2.
Double-click to open Configuration.
The hardware configurator is opened.
3. In the hardware catalog, select SIMATIC PC Station > CP Industrial Eth-
ernet > CP 1616 > V2.1 (PN V1.0).
4.
Drag CP 1616 V2.1 (PN V1.0) from the hardware catalog to slot 1
(Index1) of the PC station by means of Drag&Drop.
5. Assign the CP 1616 V2.1 (PN V1.0) the same Ethernet, the same IP ad-
dress and the same device name as the CP 1616 configured for the high-
er-level PC station.
6.
Select CP 1616 V2.1 (PN V1.0).
7. Select the menu sequence Edit > Object properties.
The Properties dialog box is opened.
8. Press the Properties button.
9. Under Parameters, assign the CP 1616 V2.1 (PN V1.0) the same Ether-
net as the CP 1616 configured for the higher-level PC station.
10. Assign the same device name and IP address.
11. Confirm with OK.
12. A message window is opened. Confirm the message with Yes.
13.
Select CP 1616 C2.1 (PN V1.0). Select the menu sequence Edit >
Object properties.
The Properties dialog box is opened.
14. In the Properties dialog box on the ProfiNet tab, set the operating mode
of the CP 1616 V2.1 (PN 1.0) to PROFINET IO controller and set Enable
PROFINET IO device operation.
15. Confirm with OK.
16. Assign digital input and digital output (>>> 4.9 "Configure I/O of the Con-
troller" page 24)
Precondition The higher-level PC station and the second PC station are configured.
10. Set the end range of the number of bytes to be mapped. (>>> Fig. 4-7)
Description The pnioDrv.ini file is the configuration file for operation of the CP 1616 as a
controller and/or device under Windows.
From Version 1.3 onwards, the file pnioDrv.ini has been expanded to include
the section [OPTIONS].
This expansion is only loaded when installing the software for the first time. In
the case of an update, the expansion must be added manually to the file pni-
oDrv.ini.
4 [OPTIONS]
5 DEACTIVATED_DEVICES = ...
Designation Description
DEBUG = 1 With debugging tasks on the Telnet shell
DEBUG = 0 Without debugging tasks on the Telnet
shell
ENABLE- CP 1616 is operated as a controller
CONTROLLER = 1
ENABLE-
CP 1616 is not operated as a controller
CONTROLLER = 0
ENABLEDEVICE = 1 CP 1616 is operated as a device
ENABLEDEVICE = 0 CP 1616 is not operated as a device
DEACTIVATED_DEVIC From Version 1.3 onwards. Deactivates the
ES = x, x ... devices specified after "=".
Item Description
4, 5 Expansion from Version 1.3 onwards. Devices that are
specified after the "=" with a corresponding number are
not activated when the driver is started/reconfigured.
If this expansion is missing or if there are no values after
the "=", all configured devices that are also mapped in the
file IOSYS.INI are activated.
PNIODRV.INI
[CONFIG]
DEBUG = 1
ENABLECONTROLLER = 1
ENABLEDEVICE = 1
[ANIN]
ANIN1 = 514, 4, 0, 2, TRUE
ANIN2 = 514, 4, 2, 2, TRUE
[ANOUT]
...
[SWAP]
SWAPWORD_IN = 13,15
SWAPWORD_OUT = 4, 10, 12
[OPTIONS]
DEACTIVATED_DEVICES=
Only one SWAP section is permissible. Only WORD types can be swapped.
It is not possible to access more than 2 bytes. The sequence ANIN, ANOUT,
SWAP must be observed. The additional configuration in PNIODRV.INI must
match the configuration in IOSYS.INI exactly.
Designation Description
ANIN1 Analog input 1
ANOUT Analog output
514 Start address. Corresponds to the ProfiNet
configuration in Step 7.
4 Total width of the module.
0 Offset within the module.
2 Access width for further processing.
TRUE SWAP command. Swapping is carried out.
Description The file IOSYS.INI is the configuration file of the robot I/O system.
IOSYS.INI:
[DRIVERS]
PNET=26, pnioInit, PnetDrv.o
[PNET]
INB10 = 10,xx1
OUTB20 = 1,6,xx1
ANIN2 = 2,514,14,3,cal8000
IOSYS.INI Description
ANIN2 Analog input 2
2 Stands for bytes that are treated separately.
This must always be 2 for ANIN and ANOUT.
514 ProfiNet address
14 Number of bits with a bit for the sign.
3 Type
calxxxx Calibration factor for 10 V+
Description If a device is required, which is not contained in the library of Step 7, a GSDML
file is required from the manufacturer.
Procedure 1. Open the desired project in Step 7 PC Manager and change to the hard-
ware configurator.
2. Select menu sequence Extras > Install GSD-file.
The dialog box Install GSD-files opens.
3. Press the button Search and select the GSDML-file.
4. Activate the button Install.
5. Select menu sequence Extras > Update Catalog.
The GSDML-file is installed in the Hardware catalog.
The construction group projected in the PROFINET-IO system must have the
same order number as the installed construction group.
7.
Select PROFINET IO.
8. Desired IM151... > select.
9.
Select PM.
10. Select the desired PM.
The PM is placed on the slot 1 and assigned to IM151...
11. Select and highlight the desired DI slots.
12. Repeat steps 6 to 8.
13. Select DI.
14. Select the desired DI.
The DI is placed on the selected slot.
15. Select and highlight the desired DO slot.
16. Repeat steps 6 to 8.
17. Select DO.
18. Select the desired DO.
The DO is placed on the selected slot.
Position Description
1 IM151...
2 Sub-module slots for:
PM (Power Module)
DI (Digital Input)
DO (Digital Output)
3 Input-Address
4 Output-Address
5 Projected IM151...
What appears as output in the Step 7 software must be defined as input for
the robot control.
The position specifications 6 and 7 for the module result from the counting
method. Here, the top-most module is ignored, considered as 0. The count-
ing starts only with the second module = 1. (>>> 5.1 "Example device config-
uration" page 35)
Parameter O_FILE[]
In square brackets the path and the file name of the O-file must be entered,
e.g. B. DRIVERS\io2krlDataDrv.o.
O-Files always lie below the folder C:\KRC:\ROBOTER. This part of the path
need not be specified.
OPTION (Bit 0)
Bit 0 of OPTION defines, what happens to an external module in case of
CCLOSE. The setting is "Force unload".
Value Description
Bit 0 = 1 "Force unload" is active. CCLOSE closes the channel to
the module, the module is unloaded.
Bit 0 = 0 "Force unload" is not active. CCLOSE closes the channel
to the module. The module remains loaded. In case of a
future COPEN the module need not be reloaded.
OPTION (Bit 1)
Bit 1 of OPTION is relevant only for external modules of the type
LD_EXT_OBJ with inactive "Force unload". The setting is "Leave data".
Value Description
Bit 1 = 1 "Leave data" is active. Upon CCLOSE all data received,
but not yet read is retained. When the channel is opened
again, this data is read by CREAD.
Bit 1 = 0 "Leave data" is not active. CCLOSE deletes all data re-
ceived, but not yet read.
Description If the driver is loaded, its INI-file is read, in order to load the desired configura-
tion.
Configuration Description
$EXT_MOD1 The driver first tries to read the INI-file with the
name "io2krlDataDrv1.ini". If this is not found,
the INI-file "iokrlDataDrv.ini" is read.
$EX_MOD2 The driver first tries to read the INI-file with the
name "io2krlDataDrv2.ini". If this is not found,
the INI-file "iokrlDataDrv.ini" is read.
File [IODriver]
IODrvName = asyncDataDrv
[ReceiveQueue]
NrOfElements = 10
[ReceiveQueueDatBehaviour]
DeleteOn_IOreconfig = FALSE
DeleteOn_CClose = False
OverwriteOldData = FALSE
[Debug]
PrintToTlnet = FALSE
Name Description
IODrvName Internal name of the I/O-driver. with which the
KRL-data-driver is to connect
NrOfElements Number of buffered data elements in the receiv-
ing buffer, (maximum 30, minimum 1 data ele-
ment)
DeleteOn_IOReconfig TRUE:
deletes the receive buffer in case of an I/O-
reconfiguration
DeleteON_CClose TRUE:
deletes the receive buffer upon CClose.
OverwriteOldData TRUE:
If the receive buffer is completely filled and a
new data element comes from the IO-driver,
then the oldest element is deleted. The new
element is stored in the receive buffer.
FALSE:
If the receive buffer is completely filled, the
message Receive Buffer Overflow is
shown. A program reset is necessary.
PrintToTelnet TRUE:
Commands given at the Telnet shell can be doc-
umented for internal purposes.
Procedure 1 1. Select the menu sequence Configure > I/O Driver > Edit I/O Config. on
the KCP.
The file IOSYS.INI is opened.
2. Deactivate the driver PNET = ... in the file IOSYS.INI by turning it into a
comment.
3. Remove deactivated driver. Select the menu sequence Configure > I/O
Driver > Reconfigure I/O Driver.
4. Open the ProfiNet configuration on the configuration computer. Select the
menu sequence Target system > Load to module > Target module.
5. Select the corresponding CP 1616 card and start downloading the config-
uration.
6. Select the menu sequence Configure > I/O Driver > Edit I/O Config. on
the KCP.
The file IOSYS.INI is opened.
7. Reactivate the driver here by deleting the comment separator.
8. Remove activated driver. Select the menu sequence Configure > I/O
Driver > Reconfigure I/O Driver.
The driver is loaded with the current configuration.
Procedure 2 1. Open the ProfiNet configuration on the configuration computer. Select the
menu sequence Target system > Load to module > Target module.
2. Select the corresponding CP 1616 card and start downloading the config-
uration.
3. On successful completion of the configuration, message number 8069 ap-
pears: "ProfiNet configuration changed. Perform I/O reconfiguration on
KCP".
This message, which triggers a stop and disables active commands, remains
displayed until an I/O reconfiguration has been carried out. Resetting the
driver is not sufficient.
4. Select the menu sequence Configure > I/O Driver > Reconfigure I/O
Driver on the KCP.
The driver is internally shut down during the procedure. It is restarted after
the configuration has been transferred.
When the menu is no longer displayed in the Step 7 software, it is necessary
to wait for approximately 1 minute while the configuration is completed.
The current language database version on the KRC does not yet support the
message texts that are generated. Only message numbers are displayed.
Caution!
Driver crash. If message number 8068 "Updating CP 1616 configuration,
please wait" is displayed, no operator actions may be carried out on the KCP.
Description For certain applications, e.g. tool change, it is necessary to decouple devices.
Decoupling can be carried out via HMI (>>> 4.13.1 "Decoupling devices via
HMI (from Version 1.3 onwards)" page 30) or in KRL (>>> 4.13.2 "Decoupling
devices in KRL (from Version 1.3 onwards)" page 31).
Devices can be decoupled by means of the key DEACTIVATED_DEVICES in
pnioDrv.ini. These specified devices are then decoupled when the driver is
started. In the case of a cold start of the controller or an I/O reconfiguration,
the device list specified for DEACTIVATED_DEVICES is taken as an initiali-
zation for the devices to be deactivated when the driver is started. A warm re-
start/driver reset leaves all activated devices active (coupled) and all
deactivated devices deactivated (decoupled).
Decoupled devices cannot carry out error treatment in the case of read/write
errors. Decoupling means that the ProfiNet controller (CP 1616) terminates
communication with the ProfiNet device. All I/O operations on this device re-
main without effect.
A coupled device is disconnected from the ProfiNet or supply voltage. In this
case, a corresponding error message is generated in the HMI when this device
is configured in the file IOSYS.INI. A decoupled device, on the other hand,
does not signal an error when it is disconnected from the ProfiNet or from the
supply voltage (e.g. during tool change).
Only ProfiNet devices with I/Os mapped in the file IOSYS.INI are relevant for
the coupling and decoupling of devices. Other devices cannot be coupled/de-
coupled.
Example Devices 1 to 10 are configured in the ProfiNet configuration and loaded into
the card as a configuration. Only devices 1 to 8 are actually present in the sys-
tem, however. Devices 9 and 10 are thus irrelevant. Only devices 1 to 6 are
mapped in the file IOSYS.INI. Devices 7 and 8 are thus irrelevant. Of these de-
vices, devices 3 to 6 are always to be deactivated during every I/O reconfigu-
ration or cold start:
DEACTIVATED_DEVICES = 3,4,5,6
The CP 1616 controller thus only communicates with devices 1 and 2 when
the driver is started. Devices 3 to 6 can be coupled using the corresponding
IOCTL functions.
Procedure If Profibus devices that are connected to the ProfiNet via a Profibus proxy are
decoupled, the following must be taken into consideration:
The correct device number from the configuration in the Step 7 software
must be used. Two numbers are assigned to the Profibus device here:
One number as Profibus device (module number for Profibus).
One number as ProfiNet device (device number for ProfiNet). This
number must be specified in the case of decoupling.
Example 1. Select the menu sequence Monitor > Variable > Single.
2. Enter the following in the Name selection box:
=IOCTL (26, 32774,1)
3. Confirm with ENTER.
The device is decoupled.
Designa
Description
tion
26 Driver ID assigned to the driver. This ProfiNet driver is set
in the IOSYS.INI file. This value must always be specified
when coupling/decoupling devices.
32774 Decoupling command
1 Device number from the ProfiNet configuration. Each
device must be assigned a unique device number by the
Step 7 software during configuration. This device number
must always be specified in the case of coupling/decou-
pling.
Example Enter the following at the relevant point in the KRL code:
1 IF (NEXT_TOOL == ZANGE_1) THEN
2 RET = IOCTL (26, 32774, 2)
3 WAIT SEC 1.0
4 RET = IOCTL (26, 32773, 1)
5 ENDIF
Item Description
2 The device with the number 2 is decoupled here.
Designat
Description
ion
26 Driver ID assigned to the driver. This ProfiNet driver is set in
the IOSYS.INI file. This value must always be specified when
coupling/decoupling devices.
32774 Decoupling command
1, 2 Device number from the ProfiNet configuration. Each device
must be assigned a unique device number by the Step 7 soft-
ware during configuration. This device number must always
be specified in the case of coupling/decoupling.
RET IOCTL return value. RET is of type INT and can have the val-
ues 0 and -1.
0 = function successfully executed
-1 = failure
Description For certain applications, e.g. tool change, it is necessary to couple devices.
Coupling can be carried out via HMI (>>> 4.14.1 "Coupling devices via HMI
(from Version 1.3 onwards)" page 32) or in KRL (>>> 4.14.2 "Coupling devic-
es in KRL (from Version 1.3 onwards)" page 33).
The IOCTL function is executed synchronously. It only returns when the cor-
responding device is functional and can be written to once again. Writing to
and reading from deactivated devices does not provide correct results.
If a device is coupled using an IOCTL function, the CP 1616 controller restores
the connection to this device. Once the device is fully integrated into the Profi-
Net once again, an ALARM is received from the device. The ProfiNet driver
sees this as a sign that the device has been fully reactivated. Only now can I/
Os be correctly sent to the device again.
If a device is not functional, e.g. disconnected from the bus or supply voltage,
a status message indicating a timeout appears after approx. 10 seconds. It
can now normally be assumed that the device is not being correctly operated
in the ProfiNet.
Procedure If Profibus devices that are connected to the ProfiNet via a Profibus proxy are
coupled, the following must be taken into consideration:
The correct device number from the configuration in the Step 7 software
must be used. Two numbers are assigned to the Profibus device here:
One number as Profibus device (module number for Profibus).
One number as ProfiNet device (device number for ProfiNet). This
number must be specified in the case of coupling.
Example 1. Select the menu sequence Monitor > Variable > Single.
2. Enter the following in the Name selection box:
=IOCTL (26, 32773.1)
3. Confirm with ENTER.
Designa
Description
tion
26 Driver ID assigned to the driver. This ProfiNet driver is set
in the IOSYS.INI file. This value must always be specified
when coupling/decoupling devices.
32773 Coupling command
1 Device number from the ProfiNet configuration. Each
device must be assigned a unique device number by the
Step 7 software during configuration. This device number
must always be specified in the case of coupling/decou-
pling.
Example Enter the following at the relevant point in the KRL code:
1 IF (NEXT_TOOL == ZANGE_1) THEN
2 RET = IOCTL (26, 32774, 2)
3 WAIT SEC 1.0
4 RET = IOCTL (26, 32773, 1)
5 ENDIF
Item Description
4 The device with the number 1 is coupled here.
Designat
Description
ion
26 Driver ID assigned to the driver. This ProfiNet driver is set in
the IOSYS.INI file. This value must always be specified when
coupling/decoupling devices.
32774 Decoupling command
1, 2 Device number from the ProfiNet configuration. Each device
must be assigned a unique device number by the Step 7 soft-
ware during configuration. This device number must always
be specified in the case of coupling/decoupling.
RET IOCTL return value. RET is of type INT and can have the val-
ues 0 and -1.
0 = function successfully executed
-1 = failure
5 Example
Position specifications 6 and 7 for the modules are based on the counting di-
rection. The uppermost module is ignored – regarded as 0 – and counting
starts from the second module = 1.
Position Description
1 Module 0
2 Modules 1 to 5
3 Module 6, module 7
4 I/O modules
Example
Designation Description
INB10 = 20,x1 Here, a data object with a length of one byte is
mapped to address 20, starting from byte 10.
INB10 = 20,x4 Here, a data object with a length of four bytes is
mapped to address 20, starting from byte 10.
The object has to be read in its entirety (all 4
bytes at once).
INB10 = 20, xx4 Here, four data objects with a length of one byte
are mapped to address 20, starting from byte 10.
They can be read individually.
Position Description
1 IM151...
2 PM (power module)
3 DI (digital input)
4 DO (digital output)
5 Configured IM151...
WMode=#SYNC
RMode=#ABS
TimeOut=10
Offset=0
Test:Int=0
Test_String[]=" "
DEF DATA_UP ()
DECL STATE_T Stat
DECL MODUS_T RMODE
REAL TimeOut
INT Offset
BOOL tmpB
RMode=#ABS
TimeOut=0
While ($Data_Ext_Obj1 > 0)
tmpB 0= strClear ($LOOP_MSG[])
Offset=0
CRead (nHandle,Stat,RMode,TimeOut,Offset,"%r", $LOOP_MSG[])
Endwhile
END
6 INIT ()
9 WMode0#SYNC
10 CWrite (nHandle,Stat,WMode,"Test: %s", "<...>")
11 Wait for (Stat.Ret1==#DATA_OK)
12 parRet = 0
13 If ( cloCtl (nHandle, 1000, 0, " ", parRet) <> 0) Then halt
14 Else
15 IF ($Data_Ext_Obj1 > 0) THEN halt
16 ENDIF
17 Endif
Number Description
9...11 Send three data elements to the receiving queue
via CWrite and the dummy driver
12 Delete data buffer
13 cloCtl unsuccessful
15 No more data may be present
6 Diagnosis
Overview
7 Repair
8 Appendix
8.1 Offset-Table
The offset byte and the related input and output addreses are specified in this
table.
9 KUKA Service
Introduction The KUKA Robot Group documentation offers information on operation and
provides assistance with troubleshooting. For further assistance, please con-
tact your local KUKA subsidiary.
Availability KUKA Customer Support is available in many countries. Please do not hesi-
tate to contact us if you have any questions.
Argentina Ruben Costantini S.A. (Agency)
Luis Angel Huergo 13 20
Parque Industrial
2400 San Francisco (CBA)
Argentina
Tel. +54 3564 421033
Fax +54 3564 428877
ventas@costantini-sa.com
Index
Symbols E
$CUSTOM.DAT 27 Example 35
$EX_MOD2 28
$EXT_MOD1 28 F
Force unload 27
A Fundamentals Profinet IO 8
AN IN 6
AN OUT 6 G
Analog input, IOSYS.INI 24 GSMD 6
Analog input, PNIODRV.INI 23
ANIN 6 I
ANOUT 6 Industrial Ethernet 6
Appendix 45 Install GSDML-file 24
Installation 11
C Installation, ProfiNet IO 11
Configuration 13 Introduction 5
Configuration files 6 io2krlDataDrv.ini 27
Configuration of the external modules, $Cus- IODrvName 28
tuom.dat 27 IOSYS.INI 6
Configure I/O of the Controller 24 IOSYS.INI, configuring, MFC 23
Configure I/O of the Device 26
Configuring a higher-level PC station 17 K
Configuring PC station 2 19 KCP 6
Configuring the pnioDrv.ini file 22 KUKA Customer Support 47
Controller 13
Controller and Device 16 L
Coupling 6 Leave data 27
Coupling devices (from Version 1.3 onwards) 32 LED-display CP 1616 41
Coupling devices in KRL (from Version 1.3 on- Loading a configuration into the module 21
wards) 33
Coupling devices via HMI (from Version 1.3 on- M
wards) 32 MAC address 6
CP 1616 6 Mapping 6
Mount CP 1616 43
D
Decoupling 6 N
Decoupling devices (from Version 1.3 onwards) 30 NrOfElements 28
Decoupling devices in KRL (from Version 1.3 on-
wards) 31 O
Decoupling devices via HMI (from Version 1.3 on- O-File 27
wards) 30 O_File 6
DeleteON_CClose 28 Offset-Table 45
DeleteOn_IOReconfig 28 Overview, configuration 13
Device 15 OverwriteOldData 28
Devices, coupling (from Version 1.3 onwards) 32
Devices, coupling via HMI (from Version 1.3 on- P
wards) 32 PCI-Slot allocation 9
Devices, decoupling (from Version 1.3 onwards) PLC 6
30 PM 6
Devices, decoupling via HMI (from Version 1.3 on- pnioDrv.INI 6
wards) 30 PrintToTelnet 28
DI 6 Procedure 1 29
Diagnosis 41 Procedure 2 29
Dismount CP 1616 43 Product description 7
DO 6 ProfiNet IO, installing 11
Documentation, robot system 5 ProfiNet IO, uninstalling 12
ProfiNet IO, updating 12
ProfNet CP 1616 7
Properties 7
S
Safety instructions 5
Service, KUKA Roboter 47
Step 7 6
Subnet 6
Subnet mask 6
Support request 47
SWAP 6, 23
Swapping 6
System requirements 11
T
Target group 5
Telnet 6, 42
Trade mark 5
Training program 5
Transferring the configuration to the CP 1616 card
29
U
Uninstallation, ProfiNet IO 12
Update, ProfiNet IO 12
W
Warnings 5
WORD types 6