This document includes data that shall not be duplicated, used, or disclosed - in whole or in part - for any purpose other than
to evaluate this document. If, however, a contract with a customer is in force, the customer shall have the right to duplicate,
use, or disclose the data to the extent provided in this contract. This restriction does not limit the customer’s right to us e the
data in this document if it can also be obtained from another source without restriction. The data subject to this restriction are
confidential in all pages of this document.
Figure 25: Indication of PN IO Device’s diagnostic state on PN IO Controller ...................... 19
Figure 26: Adjusted TCP IP-Adress for the internal PN IO Controller ................................... 20
ii DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/KUNBUS Proprietary
KUNBUS
Page 5
GettingStarted Inhalt
Leerseite
KUNBUSDF PROFINET IO-GettingStarted-V1.0/27.07.2016 iii
Business Confidential/KUNBUS Proprietary
Page 6
Page 7
GettingStarted Installation
1 Installation
Install the DF PROFINET IO PCI/CPCI/PCIe board in the PC system.
Please note, if a DF PROFINET IO CPCI board is used, the board does not support
Hot Plugging. If installing/uninstalling the board the Compact PCI system must be
switched off and the power supply must be interrupted.
Switch on the PC system.
Ignore the “New hardware” – dialog which is popped up automatically after the board
was installed.
Figure 1: New Hardware Wizard
Start the Setup from KUNBUS driver CD within scope of delivery.
Operation as PROFINET IO-Controller GettingStarted
2 Operation as PROFINET IO-Controller
2.1 PROFINET IO-Configuration
The PROFINET IO configuration is carried out by the KUNBUS PROFINET IO configuration
tool configurator III.exe. Configurator III is a powerful tool to create, download and test a
PROFINET IO configuration. Refer to the programs on line help menu for all details.
Create a configuration and download it to the DF PROFINET IO board.
Figure 2: Configurator III PROFINET IO Configurations-Tool
2 DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/COMSOFT Proprietary
COMSOFT
Page 9
GettingStarted Operation as PROFINET IO-Controller
In that case, the DF PROFINET IO devices are already connected, use the Online-
Mode of Configurator III to immediately test and troubleshoot the PROFINET IO
configuration.
Figure 3: Configurator III PROFINET IO Online-Mode
ON: Error in PROFINET IO Network detected (at minimum 1 configured PN IO
Device does not respond or reports diagnostic)
OFF: All configured PROFINET IO Devices work properly
4 DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/COMSOFT Proprietary
COMSOFT
Page 11
GettingStarted PROFINET IO C and C++ Sample
2 PROFINET IO C and C++ Sample
This example shows exemplarily and in an easy way how to use the driver interface of the
DF PROFINET IO board. Before using the example code a PROFINET IO configuration has
to be downloaded to the DF PROFINET IO board first.
The example is located in the directory
"C:\Program Files\KUNBUS GmbH\Profinet IO Controller\Basic_Profinet_Example”
or
"C:\Program Files (x86)\KUNBUS GmbH\Profinet IO Controller\Basic_Profinet_Example”.
The sample code is prepared for the use with Microsoft Visual C++ from version Visual C++
2008. The sample code project is a 32-Bit console application. For all details please refer
directly to the source code file "Basic_Profinet_Example.cpp". To test and troubleshoot the
PROFINET configuration, Configurator III provides a powerful Online Mode with full
graphical HMI supporting I/O-data-, Diagnostic- and Alarm handling.
For a first test execute the „Basic_Profinet_Example.exe" application within scope of
delivery:
Figure 4: Sample Code- Initialization
The application runs step by step. Any keystroke invokes the next step. The following steps
are available:
- Step 1: Check DLL version: Initialization of the underlying DFXX-DLL and creation of a
file handle to access the board
- Step 2: Get controller info: Display of the installed board configuration
- Step 3: Choose a controller: Selection of a board installed
- LED Green = ON, LED Yellow = OFF, LED Red = OFF
Figure 5: Sample Code – Command Overview
- Command 0: Exit: Sample application will be terminated
- Command 1: Identify Devices on Bus: Detection of all connected PN IO Devices
Figure 6: Sample Code – Identify Devices on Bus
- Step 4: Get information about all devices: DCP Service to identify the connected PN IO
Devices and to display the PN IO specific names
6 DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/COMSOFT Proprietary
COMSOFT
Page 13
GettingStarted PROFINET IO C and C++ Sample
- Command 2: Cyclic Transfer: Start of the cyclic data traffic
Figure 7: Sample Code - Cyclic Transfer
- Step 5: Start the Profinet: PROFINET IO will be started
- LED Green = ON, LED Yellow = OFF, LED Red = OFF
- If the LED Red = ON, please check the PN IO Configuration via the Online Mode in
Configurator III.
- Step 6: Select device number: Display of the available PN IO Devices and selection
of the PN IO Device number to display input data and to force output data. The PN
IO device number can be learned from the PN IO configuration in Configurator III.
For the operation of the board as PROFINET IO device no configuration must be
downloaded by Configurator III.
3.1 Description LED's
Green LED:
ON: Firmware boot was successfull
OFF: Firmware not started
Yellow LED:
ON: PROFINET IO started
OFF: PROFINET IO not started
Red LED:
On: None or faulty connection to PN IO Controller
Off: No error in PROFINET IO Network
10 DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/COMSOFT Proprietary
COMSOFT
Page 17
GettingStarted Operation as PROFINET IO-Device
3.2 PROFINET IO Device C and C++ Sample
This example shows exemplarily and in an easy way how to use the driver interface of the
DF PROFINET IO board. Before using the example code a PROFINET IO configuration has
to be downloaded to the DF PROFINET IO board first.
The example is located in the directory
"C:\Program Files\KUNBUS GmbH\Profinet IO Controller\Basic_Profinet_Device_Example”
or
"C:\Program Files (x86)\KUNBUS GmbH\Profinet IO Controller\Basic_Profinet_Device_
Example”.
The sample code is prepared for the use with Microsoft Visual C++ from version Visual C++
2008. The sample code project is a 32-Bit console application. For all details please refer
directly to the source code file "Basic_Profinet_Device_Example.cpp".
For a first test execute the „Basic_Profinet_Device_Example.exe" application within scope of
delivery:
Figure 11: Sample code PN IO device - Initialization
The application runs step by step. Any keystroke invokes the next step. The following steps
are available:
- Step 1: Check DLL version: Initialization of the underlying DFXX-DLL and creation of a
file handle to access the board
- Command 5: Send Process Alarm: Trasnsmitts Process Alarms to PN IO Controller
- Command 6: Set/Reset diagnosis: Set/Reset diagnostic state
12 DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/COMSOFT Proprietary
COMSOFT
Page 19
GettingStarted Operation as PROFINET IO-Device
Figure 13: Communication State of the PN IO Device before activating the PN IO
communication
With the PN IO device still not activated, a second DF PROFINET IO board, configured as
PN IO Controller, indicates in Configurator’s on line mode the PN IO Device as faulty (blue
frame).
Figure 15: State of the PN IO Device after activating PROFINET communication
After activating the PN IO Device, the PN IO Controller indicates the PN IO Device as
operational (green frame). Exchange of cyclic process data is now possible.
Simultaneous operation of PN IO Controller and PN IO Device GettingStarted
4 Simultaneous operation of PN IO Controller
and PN IO Device
On the DF PROFINET IO board the operation modes PN IO Controller and Device can be
processed simultaneously that means the board works as PN IO controller and Device at the
same time.
Furthermore the sample applications within scope of delivery for PN IO Controller and PN IO
device can be run in parallel for testing purposes.
4.1 Simultaneous operation of PN IO
Controller/Device on a single Ethernet Port
With DF PROFINET IO boards equipped with a single Ethernet conection please consider
the following configuration requirements:
The TCP/IP address for PN IO controller and PN IO device must be identical.
Example: For the operation as PN IO Controller, the TCP IP – address 192.168.20.37 was
adjusted with Configurator III:
Figure 26: Adjusted TCP IP-Adress for the internal PN IO Controller
20 DF PROFINET IO-GettingStarted-V1.0/27.07.2016
Business Confidential/COMSOFT Proprietary
COMSOFT
Page 27
GettingStarted Simultaneous operation of PN IO Controller and PN IO Device
In the DCP-configuration of the external PN IO controller configuration tool (Assignment of
PROFINET IO name and TCP IP address for the PN IO Device) the identical TCP IP address
192.168.20.37 must be configured.
4.2 Description LED's
Green LED:
ON: Firmware boot was successfull
OFF: Firmware not started
Yellow LED:
ON: PROFINET IO started
OFF: PROFINET IO not started
Red LED:
On: Error on PROFINET IO Network
Off: No error in PROFINET IO Network
4.3 Simultaneous operation of PN IO
Controller/Device on 2 Ethernet Ports
With DF PROFINET IO boards equipped with 2 independent Ethernet ports the PN IO
Controller is run on port 1 and the PN IO device is run on port 2. The Ethernet ports are
working completely independent so different TCP IP – addresses can be configured.