Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

issue with IVI-COM wrapper generated for DMM-4071 instrument driver

Hi,
 
I have generated a IVI COM 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 IVICOMWrapper; //IVI COM wrapper over the Dmm driver
using Ivi.Driver.Interop;
using Ivi.Dmm.Interop;
 
class Sample
{
   main()
  {
     IVICOMWrapper.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 IVICOMWrapper.dmm cannot be converted to IiviDmm. Kindly help me out!!
I need to get the IVI class driver handle for Dmm
 
Thanks,
Priya.
0 Kudos
Message 1 of 5
(7,532 Views)
Shivapriya,
 
 
Also, can you please also include a screenshot of the error you are receiving?
A_Ryan
AES
National Instruments
0 Kudos
Message 2 of 5
(7,515 Views)

Hi Ryan,

Thanks for your reply. Actually its a .Net wrapper (C#) over the IVI-C driver.

I have attached the error file. I need to get handle to the IVI class driver from this wrapper.

Kindly help me out.

Thanks,

Priya.

 

0 Kudos
Message 3 of 5
(7,509 Views)
Priya,
 
The error that you are receiving sounds like it might be related typecasting error you posted in your original forum.  Typecasting errors are usually refer to an incorrect conversion of one data type to another.  Can you please check to ensure that the data types are correct in your class driver?  Are you passing the handle correctly from the wrapper to the class driver?
A_Ryan
AES
National Instruments
0 Kudos
Message 4 of 5
(7,494 Views)

Ryan,

I know that typecasting is not the right way to get class driver from the wrapper. You have any suggestions as to how i can do it?

I have tried using IVISessionFactory but it didn't work as it was not a IVI-COM specific driver.

I want the IVI class driver handler from the wrapper somehow...

 

Thanks,

Priya.

 

0 Kudos
Message 5 of 5
(7,488 Views)