04-21-2026 02:50 AM
Hi,
I am working with a gas volume measurement device that communicates via Modbus RTU. (https://www.bluesens.com/fileadmin/user_upload/downloads-products/BlueVCount/Communication_Manual_Bl...)
Since my PC doesn't have a native RS485 port, I am using a USB to RS485 adapter
to connect the instrument to the computer.
Initially I had a simple LabVIEW application that continuously read the volume value
using Modbus Read Holding Registers and everything worked correctly.
However, after running for some time (usually around 20–40 minutes), the system stops
returning valid data. Instead of the expected counter value, the read operation starts
consistently returning 0.
If I stop and restart the VI (which reinitializes the VISA session), communication
immediately starts working again and the correct values are returned.
I tried implementing a self-recovery mechanism inside my While Loop using a Flat
Sequence to force a reconnection when invalid values are detected, but the issue still occurs
after some time.
- Modbus Close
- VISA Clear
- VISA Close
- Wait
- VISA Configure Serial Port
- Create New Serial Master
Has anyone experienced something similar when running continuous Modbus RTU polling
over USB-RS485 converters? Any recommendations on how to handle this more reliably?
Thanks in advance.
04-21-2026 03:07 AM
Hey,
you should check the Energy Settings for the USB Device in Windows Device Manager - often they will be powered down by the system.
Are you using Windows?
04-21-2026 04:13 AM
No idea about the root cause, but your reconnect cannot work:
- the error is not cleared
- the modbus master output terminal is not wired
I think you can reduce the VI down to this:
modbus reconnect
04-21-2026 07:12 AM
@JC-Thk ha escrito:
Hey,
you should check the Energy Settings for the USB Device in Windows Device Manager - often they will be powered down by the system.
Are you using Windows?
04-21-2026 08:32 AM - edited 04-21-2026 08:33 AM
@cordm wrote:
No idea about the root cause, but your reconnect cannot work:
- the error is not cleared
- the modbus master output terminal is not wired
I think you can reduce the VI down to this:
modbus reconnect
I'm usually optimizing it even further by not executing the first Open function at all, but simply detecting if the communication resource is valid at all (if there is an easy way through Not a Refnum or similar, or trying to communicate with it with short timeout) and then in the error case trying to (re)open the resource.
04-21-2026 10:01 AM
@cordm ha escrito:
No idea about the root cause, but your reconnect cannot work:
- the error is not cleared
- the modbus master output terminal is not wired
I think you can reduce the VI down to this:
modbus reconnect
Do you think I don’t need the VISA blocks?
I tried your example, but I didn’t receive any data. Could that be the issue, or am I talking nonsense?
I’ll look into it a bit more tomorrow.
Thanks.
04-21-2026 12:14 PM
@Aros wrote:
@JC-Thk ha escrito:
Hey,
you should check the Energy Settings for the USB Device in Windows Device Manager - often they will be powered down by the system.
Are you using Windows?Yes, I’m using Windows. However, I don’t think that’s the root of the problem, because I’m using other USB devices and none of them are shutting down. I suspect this is a limitation caused by the messy Modbus‑to‑USB conversion. Don’t you think?Regards
"Other USB devices" can often handle power saving mode better than USB-to-serial devices because they are both not as dependent on an uninterrupted connection but also because a lot of USB-to-serial devices are very cheaply made and don't deal with power saving mode well. You should still check this.
Also, what brand is your USB converter? Or more specifically, what chipset? If it's a "Prolific" chipset, I would recommend replacing it. It might even be a counterfeit chipset.
Whatever brand it is, also look for newer drivers for it if you haven't. It could be that any built-in Windows drivers for it have problems.
04-21-2026 12:43 PM - edited 04-21-2026 12:44 PM
@Aros wrote:
@cordm ha escrito:
No idea about the root cause, but your reconnect cannot work:
- the error is not cleared
- the modbus master output terminal is not wired
I think you can reduce the VI down to this:
modbus reconnect
Do you think I don’t need the VISA blocks?
I tried your example, but I didn’t receive any data. Could that be the issue, or am I talking nonsense?
Adding VISA blocks of your own in addition to the NI Modbus VIs is almost certainly going to mess with the implementation in the Modbus VIs unless you really know VERY VERY exactly what you are doing.
If you ask about implementing your own Modbus RTU protocol on top of VISA: That's certainly possible, but a major effort to do. I do not like everything about the NI Modbus implementation but use it anyhow in my applications when I need Modbus, since implementing my own is simply a lot more effort.
04-21-2026 02:47 PM
I have been using this BB-485USBTB-2W-A adaptor for years without issue
04-22-2026 02:32 AM
@Kyle97330 ha escrito:
@Aros wrote:
@JC-Thk ha escrito:
Hey,
you should check the Energy Settings for the USB Device in Windows Device Manager - often they will be powered down by the system.
Are you using Windows?Yes, I’m using Windows. However, I don’t think that’s the root of the problem, because I’m using other USB devices and none of them are shutting down. I suspect this is a limitation caused by the messy Modbus‑to‑USB conversion. Don’t you think?Regards"Other USB devices" can often handle power saving mode better than USB-to-serial devices because they are both not as dependent on an uninterrupted connection but also because a lot of USB-to-serial devices are very cheaply made and don't deal with power saving mode well. You should still check this.
Also, what brand is your USB converter? Or more specifically, what chipset? If it's a "Prolific" chipset, I would recommend replacing it. It might even be a counterfeit chipset.
Whatever brand it is, also look for newer drivers for it if you haven't. It could be that any built-in Windows drivers for it have problems.
My USB Brand is USB-RS485-WE-1800-BT (FTDI).
I'll look into drivers updates and the power saving mode.
Thanks.