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.

Keithley 3706A cannot save Setup

Post Reply
reinhardh
Posts: 5
Joined: December 5th, 2016, 4:10 am
Country: Germany

Keithley 3706A cannot save Setup

Post by reinhardh » December 5th, 2016, 4:27 am

Hello,
I have a Keithley 3706A with 3 3720 Cards installed. I'd like to do 80 Four-Wire-Resistance Measurements through all my wired channels and perform a scan every hour for 100 hours in total.
I built a scan using the web interface and set a simple trigger. Also, I defined my own four wire measurement with dry circuit and offset compensation on. Until here, everything worked out just fine.

But now i want to save this configuration, so everytime I start the 3706A I want to load my previously defined setup and perform the measurements.
I tried to save the setup but everytime I try to do so, the 3706A kinda crashes. The display is frozen and it does not react on pressing any button. I tried to save the setup internally as well as to USB and also tried to save it via Front Panel operation and from the web interface. None of it worked.
Last thing I tried was to Create a config script (also via Web Interface and Front Panel), the display says "Create AutoExec..." and doesn't respond anymore.

How can I save my setup?
The firmware on the device is V1.54A.

Thanks for your help.

best regards
Reinhard

reinhardh
Posts: 5
Joined: December 5th, 2016, 4:10 am
Country: Germany

Re: Keithley 3706A cannot save Setup

Post by reinhardh » January 5th, 2017, 7:25 am

Hi all,

I still couldn't figure out, why I can't create config scripts via web interface, however, I decided to write a script on my own.

The basic functions did work out quite well but I am still having some trouble with the triggering.
As said, I want to perform a quite simple task, which is doing 100 scans over 100 hours, but somehow even the first scan doesn't start. Maybe I'm missing something in the triggering.
Here is my code (in this case I reduced the alarm period to 30 seconds and the scancount to 2):

Code: Select all

if string.find(slot[1].idn, '3720') == nil then             
    print('Card installed in slot 1 needs to be a 3720.')             
    display.clear()             
    display.settext('Card installed in$N$Bslot 1$R needs to be a $B3720$R')             
elseif string.find(slot[2].idn, '3720') == nil then             
    print('Card installed in slot 2 needs to be a 3720.')             
    display.clear()             
    display.settext('Card installed in$N$Bslot 2$R needs to be a $B3720$R')             
elseif string.find(slot[3].idn, '3720') == nil then             
    print('Card installed in slot 3 needs to be a 3720.')             
    display.clear()             
    display.settext('Card installed in$N$Bslot 3$R needs to be a $B3720$R')             
else             
             
display.clear()             
display.settext("100h Messung")          
datum = os.date("%Y%m%d_")             
delay(5)            
reset()             
   dmm.func = 'fourwireohms'             
	dmm.nplc = 12.000000             
   dmm.autodelay = 0             
   dmm.drycircuit = 1             
   dmm.offsetcompensation = 1             
	dmm.configure.set('my4wire')             
	dmm.setconfig('slot1', 'my4wire')             
	dmm.setconfig('slot2', 'my4wire')             
	dmm.setconfig('slot3', 'my4wire')             
	collectgarbage()             
	buf = dmm.makebuffer(8100)             
	buf.clear()             
	buf.appendmode=1         
   schedule.alarm[1].period = 1.00000000E+01
 
	scan.create("1001:1002")             
	scan.add("2001:2002")             
	scan.add("3001:3002")             
	scan.bypass = 1             
	scan.mode = 0             
	scan.measurecount=1             
	scan.scancount =  2      
	scan.trigger.arm.stimulus = schedule.alarm[1].EVENT_ID                     
	scan.trigger.channel.stimulus = scan.trigger.EVENT_SEQUENCE_COMP
   scan.trigger.sequence.stimulus = scan.trigger.EVENT_CHANNEL_READY 
   delay(2)             
	scan.execute(buf)   
          
   dmm.savebuffer("buf", "/usb1/".. datum .. "Zuverlaessigkeit.csv")            
   channel.open('allslots')            
	display.clear()            
	display.settext("$BMessung fertig ")            
end         
After running the script, the device displays "Scan..." but it obviously does not go into the first scan loop, so I guess it misses the trigger to start.

Can anyone help me with this?

Thanks

brian.d.smith
Keithley Applications
Keithley Applications
Posts: 402
Joined: June 10th, 2013, 6:00 am
Country: United States

Re: Keithley 3706A cannot save Setup

Post by brian.d.smith » January 9th, 2017, 5:41 am

Attached is a Python program that scans two wire ohms with one MUX card

Code: Select all


#   This python program controls a 3706A DMM with a 3720 switch card and a 3720-ST brakout board. Nine resistors are installed in channels
#   1 - 9. Two-wire ohms mesurements are scanned. The strings that are returned by the 3706A reading buffer are parsed into individual floats
#   and stored in an array of floats using NUMPY.   This program also demonstrates manipulating data types which is necessary. The measurements in
#   the reading buffer are characters which are returned as a string to python. The python program must parse the string of characters into individual
#   readings and then convert the individual readings from a string to a float. 
#
import visa                                                #import NI Virtual Instrument Software Architecture
import time                                                #import python time functionality
import numpy                                               #import array handling functionality 
results = numpy.zeros((11), dtype=float)                   #create array of floats
A = visa.instrument("GPIB::16")                            #assign VISA GPIB address to a short variable
A.write("reset()")                                         #reset the 3706A
A.write("format.asciiprecision = 7")                       #format precision to 7 digits
A.write("reading_buffer=dmm.makebuffer(1000)")             #create a buffer and assign it the name reading_buffer
A.write("reading_buffer.clear()")                          #clear the buffer
A.write("dmm.func = dmm.TWO_WIRE_OHMS")                    #set dmm function to 2-wire ohms
A.write("dmm.nplc=1")                                      #set NPLC to 1
A.write("dmm.autorange=dmm.ON")                            #set range to sutorange
A.write('dmm.configure.set("my2wireohms")')                #create a named dmm configuration 
A.write('dmm.setconfig("1001:1009","my2wireohms")')        #set channels 1 through 9 to measure two wire ohms
A.write('scan.create("1001:1009")')                        #create the scan list
A.write("scan.scancount=1")                                #execute the scan list one time
A.write("scan.execute(reading_buffer)")                    #execute the scan
measurement = A.ask("printbuffer(1,9,reading_buffer)")     #fetch the buffer from the 3706A
h=int(float(A.ask("print(reading_buffer.n)")))             #fetch the number of readings and convert to an integer
s_1 = A.ask("printbuffer(1,1,reading_buffer)")             #fetch one reading from the buffer
output = ""                                                #crete a variable to be used for concatenating the characters of the string for each float measurement
print measurement, '\n'                                    #linefeed
print s_1                                                  #print one reading
print type(s_1), '\n'                                      #display the data type of variable s_1
bbb=float(s_1)                                             #variable bbb is s_1 converted to a float
print bbb                                                  #print variable bbb
print type(bbb), '\n'                                      #print the variable type of bbb
ddd = int(float(s_1))                                      #ddd is an integer converted from a float of variable s_1
print ddd                                                  #print the variable ddd
print type(ddd),'\n\n'                                     #print the variable type of ddd
counter = 1                                                #initialize a counter for counting the number of commas in the string that is the reading buffer
for i in measurement:                                      #This loop parses the string that is all of the readings from the buffer with commas and sign characters
    if i != ',':                                           #if the character is not a comma, then ....
        output = output + i                                #append that character to the variable named output 
        print i,                                           #print the individual character being evaluated. The comma supress linefeed but adds a space
    else:                                                  #
        results[counter] = float(output)                   #if the character is a comma we are at the end of a reading. place the reading into the array.
        counter = counter + 1                              #increment the counter for indexing the next measurement
        print '\n'                                         #linefeed
        output = ""                                        #clear out the variable output
results[counter] = float(output)                           #we are now out of the loop. No comma at the end of the string. We must store the final reading                  
print "\n\n counter is ",counter                           #print out the counter. This is the number of readings in the buffer
print "\n h is ",h, '\n\n'                                 #print the number of readings deirectly fetched from the buffer. 
for i in range(1,counter+1):                               #print out the array of readings
    print results[i]                                       #
    
    



brian.d.smith
Keithley Applications
Keithley Applications
Posts: 402
Joined: June 10th, 2013, 6:00 am
Country: United States

Re: Keithley 3706A cannot save Setup

Post by brian.d.smith » January 9th, 2017, 6:13 am

Attached is the Python program. Change the .txt extension to a .py extension.
Attachments
3706Ascan.txt
(5.17 KiB) Downloaded 1001 times

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Keithley 3706A cannot save Setup

Post by Andrea C » January 9th, 2017, 12:04 pm

In addition, let make some comments about use of the PTP schedule event.
With the added lines below, your code is working.

Code: Select all

   -- make use of PTP schedule    
   schedule.alarm[1].period = 1.00000000E+01
   -- ALC add
   sec,ns = ptp.time()
   schedule.alarm[1].ptpseconds = sec + 10  -- start 10 seconds after current PTP time
   schedule.alarm[1].fractionalseconds = 0
   schedule.alarm[1].repetition = 2  -- same as scan count
   schedule.alarm[1].enable = 1
   -- end ALC add
Also, since you have a very long running scan, you might want to use a scan.background() rather than scan.execute() so that you can still interact with the 3706A during the 100 hour long scan.

reinhardh
Posts: 5
Joined: December 5th, 2016, 4:10 am
Country: Germany

Re: Keithley 3706A cannot save Setup

Post by reinhardh » January 10th, 2017, 2:54 am

Thanks for your answers.
With your code the script did work.

I'm having one last issue:
When the scan is finished, I want to save the buffer in a csv-file to a USB stick using the dmm.savebuffer command

Code: Select all

dmm.savebuffer("buf", "/usb1/".. datum .. "Zuverlaessigkeit.csv")
The problem is, that the generated file is empty most of the time. The file is created everytime and there is no error message but in - let's say about four out of five times - no data is stored and I don't know why.
I can access the buffer data via buffervar.readings command as well as from the frontpanel recall buffer button.
When I repeat the dmm.savebuffer command, it's the same, sometimes, the data then saved to the file, but mostly not.
I also tried on the frontpanel with Store->Save->USB, same results: the file is always generated, but if it contains data seems to be random.

Before I start the scan, I create the buffer like this:

Code: Select all

buf = dmm.makebuffer(8100)             
buf.clear()             
buf.appendmode=1

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Keithley 3706A cannot save Setup

Post by Andrea C » January 11th, 2017, 3:40 am

That is very odd behavior. Have you tried more than one flash drive?

reinhardh
Posts: 5
Joined: December 5th, 2016, 4:10 am
Country: Germany

Re: Keithley 3706A cannot save Setup

Post by reinhardh » January 12th, 2017, 7:31 am

Not yet but I will do so asap.

reinhardh
Posts: 5
Joined: December 5th, 2016, 4:10 am
Country: Germany

Re: Keithley 3706A cannot save Setup

Post by reinhardh » February 22nd, 2017, 2:16 am

I almost forgot to give some feedback here: I tried two different flash drives and both of them worked.
Thanks again for the help.

Post Reply

Return to “Series 3700 Switch System/Multimeter and Plug-In Cards”

Who is online

Users browsing this forum: No registered users and 8 guests