11-18-2022 02:50 PM
Hello,
I have a system with a pump whose control interface is RS485 db15 (2 wires). I have connected a USB to RS485 adapter, which I plugged into my computer (see attached picture).
I want to be able to control the start and stop of my pump with Labview.
Do I have to use the Modbus protocol or can I use VISA directly? How do I go about it? I am new to Labview.
Thank you in advance for your answers.
Solved! Go to Solution.
11-19-2022 07:59 AM
If it is true RS485, you don't need Modbus, you can use the VISA functions to communicate.
This is an excellent tutorial - https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial
11-20-2022 06:24 AM - edited 11-20-2022 06:31 AM
You should probably also wire the ground (GND) connection. If the USB converter is not galvanically isolated there is however a change of a ground loop that way but that depends entirely on how your computer and pump are grounded to earth if at all.
But without ground connection the differential output is usually floating and then you get an unreliable communication due to limited common mode voltage rejection.
And to how to talk with the pump that depends entirely on the pump. It may talk Modbus or any of the other zillion possible protocols, including an entirely homebrewn one. But you do have a programmer reference manual for it, don’t you? Without such a document you could pretty much shout in the air and hope that the pump will do anything. It’s similarly likely to work than trying to send random bits and bytes to the device.
11-21-2022 01:59 AM
Some manufacturers swap the A end B connection of their devices.
I had a discussion with one of them and he was telling me that it was a Transmit and Receive line !!!
So also try to swap the two lines. And like Rolf said use the 0V connection and RTFM
Kees
11-23-2022 11:58 AM
Hello Kees,
Thank you for your reply.
I had already read the pin assignment diagram for my pump (see attachment). If I understand correctly, I have to connect pin 2 "485 Interface A" and pin 9 "485 Interface B", as well as a pin "E-c Ground" (any pin)?
I have already made these connections, except for the ground.
Do I need to add anything else?
Thank you very much for your help.
Nicolas
11-24-2022 01:56 AM
Hi Nicolas,
The connection are Ok. But if it still does not work I would try to swap the A and B wire, just to be sure that this is not the problem.
If the RS-485 connection is very long you should also use terminators. If it is short (< 2 meter) it should work without terminators.
First let me know if swapping the wires solved anything.
What is the protocol that your device is using ?
Kees
11-24-2022 01:15 PM
Thanks.
And do I have to plug in the ground too or is that not important?
The manual tells me that the interface supports a Modbus communication protocol.
11-25-2022 01:32 AM
Yes, connect the 0V (ground)
In your first message you said you can start and stop the pump. How did you do that ??
11-28-2022 10:35 AM
Thank you for your reply.
I want to be able to stop or start the pump with Labview. This is possible thanks to some pins in the pin assignment diagram (see attachment). In addition, a paragraph in the user manual tells me how to operate the external control (see attachment).
But, with the 485 A and B interface and the Ground, can I still control the start/stop of the pump or do I have to use the "Start/stop" pins?
Thanks again.
11-29-2022 01:40 AM
Hi,
This piece of short text tells something about the wire functions.
Maybe you should share more information about the pump.
Manual with a description of the ModBus interface ?!??
Kees