Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing a serial port between LabVIEW and another program

Is it possible to make LabVIEW open a serial port in a mode
that allows sharing with another program? I'd like to run an
external program from within LabVIEW that talks to the same hardware that LabVIEW does, but the call to CreateFile() to
open the serial port in the external program fails unless I close LabVIEW first.
0 Kudos
Message 1 of 4
(3,692 Views)
You won't be able to have two programs use the port at the same time. However, if you issue a VISA close you should be able to open the port from an external application without closing LV first (assuming you are using VISA).
0 Kudos
Message 2 of 4
(3,692 Views)
"VISA Close" does not help in my case. It helps while I'm using two LabView applications at the same time, but not when I'm using an external application or when these LabView applications were converted into exe ones.
0 Kudos
Message 3 of 4
(3,692 Views)
It's not a LabVIEW problem. That's the way Windows manages access to the ports. You can't open up Hyperterminal to com 1 and Procomm to com 1 at the same time either.
0 Kudos
Message 4 of 4
(3,692 Views)