Smart Function Kit ctrlX CORE X3 etherCAT Connection

Smart Function Kit using a ctrlX CORE connected through EtherCAT

sanX
New Contributor

1. Introduction

The Smart Function Kit is suitable for many pressing and joining applications with forces up to 70 kN. The web-based software allows for both easy creation of a sequence by means of drag & drop of sequential modules and for the recording of the force/path development and its subsequent evaluation (OK/NOK) by envelopes, windows and limit value.

Find more information about the Smart Function Kit and its functionalities: 

With the purpose to increase the configuration options of the Smart Function Kit, it will be shown how to connect it to a ctrlX CORE using the EtherCAT connection. Once connected, you will learn how to configure the program of the ctrlX PLC Engineering to perform some basic functions.

Smart Function Kit with ctrlX CORE etherCAT connection

2. Prerequisites

3. Smart Function Kit configuration

To be able to connect the Smart Function Kit (SFK) to the ctrlX CORE it is required to change the connection configuration in the SFK interface:

1. Connect the SFK (Indutrial PC) to the Engineering Computer Ethernet port and configure the static IP address. 

Engineering computer with Industrial PC Connection

  • It is recommended to check the instructions shown in the following link: Quick Start Guide ctrlX CORE To follow this tutorial, it is needed to consider that the default static IP address of the Smart Function Kit is 192.168.0.1. Therefore, a 192.168.0.X IP Address should be chosen.

2. In a web browser, enter the SFK IP Address (192.168.0.1) and configure the EtherCAT connection:

  1. Access configuration menu
  2. Press the "System" tab

Smart Function Kit System tab access

  • In the same tab, scroll down to the Fieldbus configuration section, choose the Ethercat connection and save the configuration

EtherCAT selection

4. ctrlX IO Engineering configuration

First, it will be shown how to import the IO configuration to save time. In the case, the user would like to understand the configuration and personalize it, it will also be shown how to perform this configuration.

4.1. ctrlX IO file import

1. Connect the ctrlX CORE to the Smart Function Kit using the EtherCAT port. 

IndraDrive Cs with ctrlX CORE X3 EtherCAT Connection

2. Download the file provided at the end of this article ("Smart Function Kit IO Configuration"), and open the ctrlX IO Engineering program

  1. Press "Open project"
  2. Search the downloaded file and select it
  3. Press "Open"

ctrlX IO project importation

2. Check connection between ctrlX CORE and engineering computer

  1. Right click over the ctrlX CORE node
  2. Select "Communication settings"

Access to Communication settings Menu

  • Introduce the ctrlX CORE IP address, and check the connection by clicking the "Run" button. Once checked press "Ok" to close the window

3. Once the program and the ctrlX CORE are correctly connected, transfer the configuration to the ctrlX CORE

  1. Right click over "ethercatmaster"
  2. Press "Transfer field bus configuration"

Configuration transfer to ctrlX CORE

4.2. ctrlX IO Engineering step by step configuration

1. Connect the ctrlX CORE to the Smart Function Kit using the etherCAT port.
2. Open ctrlX IO Engineering program 

  1. Press "New project"
  2. Select the ctrlX CORE IO Template
  3. Provide a project name
  4. Close the window by pressing "Ok"

ctrlX IO Project creation

3. Add device

  1. Right click over "ethercatmaster"
  2. Select "Scan for Devices"

Devices scan

4. Select the IndraDrive device 

  • Press the shown button to add the scanned device

Indradrive device addition

  • Press "Apply" and close the window

Indradrive device addition

5. Enable expert settings

  1. Double click over the previously added device
  2. Select the "General" tab
  3. Enable "Expert settings"

Enable Expert Settings

6. Configure inputs

  • Access "Expert Process Data" window

Expert Process Data access

  • Edit Status word variable
  1. Select "S-0-0016"
  2. Select the "Master control word" variable
  3. Press the "Edit" button
  4. Write the name: "statusword"
  5. Change the data type to "WORD"
  6. Save the configuration pressing "Ok"

statusword variable definition

  • Delete the shown variable
  1. Select the desired variable: In this case S-0-0051
  2. Press the "Delete" button

Delete variables

  • Create the "ResponseHandle" variable
  1. Select the blank space
  2. Press the "Insert" button
  3. Write the variable name
  4. Select the variable type
  5. Write the Pset and Offset values
  6. Select the data type
  7. Save the configuration pressing "Ok"

ResponseHandle variable configuration

  • Perform the same steps for each variable
  1. Select black space
  2. Press "Insert" button
  3. Configure the variable

Input variables configuration

  • The final screen should look as follows. NOTE: Be careful with the data type

Input configuration

NOTE: The Inputs group name can also be changed pressing the "Edit" button, but this is not mandatory.

Edit Input group name

7. Configure outputs

  • Perform the same steps as done with the Inputs
  • The final screen should look as follows:

Output configuration

8. Once the inputs and outputs have been configured, transfer the configuration to the ctrlX CORE

  1. Right click over "ethercatmaster"
  2. Press "Transfer field bus configuration"

Configuration transfer to ctrlX CORE

5. ctrlX PLC Engineering configuration

1. Start the ctrlX PLC Engineering program and create a new project

  1. Press "New project"
  2. Select the ctrlX CORE template
  3. Provide a project name
  4. Close the window by pressing "Ok"

PLC project creation

2. Communicate to the ctrlX CORE

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

Access to communication settings menu

3. Enter the IP Address, press "Run" button to check the connection, and close the window by pressing "Ok

4. Insert code and variables

  • Download the zip file which can be found at the end of this article, and save it in a reachable folder
  • In the ctrlX PLC Engineering program, in the "Project" tab, press "Import"

Access to file import menu

  • In the window, select the "Smart Function Kit.export" file provided in this article, and press "Open"
  • Select all the files and press "Ok"

Smart Function Kit files addition

IMPORTANT: To be able to import the folder, it is required that in the project tree, "Application" is selected. Otherwise, the insertable items will not be visible even though they are in the import file.

  • In the case some errors appear due to the lack of the OSCAT package, follow the steps:

Select "Tools" and press over "Package Manager".

Note: From versions above 1.16, this is not called "Package Manager", but "Add-On installer" instead

Access to package manager

Click over install and select the downloaded OSCATBasic package

Access to packages installation menu

  • Allow unsigned packages and press "Ok"

Allow unsigned packages

  • Follow the installation process:

OSCAT installation

Troubleshooting: It can be possible that it is not able to install the package because ctrlX IO Engineering is open. Make sure that all the ctrlX Engineering programs are closed. 

  • Once successfully installed, it is needed to add the library
  1. Double click over "Library Manager"
  2. Press over "Add library"

Access to library addition window

  • Expand the Miscellaneous tree and select "BASIC". Press "Ok" to close the window

Add BASIC library

  • Insert code and variables to the device project

Press over "POU" and drag it to any position so that a new window appears

POU window

The new window should look like as follows:

POU window with SFK folder

  • Drag the "Smart Function Kit" folder and move it over to "Application"

Add the SFK folder to the Device tree

 

  • The new window should look like as follows:

Smart Function Kit Final TreeSmart Function Kit Final Tree

  • In the "PLC_PRG" code section it is required to call to the Smart Function Kit program to be able to execute it
  1. Double click over "PLC_PRG"
  2. In the code section, just write "SFK()" and the program will be able to run

Line of code to run the Smart Function Kit program

5. Map variables

  1. Right click over "DataLayer_Realtime
  2. Press over "Edit"
  3. Press "Online from ctrlX CORE"

Access to the etherCAT devices

  1. In the new window, click over the black space and it will expand
  2. Select "ethercat_master_instances_ethercatmaster"

EtherCAT instances addition

NOTE: This will only appear if the the communication between ctrlX CORE and Engineering computer is successful (See step 2)

  1. Include the ethercatmaster instances
  2. Press the button to add the instances to the PLC project

EtherCAT instances addition to the PLC project

  • Check that the variables have been added and close the window

EtherCAT instances check

6. Variable mapping. In this section it will be shown how to map the data received from the Smart Function Kit with the defined variables in the PLC program

  1. Double click over IndraDrive
  2. Select the Datalayer Node IO Mapping tab 
  3. Double click over the "reponseHandle" input variable. NOTE: The statusword variable will not be mapped

ResponseHandle variable mapping

  • Extend the tree: Application -> Smart Function Kit -> SFK_GlobalVariables -> InputDataContainer. Select it and press "Ok", or double click over the variable

InputDataContainer variable selection

  • At the end of each variable description, indicate which variable of the array is assigned
  • For the "responseHandle" variable, position "0" is assigned as shown below:

Input selection

  • Perform the same steps for all the variable as shown in the image. Make sure that all of them match.

Data input and output overview

6. Testing

1. Open the visualization window

PLC visualization interface

2. Generate code and login to the ctrlX CORE

Code generation and Login buttons

3. Press the "Run" button and test the program

Run PLC program

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