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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Library function error/ cannot open port

Hello,

I need help about a fatal error on labwindows :

Library function error / cannot open port

Yesterday, the code worked and today when I tried to run the code it didn't work. I don't know why.

The only thing I do it's to turn off the computer, update the computer, and connect again. However the code is the same that yesterday.

Thank you,

Anaël.

0 Kudos
Message 1 of 6
(4,406 Views)

The error is quite clear: you are trying to access a device which does not exist in the system.

 

Which port are you trying to open? Is it a usb-to-serial device or some other removable one? Could it be that the associated virtual port has changed after the OS update?

Check in device manager whether a port with the number you are using actually exists in the system. If it has changed number, you can edit the device and return it to the original one, or you can change your program to use the new port number.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 6
(4,404 Views)

Thank you Roberto,

Where can I check if the port is the same ? Because I think it's the same port .

Anaël.

0 Kudos
Message 3 of 6
(4,396 Views)

Open Control Panel >> System, choose Device Manager  among the options on the left and open Ports branch in the devices tree: there you'll see which ports are present in the system and details for each one.

 

EDIT: actual names in OS screens could be slightly different: I am translating them by memory since I have no PC localized in English at the moment.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 6
(4,394 Views)

Thank you it was something whose run in the same time I didn't see.

Message 5 of 6
(4,389 Views)

You're right, I was wrong: in case the port does not exist the library should return a "No port found" error. "Cannot open port" is returned if the port is already allocated to another process.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 6
(4,372 Views)