Author Topic: Datron 1271 GPIB access to error listing  (Read 441 times)

0 Members and 1 Guest are viewing this topic.

Offline View[+]FinderTopic starter

  • Supporter
  • ****
  • Posts: 208
  • Country: us
    • Sparks! A Learning Place for Curious Minds
Datron 1271 GPIB access to error listing
« on: November 10, 2024, 04:56:44 pm »
With a Datron 1271 having "problems" (including a broken right-side display), here is a Python script to use PYVISA and GBIB to read the device dependent error list.
Code: [Select]
import pyvisa
import time
visa = pyvisa.ResourceManager()
DT1271 = visa.open_resource('GPIB0::2::INSTR')
DT1271.timeout =20000
#DT1271.write('CNFTST?') #run confidence test
input() # to give time to run test
error = 9999
while int(error)  > 0:
    error = DT1271.query('DDQ?')
    print (str(error))
    time.sleep(0)
print (DT1271.query('*IDN?'))
DT1271.close()
The CNFTST? command is in the Datron_UserManual_Issue1 on page 5-65 (BIG THANKS to xdevs for the source)
This will probably work for the full test, etc. but not tested yet.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf