Example code demonstrating how to control the HP34970A datalogger and HP34901A 20-ch MUX using Python. The Python script communicates to the instrument via the GPIB/HPIB interface using a Prologix GPIB-USB controller. In addition to the GPIB interface, the datalogger possesses a RS232 serial interface for instrument control as well.
- HP3470A_34901A_Data_ACQ_Example.py provides the example for using PySerial to control the HP datalogger
- PrologixGpibUsbManual-6.0.pdf user manual for GPIB controller
- HP34970A_Quick_CMD_Ref.pdf summary of the SCPI commands used to program the 34970A mainframe and plug-in modules.
- Download Python v2.7 (choose 32 or 64 bit based on the your OS bitness)
- Set the GPIB address of the datalogger following the user manual instructions
- Connect the Prologix GPIB-USB controller to the host PC and ensure the driver automatically downloads. The controller should appear as a COM port on your PC if the driver installed correctly. The driver may be found on the MFG website for manual installation.
- Connect the Prologix GPIB-USB controller to the GPIB/HPIB port on the back of the datalogger
- Connect the voltage source(s) to be measured to ch1,2 and or 3 of the HP34901A 20-ch MUX
- Run the Python script