Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Python+6514+GPIB automation problem

6514, 6517 Support
Post Reply
yingying
Posts: 2
Joined: September 22nd, 2020, 7:38 pm
Country: United States

Python+6514+GPIB automation problem

Post by yingying » September 22nd, 2020, 7:53 pm

Hi,
I want to use python and GPIB to control 6514 and get the data back. Here is my code.

rm = visa.ResourceManager()
rm.list_resources()
keithley = rm.open_resource("GPIB::14")
print(keithley.query('*IDN?'))

keithley.write("*rst")
keithley.write("sense:function 'current'")
keithley.write('sense:current:range 20e-3')
keithley.write('system:zcheck on')
keithley.write('system:zcorrect on')
keithley.write('system:zcheck off')
time.sleep(1)
keithley.write('format:elements reading')
keithley.write('trace:points 10')
keithley.write('trace:feed sense')
keithley.write('initiate')
keithley.write('*OPC?')
keithley.write('trace:data?')
keithley.write('trace:clear')
keithley.write('trace:feed:control next')

I'm a starter with python. The program should be run twice to get the data back. I don't know why it happened.
Also, I don't know how to save the data as a list.

Thank you for your help in advance!

yingying
Posts: 2
Joined: September 22nd, 2020, 7:38 pm
Country: United States

Re: Python+6514+GPIB automation problem

Post by yingying » September 23rd, 2020, 1:22 am

Solved..

The data was saved in IDN...

Post Reply

Return to “Electrometers”

Who is online

Users browsing this forum: No registered users and 1 guest