03-14-2011 09:48 AM
Hi,
since 2 days I have been struggling to find a dll or lib which I can use without any problems for controlling NI USB 6008 card. I am not sure if it is possible to control usb from teststand.
All I could find was:
- NIDAQmx.lib file. Which when I tried to use with test stand, most of the function gives following error "PArameter information or user type not recognized by teststand"
- NationalInstruments.DAQmx.dll which is a .net dll. The problem here is if I have to call a function inside a subclass of a class (for example class X has an object of class Y and I am calling x.y.functionInsideY()) whcih is not possible in TestStand (?).
Please post if you know the solution.
Regards
RB
Solved! Go to Solution.
03-15-2011 03:53 AM
Hi RB,
are you going to use a code module for that or do you want to call the lib direclty in TestStand?
This would not be the normal way to do it, so it would be good if you would explain it a little bit more.
Thanks, RMathews
03-15-2011 04:05 AM
I want to call functions inside library. I think its a usual practice in TestStand. I can specify a module in TestStand and then call functions available in it. It can either be a CVI or .NET library/assembly file.
03-15-2011 04:48 AM
Hi RB,
well, Teststand itself can not communicate with hardware, this is why we have the code modules. If you want to use the DAQmx you could use the dll itselft, but the problem will be that the parameters will not be recognized direclty, so in this case you really have to use code module like CVI. This is the normal procedure we have with drivers.
In CVI you can find a lot of examples for DAQmx, so I would recommend you, to use that ones and see how it works.
Hope this helps, RMathews
03-15-2011 05:15 AM
Hi Mathews,
you are right. The parameters are not recognized by TestStandt. I went through the examples in CVI and the problem is that these examples inlude .h files (NIDAQmx.h..) something that I can not do in TestStand.
-RB
03-15-2011 05:49 AM
Secondly. it is not easy for me to beleive that "NationalInstruments.DAQmx.dll" is not compatible with TestStand at the time when devices from many companies are compatible with TestStand but NI is not able to do that. I think I am doing something wrong.
I have attached a document to explain the issue. It may help you to help me out.
Thanks for taking time
RB
03-15-2011 07:42 AM
I dont believe there are many devices, from NI or other companys, that you can directly interface to the device software driver from TestStand. Usually you have go through a wrapper code module.
03-15-2011 07:44 AM
Hi RB,
the problem we have here, is that Teststand is not a Programming Language and you can not communicate with the hardware directly. This will not work.
To me it seems that you want to communicate with the driver of the hardware (in this case DAQmx) in Teststand. This is not the way it works.
What you have to do is to write a code module in CVI or .Net, which interfaces with the driver and acquires the data. You would then create a dll or a .NET assembly out of this code and that one you can include in Teststand. You have the driver communication encapsulated in the dll or the assembly and Teststand just calls this "wrapper".
Cheers, RMathews
03-15-2011 08:08 AM
Sorry, but by mistake I clicked at "Accept at spoluton" rather that at "replying".
Now you are confusing me Mathews
"........What you have to do is to write a code module in CVI or .Net, which interfaces with the driver and acquires the data. You would then create a dll or a .NET assembly out of this code and that one you can include in Teststand. You have the driver communication encapsulated in the dll or the assembly and Teststand just calls this "wrapper".........."
So you mean, although a dll is already available from NI (as NationalInstruemnt.DAQmx.dll) and I should make one more dll to call functions inside the NI dll file in order to communicate with hardware?
I have Keithley, Agilent devices which supplies .dll that I can connect directly in TestStand.
03-15-2011 08:14 AM
Hi Farmer,
but what is a wrapper code module?
Ultimately you write some code to communicate with hardware, wrap it in dll and make it available it to TestStand. So if a company is already supplying "wrapped code module" then why to abstract it once again in own wrapper.
By the way, I have 7 devices with me from different companies and except NIDAQmx, I did not write extra code (wrapper) for testStand. I used simply dll supplied with them.
Regards
RB