ctrlX CORE X3 ctrlX CORE plus X3 Profinet connection

PROFINET - Connect ctrlX CORE X3 with ctrlX CORE plus X3 with Fieldbus libraries

sanX
New Contributor

1. Overview

In this article, it will be shown how to connect two ctrlX CORE's using the PROFINET Device app and the CoDeSys fieldbus libaries. The ctrlX CORE X3 will act as PN-Controller and it will be configured using the PLC Engineering program. On the other hand, the ctrlX CORE plus X3 will use the PROFINET Device App. Additionally, it is important to note that in the ctrlX CORE plus X3, the Profinet port will be used, but in the ctrlX CORE X3, the Ethernet port (XF51) will be used.

CoDeSys Fieldbus libraries

The CoDeSys libraries have the biggest flexibility configuring the Profinet connection. It is possible to completely configure a Profinet Device and a Profinet Controller (Master). It is possible to define the PN-Controller parameters and also the PN-Device attached to it. Additionally, all exhanged data is available in the PLC program. In the case the user wants to read the PLC data in the Data Layer, it is also possible to define some global variables to read the values of interest.

On the other hand, the configuration process is much longer and complicated due to the amount of aspects required to take into account. Additionally, it is required to have the PLC Engineering program. Otherwise, it is not possible to perform the configuration in the ctrlX CORE web interface.

PROFINET Device app

The PROFINET Device app has the advantage to be easily configurable. In a few clicks it is possible to configure the connection and have an idea of the connection state. Additionally, no external programs are required. With the ctrlX CORE web interface it is possible to configure the connection and to read the values from the Data Layer.

On the contrary, with the PROFINET Device app it is not possible to configure a PN-Controller and it is limited to a PN-Device. As for establishing a Profinet connection, it is required to have a Profinet controller and a Profinet device, it is not possible to connect two ctrlX COREs using the app. 

ctrlX CORE X3 and ctrlX CORE plus X3 Profinet connection

2. Prerequisites
3. ctrlX CORE X3 (PN-Controller) configuration

Note: Before starting with the configuration it is required to install the CoDeSys Fieldbus libraries. Please follow the steps shown here: Manual - CODESYS Fieldbus communication packages for ctrlX CORE. In the case the user has access to the collaboration room, download the packages from this link.

1. Open ctrlX PLC Engineering program and create a new project

  1. Create a new project
  2. Select ctrlX CORE template
  3. Provide a name
  4. Press "Ok" to close the window

Project creation

2. Communicate to the ctrlX CORE X3

  1. Right click over "Device"
  2. Select "Communication settings"

Communication settings window access

  1. Enter the ctrlX CORE X3 IP address
  2. Press the "Run" button
  3. Press "Ok" to close the window

ctrlX CORE with PLC program communication configuration

3. Add ethernet node

  1. Right click over "Device"
  2. Select "Add device"

Device addition

  • In the Profinet IO tree, select "Ethernet" and press "Add device"

Ethernet node addition

4. Configure Ethernet node

  • First it is required to define a static IP address in the ctrlX CORE web interface
  1. Go to the ctrlX CORE web interface and go to "Settings"
  2. Press "Connectivity"
  3. Select the "eth1" connection
  4. Go to the "IPv4" tab
  5. Enter the IP address we want to define. In this case 192.168.2.12 and to provide the subnet mask enter /24 which is the 255.255.255.0 subnet mask
  6. Press "Save" to keep the configuration

eth1 network configuration

  • Now, we return back to the ctrlX PLC Engineering program and perform the following steps:
  1. Double click over "Ethernet"
  2. In the general tab, press "Browse"
  3. Select the eth1 connection which should have the previously defined IP address
  4. Press "Ok" and the window will be closed

eth1 network configuration

5. Add Profinet Controller

  1. Right click over "Ethernet"
  2. Select "Add Device"

Device addition

  • In the Profinet IO Master tree, select PN-Controller and press "Add device"

PN-Controller addition

6. Change priorities

Double click over "Profinet_communicationTask" -> Include a priority of 37 as a recommendation

Priority change

For the "Profinet_IOTask" the same steps are followed:

Double click over "Profinet_IOTask" -> Include a priority of 30 as a recommendation

Priority change

7. Add ctrlX CORE plus X3 repository

  • In "Tools" -> Select "Device Repository"

Device repository access

  • Press "Install" button

ctrlX CORE device driver installation

  • Select the .xml file to import it

ctrlX CORE .xml file addition

  • Now a new device should appear in the PLCs section

ctrlX CORE addition

8. Add ctrlX CORE to the device tree

  1. Right click over "PN_Controller"
  2. Select "Add device"

Device addition

  • In the PLCs -> ctrlX CORE section, select "ctrX CORE" and press "Add device"

ctrlX CORE device addition

9. Configure ctrlX CORE node

  1. Right click over "producer"
  2. Select "Plug Device"

module addition

  • Double click over "module_out

module_out addition

  1. With the window still open, double click over "consumer" 
  2. Doube click over "module_in" and close the window

module-in addition

10. Add input and output

  1. Right click over "producer"
  2. Select "Add device"

Variable addition

  • In the Profinet IO -> Profinet IO Submodule -> consumer -> byte, select "byte_128_out", and press "Add device"

Output variable addition

  • Add input
  1. Without having closed the previus window, double click over "consumer". Otherwise, Right click over "consumer" -> "Add device"
  2. Select "byte_128_in"
  3. Press "Add device"

Input variable addition

4. ctrlX CORE plus X3 (PN-Device) configuration

1. First, the ctrlX CORE will be connected to the Engineering computer and the CtrlX Works program will be started.

ctrlX CORE web interface access

2. Install PROFINET device app. Access Bosch Rexroth in the following link

  • To perform this step, it is recommended to follow the instructions shown in the following article.

PROFINET Device app download

  • The app is installed. In the ctrlX CORE web interface the “Settings” menu is clicked -> Access “Apps” -> Change to “Service mode” because otherwise it will not be possible to install the app, and the “Install from file” button is clicked. A new window will be opened where the previously downloaded file is selected.

Settings access

App installation

3. Add PROFINET device:

  1. Access the PROFINET device app
  2. Check that the ctrlX CORE is in “Service” mode (Otherwise it will give an error as shown in the figure)
  3. Add PROFINET device

Add profinet

Error that appears in the case the PROFINET device is added in “Operating” mode

Error in case of adding a profinet device in operating mode

4. Add PROFINET device

Profinet device addition

5. Configure PROFINET device:

  1. Click the pencil button
  2. Select template (this has to be chosen in function of sent data from the connected device to the ctrlX CORE)
  3. Save configuration

PROFINET Device app configuration

5. Testing

1. Run the PROFINET Device app 

PROFINET Device app start

  • As the PLC program is still not running in the other ctrlX CORE, the state will be "Safe-OP"

Safe-OP state

2. Go to the ctrlX PLC Engineering program and login to transfer the PLC program to the ctrlX CORE

Login button

  • Accept the message

Download app to ctrlX CORE

3. Run the PLC program

Run PLC program

  • Check that both devices are connected by seeing the following symbol in the PLC program

Connection check

  • Check in the ctrlX CORE plus X3 that the state has changed

Profinet connection state check

Note: If the user wants to test if the device sends data, it is possible to write a little program and later read the values in the Data Layer. All these procedures can be found in the other sections of this article.

6. Related Links
sanX
sanX
Hi, I am Nicolas from the DCEM Application Team. I am temporary not available, if you have any questions, do not hesitate to contact LunatiX.
Must Read
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist