LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing C programs for Labview RT

I am conducting research on automated manufacturing processes. We have an 8186 controller that is controlling our machine. The professor I am doing research with and myself prefer to write programs in c or c++. We would like to retain the real-time aspect of the Labview RT OS. We use version 7.1. Is there a way we can have that os run a program we have written in C? If so how would we do this.

Thanks
0 Kudos
Message 1 of 3
(2,733 Views)
The RTOS used by LVRT can call DLLs. I'm not sure if there are any special requirements, but I am fairly sure that they will destroy the real-time part of your app, because you take the ability to manage this out of the OS's control. Then again, I could be wrong. Maybe if your code is threadsafe and you call it properly it will work fine. I haven't done this myself, anyway.
 
You can find a document about calling external code in LV by clicking Help>>Search the LabVIEW Bookshelf. You can probably also find some reference by searching the LVRT bookshelf. You can also search the DevZone area of this site for many documents.

___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,727 Views)
Though I have not had to do this yet, I've been told that you can get dlls certified by NI to run in the RTOS.

But even doing this you'll still have to write LabVIEW VIs to call the dlls.

Remember, you're dealing with LabVIEW Real Time. It is designed to programmed from LabVIEW. There are other Real Time operating systems you can get that are targeted from C/C++. You might want to look into those.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 3
(2,723 Views)