We have purchased a pump. And we would like to control the pump through Mathematica. The furnished has explained to us:

The KDS 410 is not compatible with the Adagio software.

This pump can be controlled by sending it 'Pump Chain' commands (plain ASCII) from any application that can send plain text out through a COM port (such as Labview, MATlab, Python or even a terminal emulator)

I think that if Matlab can do this, so Mathematica can do it also. But I didn't find any command in Mathematica to do this. Can someone help me? Thank you very very much.

  • 1
    $\begingroup$ Look at the documentation for OpenWrite or OpenAppend for examples and the "file" you want to open is probably COM1 if you are using Windows. $\endgroup$
    – Bill
    Jan 12 '21 at 9:24
  • $\begingroup$ related $\endgroup$
    – andre314
    Jan 12 '21 at 18:02

The Wolfram Documentation has extensive examples of writing to serial ports


You would try something along the lines of

dev = DeviceOpen["Serial","COM1"];
DeviceWrite[dev,"Pump Chain"]

(more details are needed about the baud rate supported by your device, specific commands, etc. to say any more, but this should at least get you started. )


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.