LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does USB hub increases the number of com port

Solved!
Go to solution

Hello,

I need to interface labview with multiple arduino boards, but I don't have that many usb port available on my computer. I was wondering if I can buy a usb hub, would it increase the number of available com port? Just wondering whether anyone have tried that or not. 

 

Thank you.

Khalid

0 Kudos
Message 1 of 13
(7,405 Views)
Solution
Accepted by topic author Kim0606006

Hi Khalid,

 


@Kim0606006 wrote:

I need to interface labview with multiple arduino boards, but I don't have that many usb port available on my computer. I was wondering if I can buy a usb hub, would it increase the number of available com port?


Yes.

Each Arduino brings its own (virtual) serial port, so the more Arduinos you connect with your computer the more COM ports you will see…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 13
(7,380 Views)
Solution
Accepted by topic author Kim0606006

Yes, of course you can. There are some limitations like max. 127 USB devices per USB bus and not more than 7 daisy-chained USB hubs or similar, and I think there's also a limit on how many COM ports Windows can have, but it's hard to hit that limits.

 

Just to let you know:

 

If the USB device has a serial number, then you can force Windows to assign a fixed COM port number to this device, regardless to which USB port it is connected.

If it has not, Windows does not remember it when connected to an other USB port, and it will show up with a different port number. This is also true if you connect the device to an other port of the same hub.

In worst case, you'll end up with 10 new COM ports whenever you cange something, and you never know which COM port is assigned to which device.

 

I don't know adurino well enough. If the boards show up win Windows device manager with a serial, you are lucky.

Message 3 of 13
(7,373 Views)

@Kim0606006 wrote:

Hello,

I need to interface labview with multiple arduino boards, but I don't have that many usb port available on my computer. I was wondering if I can buy a usb hub, would it increase the number of available com port? Just wondering whether anyone have tried that or not. 

 

Thank you.

Khalid


You are confused.  The hardware driver tells the OS that specific hardware should be treated specially.  For example, ftdi232.inf let's Windows know that an FTDI chipset is a rs232 serial port.  The windows registry then assigns a COM alias to the hardware and stores some information so that each time that exact device is connected it gets the same COM Alias.

 

That FTDI chipset has a USB connection and a RS-232 connection and is a virtual serial port.  Silicon Labs, Prolific and others make similar chipsets that have their own hardware drivers.

 

RS-232 has been around since Christ was a carpenter so 8 bits in the numerator is all you get. 256 COM ports max per operating system. Since RS-232 ports are slow (there is a non error tolerant copper physical layer) 256 is more than time allows anyway. 

 

Any USB hub can increase the number of serial device connections.  In fact, that is exactly why USB technology was invented.


"Should be" isn't "Is" -Jay
Message 4 of 13
(7,348 Views)

To add to what the others side, the USB hub does absolutely nothing in terms of adding additional COM ports. It simply allows to add more USB devices to the system. If those devices are mice, keyboards, cameras, joysticks, measurement devices or your virtual COM port on an Arduino, does make absolutely no difference. It's the Arduino USB port that provides the virtual COM port, not the USB hub.

 

One thing you have to watch out however: A standard USB port on a computer is usually limited to provide 500mA at most, sometimes even 300mA. With USB C connectors this could change but you shouldn't count on that. So if your USB hub is supposed to power those Arduinos through its USB connector rather than a local power supply, you definitely will need to look for a powered USB hub with its own power supply. Otherwise you will get very unhappy with intermittent USB connection drops because of power drops on the USB power supply line.

Rolf Kalbermatter
My Blog
Message 5 of 13
(7,333 Views)

While everyone has commented that It will add new COM Ports but no one has mentioned what it effects will be on Serial Data because ultimately there is one USB which will be connected from USB Hub to myRIO. Data won't be lost?

0 Kudos
Message 6 of 13
(1,698 Views)

@Michael_Smith wrote:

While everyone has commented that It will add new COM Ports but no one has mentioned what it effects will be on Serial Data because ultimately there is one USB which will be connected from USB Hub to myRIO. Data won't be lost?


That definitely depends on the quality of the hub! 😁

 

But technically we talk about serial ports with something like 115600 baud each at most in a usual case and an USB bus with at least 12Mb/s (USB 1.1) or 480Mb/s (USB 2.0).

 

So if the hub is designed properly it can handle a lot of serial port converters before things go awry!

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 13
(1,691 Views)

After acquiring each sensor on different COM via USB. I can program them using Modbus VIs in LabVIEW? 

0 Kudos
Message 8 of 13
(1,687 Views)

@Michael_Smith wrote:

After acquiring each sensor on different COM via USB. I can program them using Modbus VIs in LabVIEW? 


If the sensors talk in fact Modbus ASCII or RTU and you can see the individual ports as COM ports in NI MAX, there should be no reason why you couldn't.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 13
(1,678 Views)

One last thing dear. I will be using FPGA Timed Loop to acquire COM data. Should I expect a data loss?

Device 1 (Baud Rate: 1200 to 38400)
Device 2 (Baud Rate: 230400)
Device 3 (Baud Rate: 9600)

0 Kudos
Message 10 of 13
(1,669 Views)