Control the 6 channel Pfeiffer MaxiGauge TPG 256A pressure gauge controller via Python

update in 2014: The script from this blog post evolved into its own Python software repository on Github: pklaus/MaxiGauge. Please use that for the latest code and functionality.

original post:

I wrote a Python module for this pressure gauge controller. The module can be found on https://gist.github.com/1378695. Using the module is straight forward:

Please leave a comment if you think this is useful and contribute to this module if you improve the code.

Requirements

The Python module depends on PySerial, a cross platform Python module to leverage the communication with the serial port. Its installation is described in http://pyserial.sourceforge.net/pyserial.html#installation. If you have pip installed on your computer, getting PySerial is as easy as:

pip install pyserial

RS232 Connector pin assignment

See page 22 of the manual:

Pin Meaning
1 Chassis
2 RXD (RS232C)
3 TXD (RS232C)
4 not connected
5 Signal Ground
6 RX+ (RS422)
7 RX- (RS422)
8 TX+ (RS422)
9 TX- (RS422)

So you cannot use a one-to-one cable to your computer. The transmit and receive lines are crosslinked ⟹ thus you need a null modem cable.

Resources

Comments