06-05-2020 08:05 AM
Hey, hello Everyone, I hope all of You are fine in these days! 🙂
Just a quick question, might someone has experience with such device. Actually not a LV question, but a hardware one (the recent app is a C# one used).
So we used a USB-RS232 adapter for a couple of years to connect a PIC microcontroller to a Windows PC. Everything is fine, the following settings are used:
However, a request came that we need to replace the USB/RS232 adapter with a Ethernet/Rs232 one: Moxa nport 5110a
So far we could not get a reliable connection with this device. It works occasionally, but then randomly drops the RS232 connection between the PIC and the PC. Sometimes we get like "Character-buffer overrun error"s, but not always (actually we get this error rarely even with the USB adapter, but our error handling takes care of it).
Anyone knows any tricks or can give me hint how to setup this Moxa in order to make it work properly? 🙂
Thanks very much guys!
Have nice weekend! 🙂
06-05-2020 08:19 AM
I have not worked with a Moxa one. But the one I did use was a major PITA to get it to work properly. Connections randomly dropped and therefore I lost the serial ports. I am not a fan of Ethernet/RS-232 adapters after that experience. I, personally, prefer using commercial grade USB adapters from StarTech.
06-05-2020 08:23 AM
Thanks.
The problem is that we need a distance between the pic and the PC too large for serial cable. Also, we need to use the existing Ethernet network.
(we cannot put the used PC next to the PIC)
06-05-2020 11:47 AM
In the past I've used a Lantronix device.
https://www.lantronix.com/products/uds1100-uds1100-poe/
You load up the software on Windows saying the IP address of the device, and then it becomes a virtual COM port you can talk to. Works pretty well but I only ever used it for slow low speed environmental chamber control. If there was a data loss I probably wouldn't know it. I've also seen a few places where people made bridge like devices out of Raspberry Pis. It ended up acting like a wireless serial port.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-05-2020 01:36 PM - edited 06-05-2020 01:37 PM
Actually I realized that I try to use a screw driver as a hammer: instead of using the Moxa in "Real COM mode", I set it to "TCP server mode", and I create at my PC side a TCP Client. I only need to send a single "Start" command then I purely need to receive raw byte stream from the PIC with 1 MBaud.
I hope this approach will bypass the Ethernet-->Virtual COM port software layer, and result in better stability and higher speed...
Lets see...
06-05-2020 03:50 PM
It just works with the most simple TCP Client 🙂
06-08-2020 03:04 AM
@Blokk wrote:
I hope this approach will bypass the Ethernet-->Virtual COM port software layer, and result in better stability and higher speed...
Lets see...
That's how I used Moxa's. Mainly because I want to allow my drivers to run on RT as well.
Another reason not to use "Bytes at port": apart from that function, it's usually a matter of changing the VISA resource. So drivers work transparently for RS232 and TCP\IP over a converter.
06-17-2020 04:22 PM
I have not used the nPort at such a high baud rate (max 115200), but as others have mentioned here the virtual port driver is not optimal, so we mostly use it in TCP server mode...(The default timers in the virtual port setup are generally rubbish though, so there are some possibilities there as well (Originally we used TCP because the virtual driver was unable to recover from network failures).
If you do not have to use the network, and the main goal is to extend the range, you could perhaps convert the RS232 to RS485 instead though.