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: 

VISA "Find" not seeing COM port but Win7 sees it

Allo.  I'm trying to communicate via virtual com ports with a device with an FTDI chip.  The device with the FTDI chip has both a USB type B port as well as a 9 pin dsub port, and I need to verify both ports work.

 

I'm using a laptop with Windows 7 and my program is in LV 2010.  I have a Sabrent USB to serial cable to test the dsub port, and a standard USB cable to test the other port.  I've installed the latest FTDI drivers and when I plug in both cables and look under Windows Device Manager, I will see both of them under unique COM port settings (usually COM4 and COM 5).  So Windows sees and recognizes both virtual COM ports, and no yellow warnings.

 

However when I run the "VISA Find" function in LabView, it only sees COM5 (the Sabrent serial cable) but not the COM port using the USB type B cable.  I send the results of the "VISA find" to a display and it will show other ports, like the parallel port, so I know it's seeing more than one port.

 

Any ideas why Windows can see the two COM ports but the "VISA Find" function can only see one?  My guess is there's something with the FTDI driver set up.

********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 1 of 16
(4,924 Views)

Can you post a link showing the device you are trying to test?  I don't understand why it has another USB port as well as the 9-pin serial port.

0 Kudos
Message 2 of 16
(4,911 Views)

It's not an off the shelf device, it's a product made specifically for my company.  It's used by our service shops to communicate with the microprocessor for troubleshooting.  Most of our shops have older PC's with only a standard 9 pin com port, but some of the shops have laptops that only have USB ports, so we designed it so it works through either method.  My job is to test the different communication methods and make sure both ports work correctly.

 

I've tested both ports via hyperterminal so I know the micro communicates fine and both ports do work.  But like I said, when I use the VISA Find function, it doesn't see the one USB virtual com port.

********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 3 of 16
(4,898 Views)

Wow it doesn't take long for a thread to get buried under 100 new ones!  Bump.

********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 4 of 16
(4,870 Views)

OK so what do you see in MAX Devices and interfaces?  What passports are enabled in MAX Tools>>NI VISA>>VISA Options under the general passport catagory? A screen shot of the ports in device manager would help too


"Should be" isn't "Is" -Jay
Message 5 of 16
(4,859 Views)

Looking at my MAX VISA settings.....I see under the VISA "General Settings" tab, I see the "PXI/PCI and FireWire Interfaces" is set to "Show only devices registered with VISA".  Should I set that to "Show all devices accessible to VISA" instead?

********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 6 of 16
(4,847 Views)

I'm also seeing under the list of "Aliases" a set number of COM ports that includes COM1-COM4 and COM30-COM38.  Do I need to define in this list every possible COM port the device may see?

********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 7 of 16
(4,845 Views)

Snips insert inline with text fairly wellSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 16
(4,837 Views)

I believe you have found the problem, Jeff!  Here's a snapshot of my list of resources/aliases under MAX:

 

LV COM port screen shot.jpg

 

Originally the list only included the info for COM ports 1 through 4, and then 30 through 38.  The only time my program worked was whenever the VCP chose COM4 as the port.  So I added the info for COM ports 5 through 9 and tried again.  This time the VCP chose COM port 7, and my program worked fine!

 

But now here is my question - is there a way that I can have LV automatically see the ports and add them to the list so I don't have to actually type in every possible com port into this list?

********************************************
Amateur programmer for over 10 years!
********************************************
0 Kudos
Message 9 of 16
(4,827 Views)

Yes, but its not for the faint of heart!

 

You can probably do what you want by using the refresh "F5" in MAX or add this token

[VISA-CONFIG]
ShowRegisteredDevOnly = 0 

to C:\ProgramData\National Instruments\NIvisa\visaconfig.ini

 

Another thing to try is to recover the unused COM Port numbers each time you change the device.  By default Windows will "Save" those previously connected COM port numbers an if it sees the device again it will re-assign the old number.  This means that the COM number keeps getting larger and larger.  At some point the PC's BIOS will say that's rediculous and you will experience trouble.

Capture.PNG

 

Programatically you could call

C:\Program Files\National Instruments\NI-Serial\NiPortConfig.exe to launch the same utility.  there is probably even and unpublished switch to click just that one big button for you but I can't find it.

 

It looks like you may be running into some part of this known issue

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 16
(4,817 Views)