Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use a Dmm class in CVI

Solved!
Go to solution

Hello all,

I'm trying to use an IVI DMM class in LabWindows and I fail at this.

I have a real HP 34410A multimeter connected via USB and I can get it to work with VISA using viOpen(), viWrite(), viRead(), etc...

I can also get it to work with the specific IVI driver, using hp34401a_InitWithOptions(), hp34401a_Read(), etc...

 

Now, I'm trying to use it through a generic IVI Dmm driver. I'm trying to follow the tutorial here: http://www.ni.com/tutorial/3377/en/ but I already glaze over at step 2: In MAX I have [IVI Drivers][Logical Names][MyDmm] where I have a Driver Session named [MyDriverSession], a [Go To] on that I chose [Don't simulate] and in the hardware tab I have [HpMult] as a resource descriptor, which is the name given above to [Devices and interfaces][34410A Digital Multimeter "HpMult"]

OK, that was a mouthful.

 

Now when I write a little program and call IviDmm_init with the logical name "MyDmm", it always fail with resource not found.

What am I missing ?

Thanks

0 Kudos
Message 1 of 9
(4,186 Views)
Solution
Accepted by topic author gdargaud

@gdargaud wrote:

Hello all,

I'm trying to use an IVI DMM class in LabWindows and I fail at this.

I have a real HP 34410A multimeter connected via USB and I can get it to work with VISA using viOpen(), viWrite(), viRead(), etc...

I can also get it to work with the specific IVI driver, using hp34401a_InitWithOptions(), hp34401a_Read(), etc...

 

Now, I'm trying to use it through a generic IVI Dmm driver. I'm trying to follow the tutorial here: http://www.ni.com/tutorial/3377/en/ but I already glaze over at step 2: In MAX I have [IVI Drivers][Logical Names][MyDmm] where I have a Driver Session named [MyDriverSession], a [Go To] on that I chose [Don't simulate] and in the hardware tab I have [HpMult] as a resource descriptor, which is the name given above to [Devices and interfaces][34410A Digital Multimeter "HpMult"]

OK, that was a mouthful.

 

Now when I write a little program and call IviDmm_init with the logical name "MyDmm", it always fail with resource not found.

What am I missing ?

Thanks


It doesn't sound as if you are following the example in that link.

I would suggest doing that before venturing off on your own.

 

 

0 Kudos
Message 2 of 9
(4,147 Views)

My first recommendation would be to try the LabWindow/CVI example. On the Browse tab of the NI Example Finder, navigate to \Hardware Input and Output\Instrument Drivers\IVI and double-click ividmm.prj.

 

My second recommendation would be to double check your driver session configuration in MAX. You may find helpful this link: http://www.ni.com/tutorial/4594/en/#toc3

 

Did you select the Resource Descriptor from the drop-down list that appears when you double-click its field?

0 Kudos
Message 3 of 9
(4,138 Views)

Indeed, as nyc said, I'd missed some crucial steps in the definition in MAX. It works now, but I have no idea why the definition in MAX is so complex as I don't understand what most of the steps actually do. Why isn't it enough to say that a specific hardware belongs to class DMM ?

0 Kudos
Message 4 of 9
(3,876 Views)

Arghhh, it used to work and now it doesn't. I've redone the configurations several times and re-read http://www.ni.com/tutorial/4594/en/#toc3 and http://www.ni.com/tutorial/3377/en/ to no avail.

 

I'm trying to connect to a 34410A HP multimeter, it's connected via USB and it works fine with the VISA test panel or its specific driver. I'm just trying to use IviDMM. Its alias is HpMult

 

In MAX|IVI Drivers|Logical names I have MyDmm and it uses Driver Session NewDriverSession. OK.

In Driver Sessions I have NewDriverSession, not simulated, Hardware is named NewHardwareAsset with a resource descriptor of HpMult and no description (I've also tried the full "USB0...INSTR" descriptor)

 

If I don't try to use a software module I get an error "The item does not exist in the collection"

If I try various forms of software module I get "The path name is invalid"

Do I have to have a software module ? The 1st white paper talks about it, the 2nd doesn't say a word about it.

 

I've been toying with the configs for 2 hours and I can't get it to work again.

0 Kudos
Message 5 of 9
(3,737 Views)

Hello,

I want to verify if you can indeed use any of the included examples with you DMM or does it also fail? What VISA drivers are you using and what hardware? 

DillonL.
0 Kudos
Message 6 of 9
(3,717 Views)

When I use Visa, it works fine, it's IVI-DMM which fails. Visa is at version 15.0, as well as IVI (all on WinXP). And no, the code samples from NI don't work either. I think it's some misconfiguration in MAX, which was my original problem in the original post, but I had left it as is last year after I got it to work.

 

I just tried it on Win10 with latest Visa+IVI and it fails in a similar way. The main difference is that with Win10 I see a dll in the software module options. Trying to insert hp34401a_32.dll in the [Instrument Driver Software] on XP gets me a little further: "Function IviDmm_init: The specified handle is invalid or of an incorrect type" when I pass the logical name MyDmm or the Driver Session MyDriverSession...

0 Kudos
Message 7 of 9
(3,700 Views)

Have you tried reinstalling VISA and/or the corresponding IVI drivers?

DillonL.
0 Kudos
Message 8 of 9
(3,684 Views)

I forgot to mention the solution... probably because it was so really dumb: the checkbox in [MAX][IVI drivers][Driver session][Hardware][Name] wasn't checked...

0 Kudos
Message 9 of 9
(3,355 Views)