Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA port state ( opened or not )

Solved!
Go to solution

Hi,

 

I want to find out if the VISA resource name I selected is opened by another application or not to decide to open it or not.

 

I tried to use the error out from the VISA open VI to discover whether the port can be used or not. So I created two VIs which use the same port ( of course the port exists ).

 

The first VI open the port without any error. And unexpectedly, the second VI open the port without error, while the first one is using the port without closing it.

 

Note that the second VI's VISA resource name list shows that this port is opened ( the icon next to the port's name ) before running it.

 

So is there any way to find out if a port is opened by another application ?

0 Kudos
Message 1 of 3
(4,445 Views)
Solution
Accepted by topic author EL91
Yes, the error out WILL report if another application has the port open, assuming a serial port. Another VI is, off course, not another application. It is the same application - LabVIEW.
0 Kudos
Message 2 of 3
(4,441 Views)

Ok thank you Dennis_Knutson, I wasn't aware that it is about the same application.

0 Kudos
Message 3 of 3
(4,435 Views)