02/16/2023

PROFINET - Read PROFINET Device App values from ctrlX PLC Engineering


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:

  1. Go to "Settings"
  2. "Data Layer"
  3. Expand the tree as shown
  4. 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

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


  3. Write the ctrlX CORE's IP address
  4. Test the connection by clicking the "Run" button
  5. Close the window by pressing "Ok"


Step 3: Add PROFINET Real time data

  1. Right click over "DataLayer_Realtime"
  2. "Edit" -> and press "Online from ctrlX CORE"


  3. In Source, select the "profinet_device_instances", and add them to the project
  4. Select the scanned instances
  5. Add them to the project
  6. Close the window


  7. 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

  1. Double click over "byte_128_in
  2. Access the "DataLayerNode I/O Mapping" tab 
  3. In the "Always updated variables" section, select "Enabled 2 (always in bus cycle task)"


Step 5:  Read values

  1. Login to generate code and transfer the PLC program to the ctrlX CORE
  2. Check the updated values

Related Links

2

Latest published/updated articles

Types
How-to
Categories
PLC