08-10-2014 10:32 PM
Hello everyone!!! I'm a beginner for Labview.
Now we are using labview to monitor the discharging process for a lead acid battery which require to time current with time (I*t) to get power used for the battery.
But our time counter has a problem that it counts from 0 to 1,2,3,4 then jump to 6 directly. And followed by 7,8,9,10,11 and jump to 13... When run the time counting part individually it runs well that follow 5 by 6 then 7...
I attached our program inside and can someone help us with this problem???
Millions of Thanks!!!!!!!
08-10-2014 10:38 PM
Your DAQ assistant is set to collect exactly 1 seconds worth of data. The code after that is going to take some fraction o ftime to run, thus your overall loop iteration time is going to be something longer than 1 second. Once your VI has run long enough, you are going to come to some time interval that the iteration starts right before a second ends, and ends right after another second starts, more than a second later. That will look like your missing second.
08-11-2014 06:18 AM
Try changing your DAQ Assistant configuration to be "Continuous Samples" instead of "N Samples". This way the DAQ can still be collecting samples even after you read the data and while you process what you have.
You do realize that you are taking 25,000 samples per channel and only using 1 of them, right? You may want to rethink what you are doing here.
08-11-2014 08:14 PM
so I need to decrease my time to collect data. Less than 1s???
08-11-2014 08:15 PM
OKAY I will try it!!!
thank you!!!
08-11-2014 08:35 PM
Yes. Follow Crossrulz's advice. The first iteration will take longer than a second, but with continuous samples, the next second's worth of samples will begin filling the buffer while the VI takes the fraction of a second it needs to do the math after it grabs the data.
But I would also still reduce the amount of samples to grab at a time. Collecting about 1/10th of a second of data is usually a good compromise between have a decent sample set vs.a responsive application. Even setting the amount of data to grab to be 1/4 or 1/2 second would be good.
08-12-2014 09:13 PM
okay okay!!!
Thanksssss!!!!