Showing results for 
Search instead for 
Did you mean: 

LabVIEW Communication w/ Masterflex Pump (DB25-USB)

Go to solution



I'm trying to configure my Masterflex Peristaltic Pump (77200-30) with my PC to send commands through LabVIEW. I've succeeded by doing this through a DAQ, but I don't have access to one where I am now and opted for a third-party USB-DB9-DB25 cable. 


Following the pump manual, I've tried using the NI-VISA panel to communicate with the pump (get satellite info) and I seemed to have established communication with the \ENQ command as I get a 'no error' return, yet every command I send gets a 'no error' response. 


I've read quite a bit of forums and manuals, in addition to watching serial communication videos, but this is not my area of expertise and I'm unsure if the cable isn't viable for serial communication or if I'm doing something wrong with the initial setup. 


Any tips or advice will be greatly appreciated!

0 Kudos
Message 1 of 6

Hi Jarred

I have the exact same pump. I created a LabVIEW driver to communicate with the pump. 

Please note that you need to connect the USB/Serial Cable to the DB9 connector.

The DB25 is used when controlling the Pump with DAQ.


I'm attaching the LabVIEW code I developed. Feel free to try and see if it works for you !


0 Kudos
Message 2 of 6

I'm confused about what you are referring to with the cables. The pump has a DB25 connector on the back and I'm using this cable with a USB-DB9-DB25. What cable did you use to connect the pump to your computer?


Thanks for sharing the code! The interpret status vi has an error with one of the input parameters being invalid. The serial communication has a handful of errors connecting two terminals of different types and issues with the serial commands. I feel as though I may have some initial communication with the pump that is the reason for these, but I'm not too sure as I haven't been able to validate that I've established communication with the pump or am using the correct cable. 


I attached ss of the code errors. 


0 Kudos
Message 3 of 6

The pump I have is style B, that has both DB 25 and DB9. The DB 25 is used to use DAQ. and DB9 for serial communication. 

Check with Masterflex Representative if your model has the Serial interface.




0 Kudos
Message 4 of 6
Accepted by topic author wrote:

I'm confused about what you are referring to with the cables. The pump has a DB25 connector on the back and I'm using this cable with a USB-DB9-DB25. What cable did you use to connect the pump to your computer?

Just because the number of pins happens to match, does not mean that the connectors are compatible!


According to the manual for your device, the DB25 connector has analog and digital IO signals to control the specific operations for your device. This is a proprietary connector pinout specific for your device.


RS-232 is a serial communication interface and in a long ago past (at a time where you had no PCs but computers were typically mainframes that resided in large racks or similar) it was introduced with a 25-pin connector with many extra control signals to directly drive the control lines of the typical modems that were used to transmit data at a whooping 1200 or even less bits per second.

Soon only the data lines and one or two handshake pairs were really used and the 25-pin connector was kind of overkill and also used up a lot of real estate on a backplane or front panel and the alternative DB9 connector was introduced. The IBM PC also added a parallel port with a special 36-pin Centronics connector to interface to printers, which used that Centronics interface themselve, but that was a clunky thing and got replaced by a 25-pin DSUB connector of opposite gender to prevent wrong connection with serial devices.


Devices with 25-pin DSUB RS-232 connectors are pretty much non-existent nowadays, unless you manage to unearth a prehistoric device from the storage in your attic. Some manufacturers still sell adapters to convert DB-9 to DB-25 but it has little practical value nowadays.


If you do not have the B type device with the DB-9 connectors, you can NOT control it by serial communication, no matter what connection adapter you place between your serial port and the 25-pin connector on your device!


I also like the note in the manual about USB operation (again only available on the B type of this device). Putting the blame on the Windows Virtual serial port driver is a very lame excuse. Devices can work very well through that interface, if the firmware in the device is properly programmed and not some hobby hacking work.

Rolf Kalbermatter
My Blog
Message 5 of 6

Thank you for explaining all of that. I got some inclination of what you said from manuals but they were not as explicit. 

0 Kudos
Message 6 of 6