10-16-2018 08:47 AM
Hello.
I have a task to regulate 6 digital outputs using cRIO-9024 and certain c-series module and regulation is defined by some hardcore math...
Since I come from C/C++ and python environments I would like to make it easy on myself and write the code for the real time processor completely in C.
There is a thread that explains how to use C-api generator and vxworks tool-chain which I utilized and it works great. (thread) Now I can use C to program real time processor and control FPGA inputs and outputs using vxworks console.
Now I would like to implement some indicators and controls on the front panel that will run on the host PC.
My question is: is there an API that can be called to read from and write to the front panel that runs on host PC? Basically what I'm asking is: is there something called "host pc C-api generator" like there is FPGA C-api generator?
My goal is to completely avoid labview for programming real time processor.
10-16-2018 09:33 AM
@tonivarga wrote:
My question is: is there an API that can be called to read from and write to the front panel that runs on host PC? Basically what I'm asking is: is there something called "host pc C-api generator" like there is FPGA C-api generator?
Nope. One does not exist for LabVIEW either (at least outside of the development environment). You can make your own communication protocol and use the Ethernet port to talk to an application on the PC that acts as your GUI.
10-17-2018 06:06 AM
Ok thanks for advice. If I understood correctly, I should create a server on host PC that will comunicate with a client (real time processor). Server side can somehow be implemented using labview block diagram programming, and I can use vxworks application api reference to implement the client side on a real time processor (for example using socket application client library-salClient). Is this correct approach? Are there some examples that I can recycle?
10-17-2018 07:02 AM - edited 10-17-2018 07:02 AM
@tonivarga wrote:
Ok thanks for advice. If I understood correctly, I should create a server on host PC that will comunicate with a client (real time processor). Server side can somehow be implemented using labview block diagram programming, and I can use vxworks application api reference to implement the client side on a real time processor (for example using socket application client library-salClient). Is this correct approach? Are there some examples that I can recycle?
That is exactly correct. Personally, I am a big fan of the STM library. I think somebody made a C++ version of it as well. I don't have time to dig around right now to find it. But the protocol is simple enough to implement as long as you know how your data is formatted.
10-17-2018 08:10 AM
Thank you for the suggestions, I will go through STM Library when I catch some time and report progress, share the code etc...