Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create a session of an IVI using IIviSessionFactory in VB6

With a valid configuration within MAX 3.0.2, using the following code produces a run-time error...

Dim Factory As New IviSessionFactory
Dim Dmm As IIviDmm

Set Dmm = Factory.CreateDriver("HpDmm")
Dmm.Initialize "HpDmm", True, True

The above code snippet never gets past the SET no matter what instrument is used. If the instrument is referenced directly in VB6 everything is fine but it is then bypassing the whole idea of the configuration store and the ability to interchange.

The response from the code is always...

Run-time error '-2147217149(80041103) IIviSessionFactory: Software Module (hp...) has no Prog ID

This is despite the fact that a Prog ID is not necessary according to the IV
I Foundation specs.

OS is Windows XP Pro and ICP2.1 is installed - HP3458A and 34401A IVI compliant drivers were used.
0 Kudos
Message 1 of 7
(4,813 Views)
The Session Factory is only used with IVI-COM drivers. The HP3458A
and 34401A drivers from NI's web site are IVI-C drivers. To use these
interchangeably you use the IVI class drivers.

If you are using Measurement Studio with VB, there are ActiveX IVI
controls that make interfacing with the class drivers easy.
Otherwise, you can access the IviDMM class driver function calls by
linking to the IviDmm dll.
Message 2 of 7
(4,813 Views)
Thanks, this all makes perfect sense now. Basically we are not able to
do what we are looking to do - use the config store to manage
different sessions/configurations of IVI's for different test scripts.
Instead our software will have to use drivers on an individual basis
as we are planning to use custom IVI's in some cases for testing. For
example, there will be an IVI developed by us for controlling an
SDH/PDH analyser.

Back to the brainstroming then.
0 Kudos
Message 3 of 7
(4,813 Views)
Thanks, this all makes perfect sense now. Basically we are not able to
do what we are looking to do - use the config store to manage
different sessions/configurations of IVI's for different test scripts.
Instead our software will have to use drivers on an individual basis
as we are planning to use custom IVI's in some cases for testing. For
example, there will be an IVI developed by us for controlling an
SDH/PDH analyser.

Back to the brainstorming then.
0 Kudos
Message 4 of 7
(4,813 Views)
Thanks, this all makes perfect sense now. Basically we are not able to
do what we are looking to do - use the config store to manage
different sessions/configurations of IVI's for different test scripts.
Instead our software will have to use drivers on an individual basis
as we are planning to use custom IVI's in some cases for testing. For
example, there will be an IVI developed by us for controlling an
SDH/PDH analyser.

Back to the brainstorming then.
0 Kudos
Message 5 of 7
(4,813 Views)
Appologies for the multiple entries above - our server is on a go
slow.
0 Kudos
Message 6 of 7
(4,813 Views)
I encountered the same problem using the NI IVI-C driver for the hpe364xa PSU driver. However, after reading this article I downloaded an IVI-COM compatible driver from Agilent for this instrument and my code (similar to above) worked fine. Agilent have many other IVI-COM drivers available if you prefer to use the session factory. Especially as the Measurement Studio for VB doesn't yet seem to have ActiveX controls for the later IVI classes such as RF_Sig_Gen, Power Meter and Spectrum Analyser.
0 Kudos
Message 7 of 7
(4,813 Views)