Jump to content

Issue with error 1073807246


Nuesel

Recommended Posts

Hello all,

I have a problem with VISA when trying to access an already opened session. I get the following error:

VISA:(Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it. (error code 1073807246)

I know from several other discussions, that this error may occur if I try to access an opened session. For example I want to communicate with one device with two individual applications. To make sure, that only one application talks to the device, I use the VISA Lock/Unlock. And the thing with the two applications works for me with our USB device, if I use Windows XP, no matter what Labview or VISA version I use. I tried Labview 2009 and some 8.x versions in combination with VISA 4.4 and 4.3. It works all the time. Having installed Vista on the same computer, it doesn't work. I get the mentioned error everytime, no matter what I do!!

Does someone know how solve this problem? I also want this working on Vista (and in time also on Windows 7, but haven't tried that, yet).

An does someone know what's the purpose of the VISA Lock/Unlock, if a VISA session can only be accessed by one application?

Best regards

Link to comment

I know from several other discussions, that this error may occur if I try to access an opened session. For example I want to communicate with one device with two individual applications. To make sure, that only one application talks to the device, I use the VISA Lock/Unlock. And the thing with the two applications works for me with our USB device, if I use Windows XP, no matter what Labview or VISA version I use. I tried Labview 2009 and some 8.x versions in combination with VISA 4.4 and 4.3. It works all the time. Having installed Vista on the same computer, it doesn't work. I get the mentioned error everytime, no matter what I do!!

Does someone know how solve this problem? I also want this working on Vista (and in time also on Windows 7, but haven't tried that, yet).

An does someone know what's the purpose of the VISA Lock/Unlock, if a VISA session can only be accessed by one application?

Best regards

The exclusive access of serial resources in VISA from different applications is not a VISA "feature" but a Windows OS feature. Once an application has a serial port driver open, Windows will under normal conditions not allow another application to open that port again.

As to why there is a Lock and Unlock. You can have applications that communicate from different locations through the same communication port. VISA supports that but obviously it can not know about the communication protocol so if location A writes a command and then location B writes another command (to possibly a different subdevice on that communication link) it is random who will read the response to the A command and who will read the response to the B command. Resource locking solves that problem reliably in that A locks the resource, writes the command and receives the response before unlocking.

Rolf Kalbermatter

  • Like 2
Link to comment

The exclusive access of serial resources in VISA from different applications is not a VISA "feature" but a Windows OS feature. Once an application has a serial port driver open, Windows will under normal conditions not allow another application to open that port again.

As to why there is a Lock and Unlock. You can have applications that communicate from different locations through the same communication port. VISA supports that but obviously it can not know about the communication protocol so if location A writes a command and then location B writes another command (to possibly a different subdevice on that communication link) it is random who will read the response to the A command and who will read the response to the B command. Resource locking solves that problem reliably in that A locks the resource, writes the command and receives the response before unlocking.

Rolf Kalbermatter

Thank you Rolf, for your reply!

It would make sense, that Windows permits applications to access VISA driver ports. Especially for Vista, since Vista uses stricter communication policies than XP. But does somebody know how enable other applications instances to talk to an opened session? Is there some kind of switch in the Windows Vista registry or something similar?

By the way, what's the option "Duplicate session" in the VISA Open VI for?

Thanks in advance for your answers.

Link to comment

Thank you Rolf, for your reply!

It would make sense, that Windows permits applications to access VISA driver ports. Especially for Vista, since Vista uses stricter communication policies than XP. But does somebody know how enable other applications instances to talk to an opened session? Is there some kind of switch in the Windows Vista registry or something similar?

By the way, what's the option "Duplicate session" in the VISA Open VI for?

Thanks in advance for your answers.

The locking of serial ports happens in the Windows serial port driver and has been so at least since Windows NT and probably even in Win95 and earlier but I'm not sure about that. There is simply no practical use in any but very special situations to allow two different applications access to a serial port at the same time. The already explained sharing race conditions are simply making concurrent use of a resource like the serial port useless.

To my knowledge there is no way to tell Windows to allow sharing serial ports between applications.

And Windows does not allow applications to access VISA driver ports but it is rather the opposite. VISA makes use of the Windows serial port COMM drivers to access the serial ports. As such VISA is simply another user of the Windows serial ports but VISA is not an independent process but simply a DLL layer that translates the Windows COMM API to its own API and therefore it makes no difference if an application uses VISA or directly the COMM API to access the serial port. If one application has the port open, Windows will disallow any other application to open that same port, independent if that application uses VISA or the Windows COMM API.

I'm not really sure what you are trying to do here. As far as application access is concerned it simply makes no sense to try to share a serial port between two or more processes.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.