Hi Ben,
Thank you for your response. Let me add a little background info... Our upcoming project requires a real-time OS, DAQ, data compression, etc. We would like to use NI LabVIEW RT as the real-time OS based on very favorable past experiences and successes with NI hardware and software. We do however have a requirement to support custom boards (which I understand we can do under LabVIEW RT using VISA) and to implement a data compression algorithm in software. We would like to use C/C++ for our data compression algorithm but so far I have not been able to confirm that this is possible under LabVIEW RT. The information I have been able to find on the NI web site has been confusing. For example in the LabVIEW RT FAQ section it says:
Can I use LabWindows/CVI or any other external compiler to program the RT Series hardware?
Not at this time. However, as of LabWindows/CVI 6.0, you can communicate with your 7030/60XX RT hardware using shared memory. To do this, use the LabVIEW RT communications functions under toolslib\cvirtsup. You can also build dll's in LabWindows/CVI that can be called by LabVIEW RT. To do this, set your dll target settings to build a dll for LabVIEW Real-Time only.
The response to the above question starts out by saying there is no external compiler for LabVIEW RT and ends by saying you can write LabVIEW RT dll's using LabWindows/CVI (an external compiler). Does LabWindow/CVI have a LabVIEW RT cross compiler that creates LabVIEW RT compatible dll's? I was hoping that someone who has actually tried writing LabWindow/CVI dll's for LabVIEW RT could confirm that this code will download and run on a LabVIEW RT system (please refer to the first part of my question).
Anyway, to address your question:
As I mentioned above we have to implement a data compression algorithm in software. Since we are unsure if we can use C/C++ with LabVIEW RT we tried to implement the algorithm in LabView 6.1 Our algorithm ran many times faster in MS C than it did in LabVIEW. Initially we felt that this was because we had to do a lot of bit manipulation (which we find very cumbersome and inefficient in LabView) so we decide to do a very simple test where we would simply add to numbers together in a for loop. We added 1 to a number incrementing it from 0 to 1,000,000,000 and timed how long the loop took. This is the test where MS C ran roughly twice as fast as LabVIEW.
Any comments on our test comparing C and LabVIEW and/or programming options under LabVIEW RT would be greatly appreciated.
Dave.