Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Cannot open multiple VISA/VXI sessions on instrument AC POWER Asterion

$
0
0

Hello,

 

I have an issue when I try to open multiple communicating sessions between my controller and Asterion AC power model AST2253.
To establish the initial communication I use NI VISA toolset 5.6.0 and VISA library.
In my program I must use multiple access mechanism and then I call at least two times "viOpen" VISA function.

 

My problem is the following :

 

As I said above, I call the function viOpen twice to open two sessions on my instrument. The both status returned are SUCCESS and handles are differents. I can work with the both handles together without any problems.

However, at the end of the first part of my program, I close the first open handle with function viClose. After this step I cannot use any session on my instrument ... The other functions which use second open handle return FAILURE with VI_ERROR_INV_OBJECT error code.

It seems that the first (and the only) call of viClose() on the first open handle has closed ALL open handles.

 

This program works perfectly with all my others instruments (DMM+DCPWR+SWITCH) and then I need help to resolve my issue...

 

For debuging I used Wireshark to see all VXI frames between the controller and the instrument and I saw something may be interesting :
The call of viOpen function send create_link() request (VXI function) and then it creates a session designated by a unique ID.

In all correct cases at each time the function create_link() is called, a unique ID is returned by each call.

In the bad case all call of create_link() returns the SAME ID. And so when the first call of viClose occurs the VXI function destroy_link() terminates the only ID which is opened. Then the following functions use an ID which is already close.

 

For example :
Good behavior :
-Create_link call in instrument 1 (opening handle 1)
-Return ID = 0x01
-Create_link call in instrument 1 (another time)
-Return ID = 0x02
/*** My program using handles 1 & 2 ***/
-Destroy_link call ID = 0x01

/*** My program using only handle 2 ***/
-Destroy_link call ID = 0x02

 

Bad behavior :
-Create_link call in ASTERION
-Return ID = 0x01
-Create_link call in ASTERION
-Return ID = 0x01

/*** My program using handles 1 & 2 ***/
-Destroy_link call ID = 0x01

/*** My program using only handle 2 ***/
-Destroy_link call ID = 0x01

 

I've checked many datasheets, programming manuals, VXI standard, etc... but I did not find any way to resolve my issue.

Is there a flag or a key somewhere to activate this behavior ? Or something else ?

Please, can you help me ?

Thanks


Viewing all articles
Browse latest Browse all 5565

Trending Articles