LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface to host PC

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.

0 Kudos
Message 1 of 5
(2,576 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,552 Views)

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?

0 Kudos
Message 3 of 5
(2,525 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,521 Views)

Thank you for the suggestions, I will go through STM Library when I catch some time and report progress, share the code etc...

0 Kudos
Message 5 of 5
(2,513 Views)