08-12-2014 09:49 PM
Hello everyone we are now using labview for our project, which is to manage charging and discharging process for a battery. And we need to record the life cycle for the battery. That is when recharging it life cycle should be increased by 1.
We try to use case structure with for loop but it increase too fast and keep increasing. I only want it to increase once when limitation is meeted. Also I try to use shift register but it can't stop...also keep increasing unless I stop the whole program.
Can anyone help us with this problem?? If recieve a signal, boolean or something else..., life cycle(variable) will increase by 1.
Millions of thakls!!!
Solved! Go to Solution.
08-12-2014 10:33 PM
You should be able to use the loop counter from your outer most For or While Loop to count up a number for each cycle, assuming that you have each charge and discharge as a single process.
Otherwise you should be able to implement the counter pretty simply dependent on some condition using the most basic set up of:
08-12-2014 10:58 PM - edited 08-12-2014 11:05 PM
@AmeHyesung wrote:
Hello everyone we are now using labview for our project, which is to manage charging and discharging process for a battery. And we need to record the life cycle for the battery. That is when recharging it life cycle should be increased by 1.
We try to use case structure with for loop but it increase too fast and keep increasing. I only want it to increase once when limitation is meeted. Also I try to use shift register but it can't stop...also keep increasing unless I stop the whole program.
Can anyone help us with this problem?? If recieve a signal, boolean or something else..., life cycle(variable) will increase by 1.
Millions of thakls!!!
here's a simulation using a state machine, see if you understand the process here. user sets charge and discharge capacity and the number of cycles to be done.
08-12-2014 11:10 PM
This all seems to be working fine, Is there anything else that you need help with?
08-12-2014 11:14 PM
Thanks !!! I'll try it!!!
08-12-2014 11:16 PM
really really thank you!!!!!!!
08-13-2014 01:56 AM
Hello apok~I try to connet the vi that you did with a DAQ to get the state of charge from a battery. But when connect to daq the program cannot work well....When press start putton there's nothing happen. mAh also doesn't indicate SOC and it won't change to either 'charge' or 'discharge'... Is there something wrong with what I added??
08-13-2014 02:38 AM
08-13-2014 05:03 AM - edited 08-13-2014 05:05 AM
@AmeHyesung wrote:
Hello apok~I try to connet the vi that you did with a DAQ to get the state of charge from a battery. But when connect to daq the program cannot work well....When press start putton there's nothing happen. mAh also doesn't indicate SOC and it won't change to either 'charge' or 'discharge'... Is there something wrong with what I added??
yes...dataflow. the daq must be read by the loop, whether it's internal(daq in same loop) or a second loop communicating through queues or locals and not by the way you connected the 2 loops.
hmmm...i've read the SOC somewhere? are you working with @JoeR_87
08-13-2014 08:54 PM
Sorry...what do you mean by locals??? local variables or a function??
I'm not working with him~ 🙂