Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Running VB Program without cards installed

For a client I have created a program using the PCI-4065 DMM which works.  The computer with the card is at a remote site that I can't access.  My client would like some updates to the program but I can't seen to get it to work without the cards.  I have installed the download "NI-DMM 3.0.1 - Windows 2000/Vista x64/Vista/XP"  ( and successfully installed it.  However, when I start the program up I get an error "Can't find project or library" at this line:  

    Dim VI As ViSession

I assume this is a library function.  In the VB6 environment I checked all the loaded libaries and have all NI and National Instruments titled libraries loaded but still get this error.

What I need to know:
    What library must be loaded.
    Where can I get it

Also, do you have any suggestions for running a project when the cards are not installed (no measuements ill be made, only cosmetic changs will be made).


0 Kudos
Message 1 of 4

This line of code should not be affected by your DMM's.  It looks like it might be with LabVIEW's ActiveX server.  You might try adding a reference in your project to the LabVIEW Type Library (assuming you have LabVIEW installed).  If you post the usage of this variable, it might shed some additional light on its background.


Alternatively, you might consider posting in the LabVIEW forum.


Andy McRorie
0 Kudos
Message 2 of 4

This code is from one of the VB examples that ships with the PCI-4065 DMM which goes like this:


'NI-DMM Example Program
'This example acquires a single DC Voltage measurement.  Specify the range and
'absolute resolution of your input signal and the powerline frequency of your system.
'The measured value will be displayed in the Measurement indicator.
'Supported Devices: 4050, 4060, 4065, 4070, 4071, 4072

Option Explicit
Dim VI As ViSession



When the program is run it stops at this line:

    Dim VI As ViSession


with the message: "Can't find project or library"


 It then automatically opens the "References" window asking to enable some library.  So my questions still seem valid which were:


    What library must be loaded.
    Where can I get it


At this point I cannot see where LabVIEW fits in unless some driver from there is required.  I would therefore need to know where to get it and how to load it.


Please advise.






0 Kudos
Message 3 of 4

Sorry for the misunderstanding.


ViSession is, in fact, a DMM type (for the instrument session handle).  If "National Instruments DMM" (NIDMM) is not showing as available under Project>>References, you can click "Browse" and locate nidmm_32.dll (on my system, it's located in Program Files\IVI Foundation\IVI\Bin).


Additionally, there is a document in the NI DMM Help called "Using NI-DMM in Visual Basic".  You can find this in the start menu under "National Instruments>>NI-DMM>>Documentation>>N I Digital Multimeters Help".  Then just search for "visual basic".


Andy McRorie
Message 4 of 4