ctrlX PLC and Datalayer

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

CodeShepherd
Community Moderator
Community Moderator
Overview

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.

Preparation
  • 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.
    2021-02-11_11h02_51.png

  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.
    2021-02-11_11h07_58.png

  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.
    2021-02-11_11h27_43.png

  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
CodeShepherd
CodeShepherd
Technical sales support from Bosch Rexroth
3 Comments
CodeShepherd
Community Moderator
Community Moderator

Updated textual version to system version 1.6 (RM20.11)

PLC2030
Long-established Member

It is not ne necessary to create a global variable list. You can define any variable as symbol variable. Symbol variables are publihsed to the data layer.

ThorstenX
Community Manager
Community Manager
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