Saturday, November 7, 2009

Scrolling Message Display on a DMM

Recently, I came across this Python package for GPIB interfacing. It's called PyVISA, and it's relatively easy to use even if you don't have backgrounds on Python programming language. As part of my experiments on Python PC interfacing, I managed to borrow an equiptment having a GPIB port.The Agilent (HP)34410A Digital Multimeter (DMM), it's one of the commonly used equipments in our workplace. While reading the 'remote programming' manual of this DMM, I found out that it is capable of displaying text (e.g. alphanumerics) on its front panel display. The GPIB command is fairly simple, just send DISPlay:TEXT + the qouted message. (e.g. DISP:TEXT "hello" ). The message to be displayed is up to 12 characters long.


the PyVISA python script for scrolling message:
 import visa, time  

hp = visa.Instrument('GPIB::2')

def display(msg):
hp.write('DISP:TEXT ' + '"' + msg + '"')

message = ' scrolling message display on Agilent HP34410A using Python PyVISA. by yus Electronicslab.ph'

for count in range(100):
for i in range( len(message)):
#display(message[i:(i+12)])
display(message[i:(i+12)].upper())
time.sleep(0.3)


demo:


forum link: GPIB (General Purpose Interface Bus, IEEE-488)

No comments:

Post a Comment