02-07-2014 11:34 AM
If the program stops, the voltage is <10. What value do you receive?
02-07-2014 11:36 AM
0.197872; 0.00561237
The first is voltage in Volts and the second is current in Amperes
02-07-2014 12:03 PM
Well ~0.2 is less than 10. Maybe you need a delay somewhere or maybe you need to skip the termination comparison until the voltage is greater than 10 for a few iterations.
02-07-2014 12:45 PM
The delay is exactly what I felt needs to be done!
I am re-writing this code and make sure that everything is OK, then include the delay in the code to see if it works or not!
02-07-2014 03:47 PM
Most power supplies have a programming response time depending on how much of a change occurs in the voltage level. You can check the specs of the supply and setup your delay based on that value so you don't slow down the VI unnecessarily. If the response time is 300ms and your program loop executes 10 times within 300ms, you could be getting the same reading everytime which will make your stdev close to zero, causing the loop to exit.
02-07-2014 04:47 PM
I have already checked response time from the power supply which is much faster than the command compilation time. So, the response time could not be the problem.
the probllem is in the implementation of the condition to the code as mentioned before:
1-check te voltage fluctuation to be less than 0.1V
2-divide current by 2 and set it as new current
3-repeat 1 and 2 until the voltage is bellow a certain value