DF PROFINET IO GettingStarted V1.0/27.07.2016 KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
h:\dokumente\project\700361_df_profinet_io_controller\anwenderdoku\getting device\version_1.0\gettingstarted_e.doc started windows Revision History Version Date V1.0 27.07.2016 Version V1.0 Description Respons.
GettingStarted Inhalt Contents 1 Installation .................................................................................................................... 1 2 Operation as PROFINET IO-Controller ......................................................................... 2 2.1 PROFINET IO-Configuration ............................................................................... 2 1 Description LED's ............................................................................................
Inhalt GettingStarted List of Figures Figure 1: New Hardware Wizard ............................................................................................ 1 Figure 2: Configurator III PROFINET IO Configurations-Tool ................................................. 2 Figure 3: Configurator III PROFINET IO Online-Mode............................................................ 3 Figure 4: Sample Code- Initialization.....................................................................................
GettingStarted Inhalt Leerseite KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
GettingStarted 1 Installation 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.
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.
GettingStarted Operation as PROFINET IO-Controller In that case, the DF PROFINET IO devices are already connected, use the OnlineMode of Configurator III to immediately test and troubleshoot the PROFINET IO configuration. Figure 3: Configurator III PROFINET IO Online-Mode KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
Description LED's 1 GettingStarted 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 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.
GettingStarted 2 PROFINET IO C and C++ Sample 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”.
PROFINET IO C and C++ Sample - Step 3: Choose a controller: Selection of a board installed - LED Green = ON, LED Yellow = OFF, LED Red = OFF GettingStarted 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 - 6 Step 4: Get information about all devices: DCP Service to identify the connected PN IO Devices and to display the P
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.
PROFINET IO C and C++ Sample GettingStarted Figure 8: Sample Code - Cyclic Transfer - Step 7: Get APDU status: Display of the PN IO Device’s APDU Status Figure 9: Sample Code - Cyclic Transfer - Step 8.1 Set output data and get input data: Forcing of the output data, display of the input data - Simultaneous display of upcoming diagnostic alarms - Display of the I/O-data related APDU- and Device-Status (sum status) 8 DF PROFINET IO-GettingStarted-V1.0/27.07.
GettingStarted PROFINET IO C and C++ Sample - Display of the Input- und Output data.
Operation as PROFINET IO-Device 3 GettingStarted Operation as PROFINET IO-Device 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.
GettingStarted 3.2 Operation as PROFINET IO-Device 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.
Operation as PROFINET IO-Device - Step 2: Get board info: Display of the installed board configuration - Step 3: Choose a board: Selection of a board installed - LED Green = ON, LED Yellow = OFF, LED Red = OFF GettingStarted Figure 12: Sample code PN IO Device – Command Overview - Command 0: Exit: Exit sample application - Command 1: Identify connected Controllers: Indication of all PN IO Controllers connected to the PN IO device - Command 2: Read/Write I/O Data (Cyclic): Read/Write of cyclic p
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 14: Sample code PN IO Device – Start of Profinet - Step 4: Start the Profinet: Profinet IO communication is activated KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
Operation as PROFINET IO-Device GettingStarted 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. Figure 16: Sample code PN IO Device – Identification of connected PN IO Controllers - 14 Step 5: Identify connected Controllers: Indication of the connected PN IO controllers DF PROFINET IO-GettingStarted-V1.0/27.07.
GettingStarted Operation as PROFINET IO-Device Figure 17: Sample code PN IO Device - Start of PN IO device and Read/Write of cyclic process data - Step 6: Read/Write Cyclic Data: Read/Write cyclic process data. Additionally the communication status and data sizes are indicated Figure 18: Change of output data on PN IO Controller KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
Operation as PROFINET IO-Device GettingStarted Figure 19: Sample code PN IO Device - Read/Write of cyclic output data and indication of the changed output data Figure 20: Sample code PN IO Device - Command 4- Pull/Plug Module - Step 4: Start the Profinet: Profinet IO communication is activated - Step 9: Pull Module / Plug Module – Trigger Pull / Plug – Alarm on the PN IO Controller 16 DF PROFINET IO-GettingStarted-V1.0/27.07.
GettingStarted Operation as PROFINET IO-Device Figure 21: Indication of Pull / Plug – Alarms on PN IO Controller Figure 22: Sample code PN IO Device - Command 5- Transmitting Process-Alarms - Step 4: Start the Profinet: Profinet IO communication is activated - Step 10: Send an alarm – Transmit a Process-Alarm to the PN IO Controller KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
Operation as PROFINET IO-Device GettingStarted Figure 23: Indication of a process-alarm on PN IO Controller Figure 24: Sample code PN IO Device - Command 6- Set/Reset Diagnostic State - Step 4: Start the Profinet: Profinet IO communication is activated - Step 11: Set/Reset a Diagnosis – Set/Reset diagnostic state 18 DF PROFINET IO-GettingStarted-V1.0/27.07.
GettingStarted Operation as PROFINET IO-Device Figure 25: Indication of PN IO Device’s diagnostic state on PN IO Controller KUNBUS DF PROFINET IO-GettingStarted-V1.0/27.07.
Simultaneous operation of PN IO Controller and PN IO Device 4 GettingStarted 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.
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.