ctrlX PLC and Datalayer

Set up a ctrlX PLC project to publish variables to the ctrlX Data Layer

Community Moderator
Community Moderator

This guide shows how to set up a project for the ctrlX PLC that is able to publish variables to the ctrlX Data Layer. This can be used for a real ctrlX CORE or also a ctrlX COREvirtual.

  • A real or a ctrlX COREvirtual control has to be connected to the network.
  • Installation of the Rexroth PLC app on the crtlX CORE is expected.
  • Installation of ctrlX PLC Engineering (part of ctrlX WORKS) expected. Please have a look at the corresponding documentation or video to see how to do this.


Set up a ctrlX PLC project


  1. Open the web based engineering of the ctrlX CORE via your network folder of Microsoft Windows, our tool ctrlX WORKS or directly by inserting the IP in a web browser and login.
    connect and loginconnect and login

  2. Open the ctrlX PLC Engineering via the "Automation" bar by clicking on the corresponding link.

  3. When opened this way and no previous PLC project is found on the ctrlX CORE a basic standard project will automatically be created and you got asked where to save it on your PC and if the source code should be synchronized to your control.

  4. To be able to publish variables to the data layer or also OPC UA a symbol configuration have to be availbe in the project. All variables of your application can be added as symbols e.g. out of a global variable list.
    Add GVL and symblo configurationAdd GVL and symblo configuration

  5. Insert the variables that should be published to the GVL and delete the pre-insert first line.
    In this example Integer "i" and Boolean "bStart". Also structures could be chosen.

  6. Set a small example program in the "PLC_PRG" where “i” is count up as long as “bStart” is true.
    GVL and example programGVL and example program

  7. There are two ways to add these variables now to the symbol configuration:
    1. First is to execute a “Build” and tick the variables you'd like.
    2. Alternatively, add a pragma to the global variable list that causes all variables in this list to be published.Configure symbols or GVLConfigure symbols or GVL
  8. The communication settings had been set automatically so it is possible to directly log in to the control. To see the settings double click on the target on the left hand side.

  9. A security warning will be displayed because the certificate for the communication is self-signed and is not provided by an official certificate authority. Please go on login with your user and password available on the control and download the created project.Login and downloadLogin and download

  10. At last, the application is started via the play button in the top menu bar or alternatively via right clicking on "Application".
    Run applicationRun application
  11. Now variables can be manipulated in your program PLC_PRG. E.g. double click on the value of bStart and then press "CTRL + F7" or alternatively use the "Debug" menu bar.

  12. Now "i" is rising in the cycle tact of your program.

  13. To check the data in the ctrlX Data Layer open the viewer via the link in the "System" bar in the web interface of your ctlX CORE. There the variables are visible and also changeable. Please refresh the view with the small button on right if the values are static.2021-02-11_11h34_49.png

Related links
Technical sales support from Bosch Rexroth
Must Read