LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send elapsed time to next while loop

I'm developing a VI to control a power supply.  2 questions:
1)During this first while loop, the power supply is ramping up the voltage.  After the voltage setpoint is reached, I want it to exit the while loop and continue on to the second while loop, which measures the current/voltage info until the stop time is reached.  The effect I'm getting is that the first while loop increases the voltage 2 volts beyond the voltage setpoint.  Other than reconfiguring the voltage to be the setpoint voltage AFTER the while loop exits (i.e. overshooting and then resetting to desired voltage), how can I remedy this?

2)In the VI (attached), the first while loop contains an elapsed time VI to timestamp the voltage/current information before it is written to a file.  After the voltage ramp is complete, I want to continue appending this timestamped information to the same text file.  The timestamp, however, is not carrying over from the first while loop to the second (i.e. the time counts up during the first loop, then restarts at zero during the second loop.)  I've tried wiring the PRESENT output of the first elapsed time VI to the start time input of the second, but no luck.  Please instruct me on the correct way to accomplish this.

Thank You
0 Kudos
Message 1 of 2
(2,671 Views)
As to #1:

I can easily see where 1V is coming from.  When you decide to stop the while loop, you still check the current.  If the current is less than your setpoint, you increase your voltage by 1V.  The second volt may be a timing issue, because you have no delay between setting to voltage and measuring the voltage.  Since I don't have the device driver, I cannot tell if it confirms settings or not.  So, you MAY be measuring your volatge before the power supply has had a chance to set it.

#2:

You wired present time from your 1st timer to the start time of your second timer.  Try wiring the Get Start Time instead.


Message Edited by Matthew Kelton on 02-20-2008 04:09 PM
0 Kudos
Message 2 of 2
(2,663 Views)