Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

RS485 pump control via Labview

Go to solution


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.

0 Kudos
Message 1 of 21

If it is true RS485, you don't need Modbus, you can use the VISA functions to communicate.


This is an excellent tutorial -

Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.
Message 2 of 21

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.

Rolf Kalbermatter
Averna BV
Message 3 of 21
Accepted by topic author nicos1712

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



Message 4 of 21

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.



0 Kudos
Message 5 of 21

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 ?



0 Kudos
Message 6 of 21


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.




0 Kudos
Message 7 of 21

Yes, connect the 0V (ground)


In your first message you said you can start and stop the pump. How did you do that ??

0 Kudos
Message 8 of 21

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.


0 Kudos
Message 9 of 21



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 ?!??



0 Kudos
Message 10 of 21