Introduction
This article is about how to read PROFINET values from a ctrlX PLC Engineering program using the Data Layer. For this tutorial, it will be assumed that the user has correctly configured a ctrlX CORE plus X3 and receiving values via the PROFINET connection.
Note:
If the user wants to read the PROFINET values from the Data Layer, the following steps are required:
- Go to "Settings"
- "Data Layer"
- Expand the tree as shown
- Check the realtime values
Prerequisites
Configuration
Step 1: Open the program of the ctrlX PLC Engineering and create a new project
Step 2: Communicate with the ctrlX CORE
- Right click over "Device"
- Press "Communication settings"
- Write the ctrlX CORE's IP address
- Test the connection by clicking the "Run" button
- Close the window by pressing "Ok"
Step 3: Add PROFINET Real time data
- Right click over "DataLayer_Realtime"
- "Edit" -> and press "Online from ctrlX CORE"
- In Source, select the "profinet_device_instances", and add them to the project
- Select the scanned instances
- Add them to the project
- Close the window
- Once the instances have been added to the project, the project tree should look as follows:
As it can be seen, a 128byte input and output were configured in the PROFINET Device app.
Note:
These inputs and outputs can be configured from the PROFINET Device app as shown in the following image:
Step 4: Set up additional configuration to read the updated values
- Double click over "byte_128_in"
- Access the "DataLayerNode I/O Mapping" tab
- In the "Always updated variables" section, select "Enabled 2 (always in bus cycle task)"
Step 5: Read values
- Login to generate code and transfer the PLC program to the ctrlX CORE
- Check the updated values