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