02-10-2007 10:20 AM
02-10-2007 10:42 AM
02-13-2007 10:15 AM
02-13-2007 10:30 AM
@ManuelR wrote:
Hi altenbach,I think that Nunosantos is using too much local variables...
He wants to change the value displayed by an indicator (not a control!) during the run of the program, thus he must change the code logic that produces the value and that's what I suggested. Most likely the problem is caused by an uninitialized shift register (or an equivalent construct using locals). There is little else in a single VI that can remember state. 🙂
(The second comment was an expansion just in case he confused controls with indicators. There is nothing wrong with writing to a local variable once in an initialization section.)
I agree that we need to see the code to make final suggestions.
02-13-2007 10:31 AM
02-13-2007 10:45 AM
@kehander wrote:
There is also the handy "Clear Indicators When Called" option in the Execution section of VI Properties.
And it will only work here if the indicator is abused as a control via locals. Unfortunately we cannot see the code. 😉
Starting to count 1,2,3,4 everytime the VI starts over would be as easy as connecting the indicator to "[ i ]+1" of a N=4 FOR loop. The fact that he gets 5,6,7,8 in the second run tells me that the code is much more complex than needed and we should focus on fixing the code. 😉
Nuno Santos, have you solved the problem yet?