01-01-2014 11:19 PM
Hello:
I'm developing an application where I'm in need to modify the values of some Network Variable Engines hosted on an RT Target (an sbRIO 9632) from a C++ application developed in Visual Studio 2010. I've found in this link that the Network Variable API may be the best option for doing this. However that post is about 3 years old, and I wanted to be sure that no better option is available now. I've searched for a while, but I've been unable to find something else.
Can someone tell me if this is still the best method to do what I have to? Has somebody performed some tests with it? Is there any new method?
Thank you in advance.
Robst - CLD |
Using LabVIEW since version 7.0 |
01-02-2014 04:00 PM
Hello Robst,
Thanks for using the NI forums! The only official way to access variables between different platforms is via a DLL. A Network Shared Variable/Shared Variable is a NI technology and uses a proprietary network protocol and unfortunately it cannot be accessed so easily to its content other than with LabVIEW, LabWindows/CVI or an NI product. Maybe there are other open source tools that might be able to provide some access but without guarantee.
What I suggest you is to implement a TCP network solution to enable communication between your sbRIO and your C++ application.
Hope this helps!
Regards,
Luis C.
National Instruments
Ingeniería de Aplicaciones
01-20-2014 06:42 PM
Hello Luis:
Thank you for your reply. Yes, I agree that using TCP/IP would be a good approach, actually we have used it in some applications. I just wanted to know if it was possible to directly communicate with NI Network Shared Variables.
For the prototype I'm currently developing, I used the approach suggested by user Beerman006 in the stackoverflow post I referenced to in my first post. I used the Network Variable API from CVI and linked against it from MSVS2010. It worked fine after some tweaks in the VS project configuration.
Another approach I tried was to create a LabVIEW DLL with VIs that read/write the shared variables and reference the DLL from my C++ application. This also worked for a 32 bit environment. I could not use this approach for this prototype because the software will be a 64 bit app, and since I do not have LV 64 bit, I could not create a 64 bit DLL.
Best regards.
Robst - CLD |
Using LabVIEW since version 7.0 |