Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
06-26-2017 05:18 PM
Hi all,
I am doing battery research, and I need to write a labview program to charge and discharge my battery ( the commercial test stations typically cost at least a few thousands). I have a couple of Keithley 2000 meters so that I can measure my current and voltage as a function of time. I also have a Keithley 6220 current source so that I can use it either as a current source (e.g., 1 mA for charging) and a current sink ( e.g, -1mA for discharging). I am able to control the current source meter using the downloaded driver, however I was unable to make the current change automatically for cycling tests.
For examples, I wish to discharge a battery for 1 h (set current level at -1 mA), then charge it for 1h (set current level at 1 mA), and repeat the procedure for 100 cycles. I have put a timer to give time in second, by dividing with 3600s we can get hours as well. Can anyone help me finish the program so that I can have the meter to switch between positive and negative currents automatically and put the current level to 0 after the very last cycle?
Thanks.
Andrew
Solved! Go to Solution.
06-26-2017 05:44 PM
Hi Andrew,
The quick fix is to put your current value into a shift register. When your timer is up, multiply the value by -1.
The longer fix is to look into a state machine architecture. Googling "labview state machine" will give plenty of results. You could then have a charging state and a discharging state.
06-26-2017 09:07 PM
Here's a link for the State Machine tutorial.
06-27-2017 10:03 AM - edited 06-27-2017 10:06 AM
Having designed and programmed a similar system (My battery test system has 6x DC power sources and DC loads, I use an Agilent 34972A for data acquisition and can discharge up to 125 Amps and charge up to 50 Amps single batteries or up to 75V battery strings and I can series/parallel for larger batteries)
Our batteries are not toys...
I don't know where you are getting your battery test algorithm, but charging for an hours and discharging for an hour is not going to tell you much. To measure battery capacity you need to top them off then discharge at a constant rate until LVD while keeping track of the Amp Hours discharged. Then you recharge while also keeping track of the Amp Hours restored, (usually until Ah restored is > 110% Ah Discharged) and repeat at several different discharge rates.
Also you need to use a proper program architecture like a state machine, "One big loop" does not cut it.
Think about your process and break it down into steps, then translate those steps into program "states"
My battery test goes something like this:
So I have these states:
My program spends most of it's time in the "Timer" state waiting to take a measurement. Based on the measurement taken the next state is determined.
06-27-2017 11:37 AM
Hi Gregoryj,
Thanks. I am working on it.
06-27-2017 11:39 AM
Cbutcher, Thanks for the advice.
06-27-2017 11:51 AM
Hi Rtslvu,
Thanks for you detailed explanation. I am testing a newly developed solid electrolyte for room temperature applications. The batteries were assembled as CR2032 coin cells so that we are talking about mA range. And the 1 h charge is just an example, and should be a control parameter. What I want to see is not the maximum capacity (already measured) but the cell voltage response after many low charge and discharge cycles under a given current. If you don't mind, can you share your program or send it to me as a message? I can share or repost my program after I get the functions I need.
06-27-2017 12:14 PM
Here is an example that uses a single DC source and power supply that will be easier to follow.
06-27-2017 12:56 PM
Thanks. Need to upgrade my Labview version 🙂
06-27-2017 12:58 PM
I can save it for an older version, what version do you need?