LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows COM port number not aligned to VISA Resource String

Highlighted

Historically, if you knew the Windows com port number of a serial device you could predict the VISA resource string needed to communicate to it. For example, if my device was attached to COM8 in Windows, I could contstruct the following VISA resource string ASRL8::INSTR to use with the VISA functions to access it.

 

Recently, I was part of a debugging effort in our application to determine why the COM device would be detected but could not be opened by VISA. I should note that the detection method is not based on VISA. We use a Windows command line program to list all COM port numbers and filter out all COM port which do not have a specific description. Turns out that while the device shows up as COM8 in Windows Device Manager, the actual VISA resource string to use for it was ASRL9::INSTR.

 

I've never seen a case where the COM port number did not have a direct associated to the VISA resource string used to access it. We have a workaround in place now where the user reassigns the COM port number in Windows to some higher number that has never been used before. But I was wondering if anyone had any insight on how this could happen?

 

We are using NI VISA 14.0 runtime. The user's OS is Windows 10 x64. Before we discovered the workaround, we were able to reproduce the issue in both 32-bit and 64-bit versions of our software which is build in LabVIEW 2014. We have tried to reporduce the issue here without any luck. I have also attached the user's visconf.ini which shows that for some reason COM8 is mapped to ASRL9::INSTR.

 

Is ASRL8::INSTR reserved for something special?

 

Thanks.

0 Kudos
Message 1 of 4
(1,484 Views)
Highlighted

I see com4 listed in your .ini file twice.  Once for ASRL4 and once for ASRL8.  So Com8 probably became ASRL9 because ASRL8 was already taken.

 

I'd consider editing that .ini file (make a backup) and delete the extra com4 and the com8 sections.  Try rebooting and starting again.

Or delete the extra com4 and edit the com8 entry to be ASRL8 instead of 9.

 

There may be a way to edit things in MAX.

It seems like there was a duplication that is keeping things from beign aligned.

 

(I always wondered what a Com10 would show up as considering LPT1 always seems to appear as ASRL10.)

0 Kudos
Message 2 of 4
(1,476 Views)
Highlighted

Hi RavensFan,

 

Thanks for replying so quickly!

 

You're right, I missed the fact that ASRL8 got assigned to COM4 for some reason and that for some reason the COM4 Alias was duplicated. You would think that Name6 would be ASRL6::INSTR and SystemName6 would be COM6.

 

We currently have a workaround in place, however manually editing the ini file is not a bad idea either.

 

Any other ideas as to what would have caused this in the first place?

 

Thanks!

0 Kudos
Message 3 of 4
(1,462 Views)
Highlighted

It might be possible that a com port existed as com8, then someone renamed it (in MAX?  maybe in device manager?) as Com4.  It may no longer exist that way, but the record that it had existed is lingering.

 

I don't know.  It's not something I have stumbled across very often.

0 Kudos
Message 4 of 4
(1,436 Views)