08-28-2012 10:47 AM
I see what you mean, but now it measures the time how long it takes to complete the for-loop. But I need the time how long it takes to come up till 3,14322 volt. That time is 1 tau, and I need it to measure the capacity of the capacitor.
08-28-2012 02:41 PM - edited 08-28-2012 02:45 PM
Hi Matt,
the principle of taking time measure is always the same:
- get start time
- do work
- get end time and take difference
All that is put into 3 frames of a sequence. I'm sure you're able to apply that scheme for the parts inside the FOR loop on your own...
Still I suspect the main part of "execution time" is hidden in the "Wait for next multiple".
Also you have to remember: Windows will give you a big jitter on time measurements!
Next point:
You don't have any relation/data dependency between AnalogOutput and AnalogInput. When you want to measure some reaction on your AnalogOutput signal you clearly have a race condition in your code...
One more point:
Putting a (graph) indicator into your tightly timed measurement loop is contraproductive: Updating the graph may take much more time (due to CPU requirements) than doing all those measurements alone...
08-28-2012 03:07 PM
Hi Gerd,
I tryed it, and put it in 3 frames of a sequence, like your screenshot but it did not work. The time measured was the time of the For loop executing, so that is 6 seconds. And that is also the reason why I have the "Wait for next multiple" is in the for loop, so the 600 iterations take 6 seconds.
I don't exactly know what you mean with the analog output and input... I have changed my VI, I will sent it as attachment..
Maybe it's not all correct, but it is working the way I want.. Accept for the time calculation.. What do you suggest about the Graph? Put it out of the loop?
Thanks anyway for your answer, I can use all support haha...
08-28-2012 03:42 PM
This is how it looks (front panel) when working.
08-29-2012 01:46 AM
08-29-2012 04:31 AM
Thanks a lot GerdW! I did it slightly different, but it's working now! We continue till the next problem occurs
If you're curious how I did it, see attachment.
Best regards,
Matt