NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO programming with C/C++ and no LabVIEW

Solved!
Go to solution

Good morning,

 

sorry if this question has already an answer, I've not been able to find it browsing the net.

 

I'd like to access cRIO input / output programming with plain C/C++ without any LabVIEW / LabWindows in the middle, is it possible? I've not been able to find any positve (or negative) answer to this question, nor I've been able to find any example.

 

Reason is: after several years with LabVIEW I can't no more stand its, from my point of view unacceptable, weak points, such as making source control useless. I want to read cRIO input and set cRIO outputs without any LV in between.

 

Thanks for any suggestion.

Andrea

0 Kudos
Message 1 of 13
(6,019 Views)
Solution
Accepted by Andrea_Angeloni

There are a couple of different ways to answer your question. The best answer is "it depends."

Note that I'm only touching on standard module types. For example, NI-XNET does have a C API but I've never tried using it directly on a CompactRIO.

 

Lastly, for your source code control comment I'd suggest searching the standard LabVIEW Forums for advice on addressing that. I've seen plenty of people get it working though there are a few special configurations you should use (such as separate compiled code). 

Charlie J.
National Instruments
0 Kudos
Message 2 of 13
(5,980 Views)

In addition to what Charlie already mentioned, there's also this page with some additional info: C/C++ Embedded System Design Tools

Message 3 of 13
(5,969 Views)

Good morning Charlie,

 

thank you for your quick answer.

As far as at the moment I'm supposed to use only simple analog / digital input / output, perhaps my best choice is to write some very simple LV code just to broadcast via UDP all the signals and work harder on C++ side.

 

Regarding versioning, I think it does not exist a real solution, being LV graphical it will never be able to look at diffs as done with textual messages. Anyway, it is not the right place to complain about why LV has some problems 🙂

 

Regards,

Andrea

0 Kudos
Message 4 of 13
(5,960 Views)

Thank you, I already read that link without finding an answer.

Regards,

Andrea

0 Kudos
Message 5 of 13
(5,959 Views)

Hi,

 

I am also trying to solve the similar requirement, Remove Labview dependency for compactRIO controller and use plain c++ to program cRIO

Please help me in understanding what is the correct solution here

 

 

0 Kudos
Message 6 of 13
(5,822 Views)

Hi PoonamD,

 

don't take offence, I think you should read again your message, it is not so clear what you mean... Are you quoting another thread?

 

Nevertheless, as far as I know (and I'm not a cRIO expert at all!!) "modern" cRIO don't have VX works, they run a patched Linux kernel.

 

As has already been kindly suggested to me, I don't think we can have plain cRIO without LabVIEW (or LabWindows/CVI). You must pass through NI software.

 

Let me know if it helps you.


Andrea

0 Kudos
Message 7 of 13
(5,811 Views)

Hi all, 

 

Just to reduce future confusion, please refer to GatorBait's post above; that is correct information. You are not required to program a cRIO (or RT PXI) with LabVIEW; you can use non-NI software. 

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 8 of 13
(5,790 Views)

Hi Rita,

 

would it be possible to do it, for example, with a chassis NI 9147? It does not support DAQmx, and in my understanding if I have to use scan engine I MUST use NI software.

 

So maybe correct statement is: you can use cRIO without NI software ONLY if it supports DAQmx.

 

Thanks for correcting me, these are important information for me, that could save thousands of dollars in software licenses.

0 Kudos
Message 9 of 13
(5,770 Views)

Hi Andrea,

 

You are correct that the NI 9147 does not support NI DAQmx. It does support LabVIEW FPGA and Scan Engine. For both of these cases, you would need LabVIEW (either for Scan Engine access or for LabVIEW FPGA). With a LabVIEW FPGA bitfile you would be able to use C/C++ instead of LabVIEW but LabVIEW FPGA would still be required to generate the bitfile. 

 

Additionally, the NI 9147 is an Ethernet RIO controller and is not an embedded system in quite the same way a CompactRIO with DAQmx would be. Any application software would need to be run on a separate host instead of being run on the device. 

 

Overall, I'd recommend reaching out to NI Support or NI Sales through official channels to get a better understanding of what your options are given your requirements. The forums aren't really the best place to discuss specific application requirements. 

Charlie J.
National Instruments
0 Kudos
Message 10 of 13
(5,747 Views)