Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with the wrapper created for NI DMM 4071

Hi,
 
I have generated a .net wrapper using NI Measurement Studio for the IVI C driver of DMM 4071 (nidmm_32.dll). Now I am trying to get the corresponding class driver for it. The code looks like:
 
using DotNetWrapper; //Dot net wrapper over the Dmm driver
using Ivi.Driver.Interop;
using Ivi.Dmm.Interop;
 
class Sample
{
   main()
  {
     DotNetWrapper.nidmm = new nidmm("DmmLogicalName",true,true);
     IiviDmm classDriver = (IiviDmm) nidmm; //getting runtime error here that typecasting is invalid
  }
}
 
 
I am getting a runtime error that DotNetWrapper.dmm cannot be converted to IIviDmm. Kindly help me out!!
I need to get the IVI class driver handle for Dmm specific driver.
 
Thanks,
Priya.
0 Kudos
Message 1 of 3
(3,566 Views)
Hi Shivapriya,
 
We have a working DMM .NET wrapper available for download.
 
You may find the wrapper at:
 
Note that using the provided wrapper, there is no need to handle IVI calls.
Nestor
0 Kudos
Message 2 of 3
(3,546 Views)

Hi Nestor,

Thanks for your reply. I am using the same wrapper in my program. Actually my issue is different.

I want the IVI class driver handle from this wrapper. How can i do that?

Actually we are targetting instruments interchangeability in our project, so we are not supposed to call functions using the specific drivers (or wrapper in this case).

eg. nidmm dmm = new nidmm("Logicalname",true,true);    //is not accepted

What we want is something like:

      IIviDmm classDriver = (IIviDmm)dmm;   //but this is not a valid typecast

      classDriver.utility.Reset();

I hope you got the issue I am stating, I want to get the class driver handle from this wrapper somehow. Kindly help me out!!

 

Thanks,

Priya.

0 Kudos
Message 3 of 3
(3,539 Views)