This is a bunch of simple Python scripts that are useful for accessing data from Fluke 28X meters with the IR remote USB cable.
# Created from information provided in Fluke Remote IR documentaton cited in eevblog threads
# buy a Remote Interface from Fluke to access this information, Some come with FlukeView--a form
# completion application--that is well worth the money for paid work by skilled technicians
import serial
ser = serial.Serial()
# Setup serial USB
ser.port = '/dev/cu.usbserial-AC00FZQJ' # Serial port
# Serial port setup and open
ser.baudrate = 115200
ser.bytesize = serial.EIGHTBITS
ser.parity = serial.PARITY_NONE
ser.stopbits = serial.STOPBITS_ONE
ser.xonxoff = True
ser.rtscts = False
ser.dsrdtr = False
ser.timeout = 0.1 # seconds
try:
ser.open()
except:
print("Cannot open serial port...")
exit()
######################################################
def probe():
QRSI() # Put the function you want to probe here, run in IDLE or Thonny, etc.
# to read the current measurement data
def QM():
ser.write(('qm' + '\r').encode('utf-8'))
if ser.read():
data = (ser.read(32).decode('utf-8'))
for i in range(0 , 4):
print ((data.split(','))[i])
# example:
# 9.999E0
# VDC
# NORMAL
# NONE
# to read the basic meter data
def ID():
ser.write(('id' + '\r').encode('utf-8'))
if ser.read():
data = (ser.read(32).decode('utf-8'))
for i in range(0 , 3):
print ((data.split(','))[i])
# to read the "present data that is displayed on the LCD" (Source: Fluke Remote Interface)
def QDDA():
ser.write(('qdda' + '\r').encode('utf-8'))
if ser.read():
data = (ser.read(999).decode('utf-8'))
for i in range(0 , 28):
print (str(i) + ' ' + (data.split(','))[i])
# QDDA produces a lot more than the displayed voltage
# this is a binary version of QDDA
def QDDB():
ser.write(('qddb' + '\r').encode('utf-8'))
data = (ser.read(999)) #.decode('utf-8'))
for i in range(0 , len(data)):
print ( data[i])
# this is the data supporting an automated recording of measurements made by Fluke 28X
# the new firmware supports over a dozen 'recordings' each of which has its own identifing number
# that is shown in the display when viewing memory on the meter. In QRSI use 0-## with ## representing
# the last recording, not the "identifying number" IOW: there are 0 to nn slots holding recordings
# that might have YMMV identifiers. Fluke is clever with this.
def QRSI():
ser.write(('qrsi 14' + '\r').encode('utf-8'))
ser.read(2) # the OK 0 and CR
data = (ser.read(999)) #.decode('utf-8'))
for i in range(0 , len(data)):
print (str(i)+','+str((data[i])))
#print (str((data[i])))
# QSRR is reported to be the function that can access individual "samples" in a recording, presumanbly
# with the actual recording identifier obtained frm QRSI. I have not been successful in accessing.
def QSRR(): # No meaningful results yet, sorry
ser.write((('qsrr 5, 0').encode('utf-8')))
ser.write(149)
ser.write(('\r').encode('utf-8'))
if ser.read(2): # the OK 0 and CR
data = (ser.read(999)) #.decode('utf-8'))
print (data)
for i in range(0 , len(data)):
print (str(i)+','+str((data[i])))
#print (((data[i])))
# figure this one out, please
def QSLS():
ser.write(('qsls' + '\r').encode('utf-8'))
if ser.read():
data = (ser.read(32).decode('utf-8'))
print (data)
# this is like 'main' in C
probe()