Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HP3458a/AG3458a Close error

I am using the HP3458a LW/CVI VXIPNP/IVI driver. I downloaded this driver from the NI website 2-3 years ago and had used it successfully on several projects.  I recently tried implementing it again but I am having serious issues with it.  When I go to close my session with the instrument, the session handle is not being set to VI_NULL and the application calling the function upon exit, does not exit but, instead, begins consuming 99+% of my CPU time.
 
I did a check of s/w versions via Measurement and Automation Explorer and saw that the IVI packages are the biggest difference, version-wise.  On the system where this behavior does NOT occur, the IVI version is 1.6, while on my current system (and several new systems) the IVI version is at least 2.1, most are at 2.2.
 
I really need this driver for a customer application but this "runaway" behavior is preventing me from delivering! 
 
Thanks for any help.
 
-Randy
0 Kudos
Message 1 of 5
(4,380 Views)

There were significant changes in IVI that were introduced in the IVI Compliance Package (ICP) 2.0 release. Please refer to the Release Notes that get installed with ICP. At that time, the specific drivers were updated as well so in order to use an IVI specific driver with ICP 2.0 and later, you have to install the latest version of the driver:

https://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E958A659CE034080020E74...

I hope this helps.

 

 

 

0 Kudos
Message 2 of 5
(4,363 Views)
Smiley Sad Smiley Sad Smiley Sad
I cleared out all instances of this driver that I may have had, installed the latest (again, I believe) using the link posted in the reply, rebuilt my DLL and test executable calling the functions in the DLL, with no difference in behavior.
 
What I am seeing is the hp3458a_close(vi) function is not setting the vi value back to VI_NULL (0).
 
The test program is quite simple: 
 
Test.exe  calls an init function, a setup and measure function, and a close function.  All called functions are in a DLL. 
     The 3458 session handle is a global variable.
     The init function just calls hp3458a_init. 
     The setup and measure function sets up the DMM to do a (fill in the blank) function, sets up the trigger, does a hp3458a_Read, followed by a hp3458a_reset.
     The close function does a hp3458a_reset followed by a hp3458a_close.
 
As previously stated, the session handle is not being reset to VI_NULL.  And, when the Test.exe program should close, it ramps up and takes over 99+% of the CPU usage. 
 
The behavior I am seeing occurs in both a software only environment as well as on a system with the instrument.  I have verified this on multiple computers.  My development system has ICP 2.2, NI-VISA 3.2, NI-VXI 3.3.1, and NI-488.2 v2.30.  The latest driver requires ICP 2.1 and VISA 2.6.
 
Are there any other suggestions?
 
 
0 Kudos
Message 3 of 5
(4,354 Views)

The Ivi_Close function does not set the ViSession to NULL. There is not way it can do that because the session is passed by value, not by reference. Perhaps it was your application that was setting it to NULL?

The hp3458a_32.dll is installed in both the Program Files\ivi\bin and vxipnp\bin directories. Please make sure the version is the same in both locations.

z_haider

 

0 Kudos
Message 4 of 5
(4,329 Views)
Upon further review of the HP3458a driver, I see what you are saying about the ViSession value.  The hp3458a_close function gets the IVI_ATTR_IO_SESSION value for a passed in VI session then sets the IVI_ATTR_IO_SESSION to 0 for the passed VI Session.  It then does a viClose on the IO session from the first part of the function.  The VI Session value is NOT set to VI_NULL.  My misunderstanding of what was happening there.
 
However, this doesn't resolve the "runaway" behavior issue.  Yes, the dll is the same in both directories as it was installed in both at the same time by the latest driver installation routine.
0 Kudos
Message 5 of 5
(4,322 Views)