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.
11-28-2023 07:54 PM
Hello Community,
Currently I have a compactRio sending millions of data via UDP protocol to a ordinary computer, I would like to replicate but with the CtrlX.
Do any of you know how to connect the CtrlX with the UDP protocol to be able to run C++ on the CtrlX to manage all this data?
I know that they are 3 debugging options with C++, but I can not find anything in documentation with UDP.
Thanks in advance
11-28-2023 08:27 PM
Hello @Josaphat_Aviles,
To clarify, you have c++ code that is handling the compactRio data? If you have this working on a separate computer, you can completely reuse the UDP networking code in a snap for ctrlX OS. To my knowledge, there are not any samples in the SDK utilizing UDP protocol, but there should be no technical problem for you to implement this in your application.
See the SDK cpp examples: samples-cpp
11-28-2023 09:12 PM
Hello @Sgilk ,
Thanks for your prompt reply, that's right I already have the c++ code on the windows computer, which is supposed to be very easy to implement in ctrlx, however I can't find any specific information or documentation on how to do it.
What I do find is that there are three ways to debug C++ but none of them mention UDP, so I wanted to ask if anyone has worked on something similar and which of the three do you recommend?
Meantime I will check cpp examples.
11-28-2023 09:38 PM - edited 11-28-2023 09:40 PM
All three of these debugging methods will be useful. If this were me, I'd test the C++ application locally in my build environment using method #2 to start. This isn't really the focus here though... if your code is working on the other computer, there should be no need to debug immediately. The fact that you are using UDP is really not important to the integration with ctrlX OS.
What you need to do is package your c++ code as a snap to install in the ctrlX OS. See the quick start guide to get started. Please let me know if you have any questions throughout this process.
Also, what do you plan to do with the data once you've acquired it via UDP in your c++ application? You may want to look at the datalayer provider example here, as this will be a useful method of storing and communicating your application data to other ctrlX processes.
11-28-2023 10:17 PM - edited 11-28-2023 10:22 PM
One tip: In addition to sgilk's suggestions, you might want to review the network and network-bind snapcraft interfaces.
11-28-2023 11:45 PM
Thank you for your response, I use UDP because require 6 Million data peer second, I read that second one it is the slower, but let see what happend.
And once I have the data I just storage in csv file. But perhaps the second stage is process in real time in C++ to AI models. This data layer that you mention is able to do that? It require a license?
Thank you
11-28-2023 11:47 PM
@bostroemc, thank you for the tip.
11-28-2023 11:53 PM
The datalayer is a feature of ctrlX OS and does not require a license to use. You can provide and consume data via this broker using real time memory maps.
You can find documentation on the topic here: Datalayer Real Time
And an example here: Example
09-05-2024 11:44 AM
@Josaphat_Aviles Are there any news? Can this topic be closed?