- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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:
- Smart Function Kit for pressing and joining applications
- Catalog Smart Function Kit for pressing and joining
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.
2. Prerequisites
- ctrlX PLC Engineering (LTS Version 1.20 or higher)
- ctrlX IO Engineering (LTS Version 1.20 or higher)
- Smart Function Kit for pressing and joining
- ctrlX CORE (LTS Version 1.20 or higher)
- Free OSCAT Package from Codesys Store (see 5.)
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.
- 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:
- Access configuration menu
- Press the "System" tab
- In the same tab, scroll down to the Fieldbus configuration section, choose the Ethercat connection and save the configuration
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 (X23 P1).
2. Download the file provided at the end of this article ("Smart Function Kit IO Configuration"), and open the ctrlX IO Engineering program
- Press "Open project"
- Search the downloaded file and select it
- Press "Open"
2. Check connection between ctrlX CORE and engineering computer
- Right click over the ctrlX CORE node
- Select "Communication settings"
- Introduce the ctrlX CORE IP address, and check the connection by clicking the "Run" button. Once checked press the Apply button.
3. Once the program and the ctrlX CORE are correctly connected, transfer the configuration to the ctrlX CORE
- Right click over "ethercatmaster"
- Press "Download"
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
- Press "New project"
- Select the ctrlX CORE IO Template
- Provide a project name
- Close the window by pressing "Ok"
3. Add device
- Right click over "ethercatmaster"
- Select "Scan for Devices"
4. Select the IndraDrive device
- Press the shown button to add the scanned device
- The device name could be adapted (t.e. SFK_01), then press "Apply" and close the window
5. Enable expert settings
- Double click over the previously added device
- Select the "General" tab
- Enable "Expert settings"
6. Configure inputs
- Access "Expert Process Data" window
- Edit Status word variable
- Select "S-0-0016"
- Select the "Master control word" variable
- Press the "Edit" button
- Write the name: "statusword"
- Change the data type to "WORD"
- Save the configuration pressing "Ok"
- Delete the shown variable
- Select the desired variable: In this case S-0-0051
- Press the "Delete" button
- Create the "ResponseHandle" variable
- Select the blank space
- Press the "Insert" button
- Write the variable name
- Select the variable type
- Write the Pset and Offset values
- Select the data type
- Save the configuration pressing "Ok"
- Perform the same steps for each variable
- Select black space
- Press "Insert" button
- Configure the variable
- The final screen should look as follows. NOTE: Be careful with the data type
NOTE: The Inputs group name can also be changed pressing the "Edit" button, but this is not mandatory.
7. Configure outputs
- Perform the same steps as done with the Inputs
- The final screen should look as follows:
8. Once the inputs and outputs have been configured, transfer the configuration to the ctrlX CORE
- Right click over "ethercatmaster"
- Press "Download" / "Transfer field bus configuration"
5. ctrlX PLC Engineering configuration
1. Start the ctrlX PLC Engineering program and create a new project
- Press "New project"
- Select the ctrlX CORE template
- Provide a project name
- Close the window by pressing "Ok"
2. Communicate to the ctrlX CORE
- Right click over "Device"
- Press over "Communication settings"
3. Enter the IP Address of the ctrlX CORE, 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"
- In the window, select the "PLC_SFK_Pressing_v1_0.export" file provided in this article, and press "Open"
- Select all the files and press "Ok"
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:
Download the OSCAT library as a package from CODESYS store: Link
Select "Tools" and press over "Add-on installer". After please close the ctrlX PLC Engineering.
Note: Before versions 1.20, this menu is called "Package Manager".
The Add-on installer will be opened and then click over install and select the downloaded "OSCATBasic.package":
Note: due to several versions the look and feel will be quite different. But the functionality will be the same.
- Allow unsigned packages and press "Ok"
- Follow the installation process:
Troubleshooting: It can be possible that it is not able to install the package because ctrlX PLC or I/O Engineering is open. Make sure that all the ctrlX tools are closed.
- Once successfully installed, it is needed to add the library within the PLC Engineering project.
- Open the PLC Engineering project
- Double click over "Library Manager"
- Press over "Add library"
- Expand the Miscellaneous tree and select "BASIC". Press "Ok" to close the window
Important
It is possible that OSCAT does not show up under Miscallaneous, but under Application -> Utils -> BASIC. If this is the case, also the Namespace of the Library has to be changed to BASIC
Now, let us call the demo program...
In the "PLC_PRG" code section it is required to call to the Smart Function Kit program to be able to execute it
- Double click over "PLC_PRG"
- In the code section, just write "SFK_Example_Program();" and the program will be able to run
5. Map variables
- Right click over "DataLayer_Realtime"
- Press over "Select realtime data"
- Press "Selectively from ctrlX CORE"
- In the new window, click over the black space and it will expand
- Select "ethercat_master_instances_ethercatmaster"
NOTE: This will only appear if the the communication between ctrlX CORE and Engineering computer is successful (See step 2)
- Include the ethercatmaster instances
- Press the button to add the instances to the PLC project
- Check that the variables have been added and close the window
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
- Double click over SFK_01
- Select the Datalayer Node IO Mapping tab
- Double click over the "responseHandle" input variable and click on the three dots. NOTE: The statusword variable will not be mapped
- Extend the tree: Application -> Smart Function Kit -> SFK_GlobalVariables -> InputDataContainer. Select it and press "Ok", or double click over the variable
- 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:
- Perform the same steps for all the variable as shown in the image. Make sure that all of them match.
6. Testing
1. Open the visualization window
2. Generate code and login to the ctrlX CORE
3. Press the "Run" button and test the program
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.