From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Release serial port

Hi, I have an application under Windows XP that uses the serial ports.
First, I use the VISA Configure Serial Port vi.
 
My problem is, that I often get the error message below:
Error -1073807343 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->Opkaldssim_2.vi.
Possible reason(s): VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
 
If I go to the Windows Control Panel, disable the ports, and then enable them again, everything works OK.
 
I think the problem is that another process may have used the serial port before and not unlocked it. However, the message also comes just after a restart of the computer.
So it seems I need a way to enforce that other processes don't use the ports - or any other ideas ?
 
Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 1 of 11
(6,786 Views)
Hi Jan,
 
It seems that there is another program which is using the serial port resource in the background. If that program/driver is loaded with windows, you will then get this error in Labview.
Can you tell me more about your system? What instrument are you trying to control, your operating system and your NI-VISA driver version?
 
You can try to update your NI-VISA to the most recent one: http://joule.ni.com/nidu/cds/view/p/id/988/lang/en
 
Please let me know if it helps.
 
Thanks!
-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
0 Kudos
Message 2 of 11
(6,741 Views)

Hi Dennis,

I have tried to update NI-VISA but it makes no difference. So the NI-VISA is now 4.3.

The system is: a laptop with Windows XP. Since the laptop has no serial ports, I use a USB-RS232 adapter. On the RS232 is a Siemens MC35i mobile modem terminal that I use for sending log data from the application to a server, which also has a Siemens MC35i.

I don't think another program is using the serial port - I can't identify any and nothing stops to work when I disable the port. I find it more likely, that there is an error in the driver software for the USB-RS232 adapter, since it could very well be that the driver software does not implement all the functionality in the way NI-VISA expects it.

Anyway, I can solve the problem manually by disabling the port (in the Windows Control Panel) and then enabling it again - this has never failed. So, if it is possible to do this programmatically, everything would be OK ! Do you know of a way to do this ?

Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 3 of 11
(6,661 Views)
Have you checked to see what services are running? A lot of modem software packages will install as a telephony service and reserve the com port that it is connected to. When you disable the port, you would not see any problems unless you were to use the Siemens software.
0 Kudos
Message 4 of 11
(6,655 Views)

Thanks a lot, I just checked the services, but I don't think any of them use the serial port.

I can add that I am actually NOT using any Siemens software, since I control the modem on AT command level directly from Labview.

Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 5 of 11
(6,650 Views)
If there is a service, it might be a little hard to find. Did you see if there were any named Siemens or if there was a description that mentions modem or phone line. Even if you don't use the Siemens software, if there is any installed, you might try removing it.
0 Kudos
Message 6 of 11
(6,643 Views)
I would suggest using serial port monitoring software to see what happens to the port when the error becomes present.  I have been happy with HHD serial port monitor, which has a free trial version.  I would also make sure that your port is actually getting closed by LV.  I usually don't wire the input error wire to the VISA Close VI in order to make sure that the port does actually close when the higher level program is stopped. 

Lastly, I vaguely remember having a problem with my serial port being left open when I was deploying variables for MODBUS.  I think it was a NI application called "tgsvr" that was causing the problem, but that was a couple years ago . . .

Hope that helps. 
0 Kudos
Message 7 of 11
(6,636 Views)


@Jan Nielsen wrote:

Hi Dennis,

I have tried to update NI-VISA but it makes no difference. So the NI-VISA is now 4.3.

The system is: a laptop with Windows XP. Since the laptop has no serial ports, I use a USB-RS232 adapter. On the RS232 is a Siemens MC35i mobile modem terminal that I use for sending log data from the application to a server, which also has a Siemens MC35i.

I don't think another program is using the serial port - I can't identify any and nothing stops to work when I disable the port. I find it more likely, that there is an error in the driver software for the USB-RS232 adapter, since it could very well be that the driver software does not implement all the functionality in the way NI-VISA expects it.

Anyway, I can solve the problem manually by disabling the port (in the Windows Control Panel) and then enabling it again - this has never failed. So, if it is possible to do this programmatically, everything would be OK ! Do you know of a way to do this ?


Try another USB-RS-232 adapter from a different make/model. Some behave in some strange ways sometimes and can cause problems like these.
Updating the driver for the adapter to the newest version might also help.

Rolf Kalbermatter


Message Edited by rolfk on 05-28-2008 08:02 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 11
(6,611 Views)

I also have a problems with releasing serial COM (USB) ports at my PC station.

 

The trick is:

How to release/close COM ports without closing LV? Example: I open device connection at COM14. If error accurs before I close COM14 I have to close LV to be able connect to device at this port again. 

How can I close it without closing LC?

0 Kudos
Message 9 of 11
(2,919 Views)

Run VISA Close on that resource name. Simply because you have an error does not mean that you are not allowed to close that resource anymore.

Rolf Kalbermatter
My Blog
Message 10 of 11
(2,913 Views)