LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple RS485 Devices connected via USB Converters


@Michael_Smith wrote:

@Jay14159265 wrote:

I have walked this exact path before, how to connect many RS485 instruments to a PC. I was hired by a company that had a hardware configuration exactly like you show above. It was not desirable because it does not scale very well once you get into connecting 10, 20, 30 instruments.  We tried using a single USB to RS485 which scales fine (to 255) but you run into bandwidth limitations if the instruments are sending lots of data to the PC. Ultimately we went to TCP/IP and PoE as the solution as it is better in every way except for length of physical data lines, even then there are ways to get around that if that is an issue. I guess the caveat to all this is that the company was manufacturing the instruments and writing the software so we had a choice of the interface. 

 

 


Hello Jay, 

I understand the problem you ran into and appreciate your hardwork to resolve it. Can you please let me know if you tried it on LabVIEW, is yes can you share more details how you started? You started using an example VI or made your own?


Hello Machel, 

 

Yes, the software was written in LabVIEW and we were using MODBUS over RS485. We started by using a MOXA RS232 to RS485 unit for initial testing. Eventually we incorporated the serial conversion onto a SBC that we made in house. On the LabVIEW side we rolled our own MODBUS library and used the serial COM port for an interface to start and eventually TCP/IP later in the project. 

 

If you already have a USB to RS485, that is all you need. The USB dongle should create a virtual COM port that abstracts the USB connection altogether. Then you just use the VISA serial VIs built into LabVIEW. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 11 of 15
(236 Views)

@Jay14159265 wrote:

@Michael_Smith wrote:

@Jay14159265 wrote:

I have walked this exact path before, how to connect many RS485 instruments to a PC. I was hired by a company that had a hardware configuration exactly like you show above. It was not desirable because it does not scale very well once you get into connecting 10, 20, 30 instruments.  We tried using a single USB to RS485 which scales fine (to 255) but you run into bandwidth limitations if the instruments are sending lots of data to the PC. Ultimately we went to TCP/IP and PoE as the solution as it is better in every way except for length of physical data lines, even then there are ways to get around that if that is an issue. I guess the caveat to all this is that the company was manufacturing the instruments and writing the software so we had a choice of the interface. 

 

 


Hello Jay, 

I understand the problem you ran into and appreciate your hardwork to resolve it. Can you please let me know if you tried it on LabVIEW, is yes can you share more details how you started? You started using an example VI or made your own?


Hello Machel, 

 

Yes, the software was written in LabVIEW and we were using MODBUS over RS485. We started by using a MOXA RS232 to RS485 unit for initial testing. Eventually we incorporated the serial conversion onto a SBC that we made in house. On the LabVIEW side we rolled our own MODBUS library and used the serial COM port for an interface to start and eventually TCP/IP later in the project. 

 

If you already have a USB to RS485, that is all you need. The USB dongle should create a virtual COM port that abstracts the USB connection altogether. Then you just use the VISA serial VIs built into LabVIEW. 



Hello Jay, 

Yes, I already have the USB to RS485 but now the problem is USB Hub on which I will connect all USB to RS485. I don't have other devices and USB Hub to connect therefore I'm confused the USB cable coming out of Hub will show me one single COM Port on VISA or it'll show me Multiple COM Ports?

0 Kudos
Message 12 of 15
(189 Views)

Hi Smith,

 


@Michael_Smith wrote:
I don't have other devices and USB Hub to connect therefore I'm confused the USB cable coming out of Hub will show me one single COM Port on VISA or it'll show me Multiple COM Ports?

The hub works as "multiplier" to the number of available USB ports (transparent to your application).

You will see as many COM ports as you connect USB-2-RS485 converters to those USB ports…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 15
(186 Views)

Hello Gerd,

Thank you for your answer. Do you have any example to start with? 

0 Kudos
Message 14 of 15
(181 Views)

@Michael_Smith wrote:

Hello Gerd,

Thank you for your answer. Do you have any example to start with? 


For examples start here: in LabVIEW navigate to Help/Find Examples, then search Serial

 

Jay14159265_0-1741618830500.png

 

 

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 15 of 15
(136 Views)