09-13-2012 07:30 PM
I'm working on building an outdoor antenna test range. I'm looking for a little direction. I have a Agilent 8753ES Network Analyzer for polling data and it works nicely with LabVIEW. My issue is getting the USB connected positioner/controller unit to play with LabVIEW. It appears no one has posted about it specifically, it is a WR-RCU-100 from WinRadio. I'm a little rusty when it comes to programming, but the provided SDK (http://www.winradio.com/home/rcu100_sdk.htm) is detailed enough that I can write the appropriate routines in C/C++. I'd like to be able to do these routines inline with polling data through LabVIEW. Basically, controll the unit from LabVIEW directly.
Initially, I tried to load the Header and DLL directly into Labview as a Shared Library but I was unable to. The API creates a single Function CreateInstance, which is not included in the Header file and stops Labview from proceeding. I guess my question is whether loading the DLL this way (after making adjustments) is the proper/easiest way to interact with my controller unit? And, what steps do I need to take to make things compatible/functioning for my setup?
My first impulse was to write external code and have LabVIEW execute it, but I'd like to have a little more controll over my Controller, pun inteneded
09-14-2012 11:10 AM
09-14-2012 05:26 PM
Hi Patrick,
Thanks for the reply. I'm a little unsure as to what you mean by load a single function into LabVIEW The API only has a single function and that is what is stopping me from loading the API into LabVIEW. Every function call seems to be tied into using the initial CreateInstance and the interfaces it points to. How do I load a single function call into LabVIEW from the API?
09-17-2012 09:11 AM
Hi BebopX,
I am going to continue looking into this issue for you but I have found a link that walks you through creating wrappers using the Import Shared Library Wizard. Take a look and let me know if this is alone the lines of what you are trying to do. There are also some attached files at the bottom that you can use to try this out.
https://decibel.ni.com/content/docs/DOC-9078
09-17-2012 01:08 PM
Hi Patrick,
I think this is where I'm getting stuck at http://zone.ni.com/reference/en-XX/help/371361D-01/lvdialog/dll_config_paths/. It says, Windows.h and CreateInstance () need to be included in the preprocessor definitions and paths. I've attempted to path to the directory for Windows.h but it doesn't seem to work. Or atleast it still gives me the same header not found.
This is the reference to Create_Instance in the API's header file:
typedef BOOL (__stdcall *CREATE_INSTANCE)(UINT32 ClassId,void **Intf);
Do I need a preprocessor definition? If so, how would I write the preprocessor definition?
This is what I'm getting when I try to load the API's header and DLL.
09-18-2012 08:05 AM
09-21-2012 04:33 PM
The Import Shared Library example files worked without any issues.
09-24-2012 07:22 PM
The CreateInstance function is not defined in the header file. This is required in order to use the Import Shared Library Wizard. You mentioned that you tried to load the header and DLL directly into LabVIEW. How did you do this? Did you use a Call Library Function node?
09-24-2012 08:02 PM
All I ment was that I tried using the Import Shared Library without modifying anything. The files were provided by WinRadio.
09-25-2012 06:42 PM
I would suggest tryign to call the CreateInstance() function of the WRRCU100API.dll directly using the Call Library Function Node. You can do this by followign the steps in the example listed below.
Configuring the Call Library Function Node - http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcodeconcepts/configuring_the_clf_node/
Example - https://decibel.ni.com/content/docs/DOC-9069