Data Engine access from CODESYS

Data Engine access from CODESYS

This article contains two project parts – a CODESYS NoVisu project and a Qt GUI application.

The two projects use the Data Engine (DE) to send signal values between the two applications. The DE signals in the Qt application have been created with the QtCreator DE plugin. The consumer signals shown on the Qt GUI application are updated from the CODESYS application and some producer signals in the Qt application can be detected in the CODESYS application, by using the IDE.

To connect your CODESYS application to Data Engine, the CCSAP library must be installed from the CCSAP project archive in your IDE. This is described in another KnowledgeBase article – “CODESYS Data Engine example”.

The included examples at the bottom of this page are default compiled for an iMX8 unit (V700) device. The CODESYS application can be downloaded from your IDE and the Qt application could be deployed from the VM environment (LinX SW Suite v4.0).

Add the similar signal Data Engine initiation as can be found in the source code example “sap_Init” in the included example project. The image below shows an extract of this source code:

 

After the initialization (above), you can access the different signals as normal variables. It is essential that you use the exact upper/lower case characters as the ones that have been stored in DataEngine. Any updates in the Data Engine will directly change the variable value, and any change of the variables will be transmitted to the data engine.

The attached Qt project displays signals from CODESYS (consumer) in the GUI and send some signals from the GUI to the CODESYS application (producer). The image below shows the GUI visualization on the V700 target.

 

Test environment V700 target:
- CODESYS runtime: codesys_arm_imx8_visu_V3.5.16.40-34
- LinX-Base RT: linx-base_4.0.1_v700.run
- Qt/QML project: Test_DE_V700_project

Preconditions (on target):
• Remove cclauncher
• CODESYS IDE used to download example project: V3.5 SP16 Patch 1 (64-bit)

Test environment VM:
- LinX SW Suite v4.0
- LinX Upgrade for V700
- Qt/QML project: Test_DE_V700_project.zip

Test environment PC/Laptop:
- CODESYS IDE: CODESYS V3.5 Patch 1 (64-bit)
- CODESYS archive: TEST_DE_V700.projectarchive

    • Related Articles

    • Access CCpilot VI2 Hardware Buttons and Buzzer from CODESYS

      This CODESYS application example shows how the state of the hardware buttons and the buzzer on the CCpilot VI2 display can be read and used in the application. There are four squares for ech of the buttons and when a button is pressed, the square ...
    • CODESYS Use other fonts

      How to use other fonts (i.e. Chinese) Steps to do on the CrossControl devices 1. Remount the file system in read-write mode This is only valid for iMX5, iMX6 and Intel Atom devices. # sudo mount -o remount,rw / (Use the command mount -o remount,rw / ...
    • Device Description files and libraries for CODESYS

      We have prepared a project archive for CODESYS which contains all the current Device Description Files as well as the CCAUX and CCSAP libraries necessary for CODESYS programming on CCpilot Display Computers. Content: Crosscontrol CODESYS Development ...
    • Diagnostic Messages Qt App Example

      An example of J1939 Diagnostic Messages received, handled and displayed in a Qt Quick2 application (QML) on the CCpilot Display Computers or on the Virtual Machine (UX-Designer v5.0). Example Application running in Virtual MAchine This example ...
    • Installing the LinX-Base runtime on a CCpilot iMX8 display

      When you order a product with LinX-Base (UX-Designer, Fieldbus Access and Data Engine) the required runtime will be pre-installed. If you still need to download this runtime package manually, follow the steps below. This article is valid for all the ...