03-08-2009 09:32 PM
I want to set the value of a numeric slider every time a sertain mode is set. I would suspect the "first call' would be the obvius solution. But for some reson it is always
'true"
Is there a nother good way of solving this problem, or am I doing somthing wrong?
/REO
03-08-2009 10:17 PM
It seems you are using the "continuous run" button to run your VI. Don't!
Since this causes the VI to restart whenever it completes, "first call?" will always be true. Place your code in a while loop and use the plain run button. Now "first call?" will only be true the first time it is encountered during the run.
The "continous run" button is a debugging tool, and should not be used for regular operation. 🙂
03-09-2009 01:57 AM
Hai,
The first call function will always return TRUE in your case the reason is as follows: When a VI runs for the first time this fuction returns TRUE and this VI should remain in memory (in execution mode) so that when it is called the next time it will give FALSE. But the vi does not stay in memory i.e. when you press run button it executes and unloads from memory when execution completes.
One Workaround is keep the VI in memory or put a while loop with unintialized shift register and should run only once! Look at the VI that i have attached.
Hope this helps.