FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
6 hours ago
Hello everybody,
Our customer is planning to migrate their real-time code from an industrial PC to the ctrlX platform. The code is written in C and consists of a series of services managed by a task manager.
In the Real-Time SDK, I only find examples related to C++. Is it possible to use C, particularly to interface with the ctrlX scheduler?
Thank you in advance!
2 hours ago
Hi @DavidePalombo ,
The realtime system of ctrlX OS utilizes the Apache Celix framework. You can absolutely run services written in C, but there will be some C++ required to build as a Celix bundle. There is an example in the realtime SDK (samples-cpp/plc-c-interface) which creates a Celix bundle containing services written in both C and C++.
To access the realtime SDK, a training is generally required. See this article.
2 hours ago
Hi Sgilk,
thank you for your reply. I'll be a bit more specific:
I already have access to the realtime SDK. I read the documentation so I know the realtime system of the ctrlX utilizes Apache Celix. In particular the Celix framework support building bundles written in C (e.g. celix/examples/celix-examples/hello_world_c at master · apache/celix).
My first idea was to build a Celix bundle directly written in C, but looking at the examples provided in the rt-SDK, they use external C++ files, in particular:
7m ago
I don't believe we support C Celix bundles at this time. @nickH , please correct me if I'm wrong here.
Why would there need to be a heavy refactoring of the C services to wrap them in C++ bundles? I would think you could use them as is.