01-08-2008 04:45 PM
Hi,
I'm getting the exact same error described in this message (VISA close -1073807338) BUT I'm using the latest VISA driver. My problem is as follows: I have a main application that is calling other VI's. This is being done on a test system and the VI's being called are front panels for all the instruments being controlled. I have two agilent power supplies being control through GPIB using VISA sessions. The vi's that I'm calling to do this are exactly the same except for the parameters and voltage limits being passed in. I'm using the open vi session and the run vi method to bring up the front panels and control the supplies but when I tried to exit either instrument's front panel I get the VISA close error. The error happens inside the power supply VI being close. I don't get it all the time but most of the time it happens. This is happening in the development environment and I'm afraid this will crash the entire app when I build the executable. I have another instrument up (serial interface) and I can control and close it OK. The problem is only with the identical power supply controls. I'm using the agilent AGE363X LV drivers. . I don't know what I'm doing wrong. The sessions should be independent since I'm specifying a different resource name for each but somehow the VIs are getting confused. Does anyone have any insight??? Here are some snapshots for clarification.
01-09-2008 02:32 PM
01-09-2008 02:45 PM
Hi Marshall,
Here are some details... I'm using only one bus to control both power supplies. I get the VISA close error only when I'm trying to exit one of the instruments and the other one its still running. Doesn't matter which one I do first, if I have the other one open it will crash. When I close the second one it closes with no error. The VISA close error happens pretty much all the time... for some reason I have got it to close ok once or twice.
By the way, I kept reading around and saw that the VISA close is really not needed so I ended up disabling the "close" on both instrument's vi and now I don't get the error. So I'm leaving it up to the main app to close the session when it finishes... I know this is not good because I'm not freeing resources and right now when all instruments are up I'm using ~50% of CPU. So any help to resolve this issue and be able to independently close the sessions will be greatly appreciated.
Thanks.
01-09-2008 04:29 PM
01-09-2008 04:35 PM
01-09-2008 04:41 PM
01-09-2008 06:00 PM
You might be correct. I was thinking of a situation where someone may be talking to multiple devices on a single bus like on a serial RS-485. So different parts of code would have VISA reads/writes to a Com port address (assuming the architecture is set up appropriately so the multiple parts don't step on each other.)
MXI Master wrote:
Very True Ravens Fan, but I believe nelg87 is using different VISA resources for each Power Supply so each close only closes the specific resource not both. But this would be a problem if both instruments are accessing the same resource.
Nelg87, do you have different resource names for each power supply?
01-10-2008 07:29 AM
Hi,
I do have different resources for my power supplies. They are both in the same bus GPIB 0 but one is on address 5 and the other one on address 6.
Something else I noticed when I open one of the lower level agilent AGE363X drivers, in particular the error handler vi... While the devices are up I see this vi changing from address 5 to address 6 continuosly. Why is this happening? Shouldn't each instance of this vi reference it's own calling resource? It's almost like there is only one instance of the lower vi's but I'm calling both of the power supplies vis separately with their own resource name.
01-10-2008 10:04 AM