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.

Need a Battery Characterization Script for 2651A

Use this forum for questions about Keithley Test Script Builder software.
Post Reply
BatteryMaker
Posts: 9
Joined: August 14th, 2013, 6:46 am
Country: Germany

Need a Battery Characterization Script for 2651A

Post by BatteryMaker » August 14th, 2013, 7:45 am

Hello, my research facility specializes in making batteries materials.
We own 2651A High power systems Sourcemeter.
We need to do various parametric testing of the battery. Some important ones are
Charge/discharge curves. I need to be able to develop a discharge curves at constant current and be able to develop power density of the battery I have developed.

I found a script for 2400 model, but I am not an expert programmer so I do not know how to modify the old programming language to make it fit with 2651A.
This is a very important work we are doing and I would like to have the capability to be able to do this without much hassel.

Can someone help me reconfigure this code so that it works with 2651A code or can someone give me an existing code that is useful for studying batteries.

Any help is deeply appreciated.

The old code can be found here. ( it is found under support >> type 2400 and look for the following result.

#807 Battery Discharge/Charge Cycling Using Keithley Series 2400 SourceMeter


Please help.

Manfred B
Keithley Applications
Keithley Applications
Posts: 14
Joined: April 30th, 2010, 4:28 am
Country: Germany

Re: Need a Battery Characterization Script for 2651A

Post by Manfred B » August 19th, 2013, 2:37 am

Hi,

please have a look to the attached note to convert 2400 to 2600 code.

Also have a look to 2651A User manual for code examples.

rgds.
Attachments
2616_SCPI_to_TSP_AN.pdf
(235.15 KiB) Downloaded 1545 times

BatteryMaker
Posts: 9
Joined: August 14th, 2013, 6:46 am
Country: Germany

Re: Need a Battery Characterization Script for 2651A

Post by BatteryMaker » August 19th, 2013, 1:30 pm

Thanks very much for this, but it appears that not all codes have it's respective translations on this document you sent me. Here is the code I'm trying to translate to 2652A. I am not familiar with Call send command for example. Looks like not all of these codes are found on the document you sent me. I notice some of them were there. Following is the code I'm trying to adapt for my 2651A machine.

'$INCLUDE: 'ieeeqb.bi'
'Program name is 2400gsm.bas.
'This program creates a current squarewave for GSM profile.
'Press local and output to turn off output prior to reaching threshold.
'This program uses Micro QuickBasic 4.5 and the KPC-488.2AT IEEE Interface Card.
TYPE Rdg2400
Reading AS SINGLE
Time AS SINGLE
END TYPE
CONST NUMRDGS = 2400
DIM Rdg(2) AS Rdg2400
CLS
'max value is 2500
INPUT "Enter the 2400's Threshold Voltage: "; tval!
CALL initialize(21, 0)
CALL transmit("UNT UNL MTA LISTEN 24 LISTEN 16 SDC UNL UNT", GPIB.STATUS%)
' *RCL 0 was already programmed to come up in HI-Z standby
' and it was setup to be the power-on default
CALL send(24, "*RCL 0", GPIB.STATUS%)
CALL send(16, "*RCL 0", GPIB.STATUS%)
REM******set-up 2400 to be a voltmeter:
CALL send(16, "form:elem volt,time;bord swap;data sreal", GPIB.STATUS%)
CALL send(16, ":sour:func:mode curr", GPIB.STATUS%)
CALL send(16, ":sour:curr:rang min", GPIB.STATUS%)
CALL send(16, ":sens:func 'volt'", GPIB.STATUS%)
CALL send(16, ":sens:volt:dc:rang 10", GPIB.STATUS%)
CALL send(16, "sens:volt:dc:nplc .01", GPIB.STATUS%)
CALL send(16, ":arm:count 1;:trig:count " + STR$(NUMRDGS), GPIB.STATUS%)
CALL send(16, "trig:sour tlink;asyn:ilin 2", GPIB.STATUS%)
CALL send(16, ":syst:azer:stat off", GPIB.STATUS%)
REM*******set-up limits for 2400
CALL send(16, ":calc2:lim2:stat 1", GPIB.STATUS%)
CALL send(16, "sour2:ttl 0", GPIB.STATUS%)
CALL send(16, ":calc2:lim2:UPP:data 10;sour2 1", GPIB.STATUS%)
CALL send(16, ":calc2:lim2:LOW:data " + STR$(tval!) + ";sour2 1", GPIB.STATUS%)
CALL send(16, ":calc2:clim:clear:auto 1", GPIB.STATUS%)
CALL send(16, ":calc2:clim:pass:sour2 0", GPIB.STATUS%)
CALL send(16, ":calc2:lim2:stat on", GPIB.STATUS%)
CALL send(16, "sour:del 0.00035", GPIB.STATUS%)
REM******setup 2420 to be a current source:
CALL send(24, ":sour:func:mode curr", GPIB.STATUS%)
CALL send(24, ":source:curr:rang 3", GPIB.STATUS%)
CALL send(24, ":source:list:curr -1.42,-.224,-.224,-.224,-.224,-.224,-.224,-.224", GPIB.STATUS%)
CALL send(24, ":SOURCE:curr:mode list", GPIB.STATUS%)
REM*****set measure of 2420:
CALL send(24, ":SENS:FUNC:OFF:ALL", GPIB.STATUS%)
CALL send(24, ":VOLT:RANG 10;PROT 10", GPIB.STATUS%) '(see note below)
'NOTE: PROT must be greater than the battery voltage
REM*****global paramters
CALL send(24, ":outp:int:stat on", GPIB.STATUS%)
' Enable Interlock
'Setup Status Model to SRQ on goto IDLE
'routine checks if test is done running
CALL send(24, ":stat:oper:enab 1024", GPIB.STATUS%)
CALL send(24, "*SRE 128", GPIB.STATUS%)
' Clear Pending SRQ's
CALL spoll(24, poll%, GPIB.STATUS%)
CALL send(24, ":stat:oper?", GPIB.STATUS%)
A$ = SPACE$(80)
CALL enter(A$, l%, 24, GPIB.STATUS%)
REM*****set trigger for 2420:
CALL send(24, "ARM:COUNT INF", GPIB.STATUS%)
CALL send(24, "arm:olin 2;outp trig", GPIB.STATUS%)
CALL send(24, ":source:delay .00035", GPIB.STATUS%)
CALL send(24, "TRIG:COUN 8", GPIB.STATUS%)
CALL send(24, "TRIG:DELAY 0", GPIB.STATUS%)
REM*****turn displays off:
CALL send(16, ":disp:enable off", GPIB.STATUS%)
CALL send(24, ":disp:enable off", GPIB.STATUS%)
OPEN "Testdata.txt" FOR OUTPUT AS #1
PRINT #1, "Reading (V), Time (s)"
CALL settimeout(500)
R$ = SPACE$(2)
Init2400% = 1
CALL send(24, ":OUTP ON", GPIB.STATUS%)
CALL send(16, ":SYST:TIME:RESET;:OUTP ON", GPIB.STATUS%)
DO
CALL send(16, ":READ?", GPIB.STATUS%)
IF Init2400% THEN
CALL send(24, ":INIT", GPIB.STATUS%) 'synchronize 2400 & 2420
Init2400% = 0
END IF
CALL transmit("UNT UNL MLA TALK 16", GPIB.STATUS%)
CALL receive(R$, l%, GPIB.STATUS%)
FOR x% = 1 TO NUMRDGS
CALL rarray(Rdg(1), 8, l%, GPIB.STATUS%)
IF GPIB.STATUS% = 8 THEN
x% = NUMRDGS
' Display and save the last Reading
PRINT #1, Rdg(1).Reading; ","; Rdg(1).Time
PRINT Rdg(1).Reading; ","; Rdg(1).Time
ELSEIF x% MOD 400 = 0 THEN
' Display and save reading every 2 seconds (as indicated by 400)
' NOTE: if 100 then .5s, 200 then 1s, 400 then 2s, 600 then 3s, etc.
' Make sure this number is an interger multiple of CONST NUMRDGS
' defined at the beginning of the program
PRINT #1, Rdg(1).Reading; ","; Rdg(1).Time
PRINT Rdg(1).Reading; ","; Rdg(1).Time
END IF
NEXT
CALL rarray(Rdg(1), 1, l%, GPIB.STATUS%)
CALL transmit("UNT UNL", GPIB.STATUS%)
LOOP UNTIL (srq%)
' Wait for 2400 to finish
CALL transmit("UNT UNL MTA LISTEN 24 LISTEN 16 SDC UNL UNT", GPIB.STATUS%)
CALL send(16, ":OUTP Off", GPIB.STATUS%)
CLOSE #1
END

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

Re: Need a Battery Characterization Script for 2651A

Post by Andrea C » August 20th, 2013, 3:57 am

The 'Call' syntax is how the Quick Basic interpreter executes an external function.
The external functions in this case are those of the GPIB interface card: initialize, transmit, send, receive, etc.
So, unless you are using Quick Basic and the KPC-488.2AT GPIB interface card, those aspects of the code will not apply.

In this statement: CALL send(16, ":sour:func:mode curr", GPIB.STATUS%)
The ":sour:func:mode curr" would be the interesting part. It is configuring the 2400 SourceMeter to source current (rather than voltage).

If you do not presently make use of 2400 series SourceMeter for this task, then I might advise you to lay aside this approach as it will require to to become familiar with both the 2400 series and the 2651A.

For the time being forget about trying to convert an ancient Quick Basic program.
What is your chosen software for this task?
What interface are you using to communicate with the 2651A (GPIB, Ethernet)?

Have you been able to send and receive the most basic of commands such as *IDN? and read back the response?

For the battery charge/discharge profile, what are the parameters of the current, voltages and pulse width and duty cycle that you need to achieve? The 2600A family of SourceMeter will be able to do current pulses with a much better timing fidelity than the 2400 series can, so again, I advise to lay aside the 2400 code and layout a plan based upon the resources that you have today.

Andrea

BatteryMaker
Posts: 9
Joined: August 14th, 2013, 6:46 am
Country: Germany

Re: Need a Battery Characterization Script for 2651A

Post by BatteryMaker » August 20th, 2013, 4:57 am

I would like to charge the battery. Hold this charge and discharge it later and log these data.

For this I am using Tsbexpress the java software -.

What i need to do is set the high impedance on while running this program. Problem is currently
when i do the sweeps the high impedance is not on and the system is short circuiting itself.

in the old machine, the way they were controlling this was via, :outp:smodhimp

The parameters for charging and discharging will vary so that is not as important.

I need to have a flexibility to discharge this at the lowest constant current as possible.

Currently, the way I am attempting to do this is, using single sweep option from tsbexpress.
specify the compliance current, choose constant voltage as the source, open up a voltage range to sweeping style or constant volt style.

I have to literally pull out one of the cables to create a open circuit so that my charged capacitor is not discharging itself.

So what do you think. How can I get going on this?

Aneil

BatteryMaker
Posts: 9
Joined: August 14th, 2013, 6:46 am
Country: Germany

Re: Need a Battery Characterization Script for 2651A

Post by BatteryMaker » August 20th, 2013, 8:01 am

I found some script that I might be able to use with my unit. Now I need to add a charging component to this as well, so I can get the curves on a same graph.
Charge first and then Discharge. Could you check if this would work with my 2651A. I will make minor modifications to it of course. This code should do the discharging, it was written for model 2450 but it is written on the tsbscript. Could you share with me some more scripts for this model as it is applicable for my battery testing.



--Reset the instrument and clear the buffer
reset()
--Source Settings
smu.source.func = smu.FUNC_DC_VOLTAGE
smu.source.offmode = smu.OFFMODE_HIGHZ
smu.source.level = 1
smu.source.range = 2
smu.source.readback = smu.ON
smu.source.ilimit.level = 460e-3
--Measurement Settings
smu.measure.func = smu.FUNC_DC_CURRENT
smu.measure.range = 460e-3
smu.measure.sense = smu.SENSE_4WIRE
--Set the voltage limit for the battery to stop discharging
--Set the variable for number of iterations
voltLimit = 1.0
iteration = 1
--Turn on the source output
smu.source.output = smu.ON
--Change display to user screen
display.changescreen(display.SCREEN_USER_SWIPE)
--Keep taking readings in the while loop until the measured voltage
--is equal to the voltage limit
while true do
--Take a reading and get the current, voltage and time
curr = smu.measure.read(defbuffer1)
volt = defbuffer1.sourcevalues[iteration]
time = defbuffer1.relativetimestamps[iteration]
hours = time/3600
--Print the # of completed cycles, the voltage and the time for
--the iteration. Display information on front panel
print("Completed Cycles: ", iteration, "Voltage: ", volt, "Time: ", time)
display.settext(display.TEXT1, string.format("Voltage = %.4fV", volt))
display.settext(display.TEXT2, string.format("Current = %.2fA, Time = %.2fHrs", curr, hours))
--Increment the number of iterations and wait 10 seconds
--Compare the measured voltage to the voltage limit
--Exit the loop if it is
if volt <= voltLimit then
break
end
iteration = iteration + 1
delay(10)
end
--Turn the output off when the voltage limit is reached
smu.source.output = smu.OFF
--Print out the measured values in a 4 column format
print("\nIteration:\tCurrent:\tVoltage:\tTime:\n")
for i = 1, defbuffer1.n do
print(i, '\t', defbuffer1, '\t', defbuffer1.sourcevalues, '\t', defbuffer1.relativetimestamps)
end

Post Reply

Return to “Test Script Builder”

Who is online

Users browsing this forum: No registered users and 3 guests