FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
01-02-2024 07:47 PM - edited 01-02-2024 08:33 PM
Hello,
I'm trying to create multiple applications in PLC Engineering 2.4.1 running on a single CtrlX Core for testing purposes. I can get them to run, and now I'm trying to determine how to share data between these two applications. I know I can put variables in my first application in the Data Layer using the Symbol Configuration, then I can make a watchlist of those variables, then I can setup a program in the second application to read them, but this seems like a lot of extra steps to share data between applications. Is there another method to do this that I'm unaware of?
I was hoping I could create a GVL at the root of the 'PLC Logic' part of the Project Tree that both applications could access, as this seems like the easiest way to share data from one PLC application to another. However, I'm only able to create another Application there at the moment.
EDIT: I searched and found that you can create a GVL in the POUs view in PLC Engineering. However, when I write a value to one of the variables in this list from one application and then try to read it in the second application, the second application reads 0. It is like each application has its own instance of the GVL that it uses, which is not very useful.
Solved! Go to Solution.
01-03-2024 02:56 PM
Hello!
Yes your comments are right. Up to now there is no common GVL available supporting more that one application.
The need to an easy way to share data between two/several applications is obvious - unfortuantley we can not offer an available solution yet. It will come but can not provide dates about the time schedule.
What are alternative options ?
- NVL : udp-based communication.
- OPCUA ? Symbol config on both PLCApplication provided to outside with 1 UA_Server/Client. Know exchange within in th PLC internally.
- SharedMemory code implementation - Will work but needs to be implemented on both sides.
- Datalayer-access via CXA_Datalayer ... in case the symbol config provides the variables to the Datalayer the 2nd application can access the data via the provided FBs... but restricted on basic datatypes..examples available as code and on forum.
- complex-data like structures needs to be accessed via flatbuffers. Details about the coordinted access are partwise available under CXA_Flatbuffer but needs expert experience. Details follow is needed - next week.
01-10-2024 07:13 PM
Hello,
Thanks for the ideas. I think for now the NVL is the best solution in terms of not requiring extra steps of communication handling and the setup is all done through the Engineering interface. I was able to set the IP to localhost (127.0.0.1) and the secondApp was able to Receive the data.