PROFINET ctrlX CORE X3 with IndraDrive using CoDeSys Fieldbus libraries

PROFINET - Connect ctrlX CORE X3 with IndraDrive

sanX
New Contributor
 

Overview

In this tutorial, it will be shown how to connect an IndraDrive Cs device to a ctrlX CORE X3. The ctrlX CORE X3 will be the Profinet controller (PN-Controller), and the IndraDrive will be the Profinet device. The IndraDrive device will be connected to the Ethernet port (XF51) of the ctrlX CORE, and the CoDSys fieldbus library will be used to configure the connection.

ctrlX CORE X3 with IndraDrive Cs PROFINET Connection

Prerequisites
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. From the ctrlX CORE side it first requires to configure the Network configuration in the “Settings” side:

  1. Go to “Settings” 
  2. "Connectivity"
  3. Select the "eth1" connection 
  4. Go to the "IPv4" menu
  5. Choose an IP address (It is recommended to choose a different one to eth0) Something of the type 192.168.0.X 
  6. Save configuration

IP Address configuration

2. IndraDrive configuration file import

NOTE: It is required to have the .xml file of the IndraDrive device.

  • Open the PLC program. In the Menu, select “Tools” -> "Device Repository" -> "Install" -> Select the .xml file with the PN-Device information.

IndraDrive drivers installation

  • Once successfully imported, the imported device should be visible:

IndraDrive device addition check

3. Add ethernet device:

  1. Right click over "Device" -> Select “Add device” 
  2. Select “Ethernet
  3. Press “Add Device

Ethernet device addition

4. Add PN-Controller device. As in this case, the ctrlX CORE will be the PN-Controller, it is required to select this type of device in the configuration.

  1. Right click over "Ethernet" -> "Add device"
  2. Select "PN-Controller over Profinet IO Master" 
  3. Press "Add device"

PN-Controller addition

5. Once the PN-Controller is imported, in the Device tree, new trees with the task’s priorities will be added

Profinet tasks addition

  • Now it is required to change the priorities:

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

Profinet_communicationTask priority change

For the Profinet_IOTask the same steps are followed:

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

ProfinetIOTask priority change

6. Scan the IndraDrive device:

  1. Right click over "PN_Controller" -> Select "Scan for devices"
  2. Check the found devices
  3. Copy All devices to project -> Close the window

Scanned device addition

Troubleshooting: If error messages appear during scanning, it is recommended to add the device manually:

  1. Instead of clicking over "Scan for devices", click over "PN_Controller" -> "Add device"
  2. Look for the previously added "IndraDrive" description and add it to the project tree by pressing "Add device"
  3. Perform step 10 of this tutorial and log out again
  4. Scan again with right click over "PN_Controller" -> "Scan for devices" and copy the device to the project
  5. The manually added device can be deleted and you can keep the new one
  6. Continue with the Tutorial

7. Configure ethernet IP Address:

  1. Right click over "Ethernet"
  2. "Browse"
  3. Select eth1 connection as it was the one previously configured in the ctrlX CORE web interface
  4. Press “Ok

Ethernet device configuration

8. Configure PN-Controller:

  1. Double click over "PN_Controller"
  2. Give a station name
  3. Configure the PN-Device IP Address. The IP Address is required to be 192.168.0.X as this was the defined type of network

PN-Controller Configuration

9. Configure the input or output to be able to read the values:

  1. Double click over the input we want to read
  2. Select the "PNIO Module I/O Mapping" tab
  3. Expand the variable
  4. Select "Enabled 2"

Variable visualization

10. Test the configuration: "Generate code" or press "F11" -> Login in the ctrlX CORE to transfer the PLC program -> Run the program

Generate code login and run buttons

  • Read the received values

Values check

NOTE: If the symbols are orange, it means that it does not have license.

IndraDrive variables check

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