04-21-2011 04:43 AM
Hi guys,
I have a problem, so I activate some timed values on the Analog-outputs from my RedLab card.
The problem is that when I stop the program, the Outputs are still activate.
How can I solve this problem?
Best regards max
Solved! Go to Solution.
04-21-2011 05:46 AM
I'm not trying to be snide, but if you want the outputs to change after your FOR loop finishes, you have to put in code that changes them after the FOR loop finishes.
I'm guessing you need 4 more copies of "A OUT" outside the loop.
Or you could compare "i" to "N-1" inside the loop and do something special on the last loop iteration.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-21-2011 08:03 AM
Well, I tried it in the way you see in the attachment.
It works for the present but my for loop work further till the begun time is at the end.
Maybe anybody have a solution?
Only for explanation, the upper part is in a while loop.
greetz max
04-21-2011 08:15 AM
Maybe we have a language problem, but I don't see why you did what you did.
I suggested putting four(additional) copies of the A OUT vi outside the FOR loop (in your original doc) and using them to set your final values. Make sure they execute AFTER the for loop is done.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-21-2011 08:28 AM
Ok, I think now I know what you mean.
The problem is how should I stop the Program during work? How can I stop the For loop earlier?
greetz max
04-21-2011 08:54 AM
What version of LabVIEW?
I forget which version introduced it, but lately you can add a CONDITIONAL TERMINAL to a FOR loop.
Use it to stop the loop if a button is clicked or if the voltage goes above 3.14159 Volts, or whatever.
You could also use a basic WHILE loop, set the inputs to AUTO-indexing, and compare "i" to N-1 yourself, within the loop.
Stop if STOP BUTTON = TRUE or i = N-1 or V > 3.14159...
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-21-2011 10:32 AM
Also, please do not embed pictures inside of a Microsoft Word document. Simply post the picture directly. PNG, JPG, or GIF ONLY - NO BITMAPS (and DON'T change the extension of a .bmp to get around the upload filter).
04-22-2011 04:50 AM
thank you for your help.
greetz max