08-12-2013 05:58 AM - edited 08-12-2013 05:58 AM
Hi everybody,
I found that I got different results when highlighting execution or not, quite strange.
As the VI attached below, I try to use the "index" got from the last time to adjust the starting point of the sine signal inside the loops, but I need to initialize it to 0 when finishing the for loop and running the program once again, so I put an initialize invoke node outside of the for loop.
However, say, now I change the value of the "index" indicator to 20 and run the program, the local variable isn't initialized to 0, and the signal doesn't begin from 20.17v. While when I turn on the highlight execution, It indeed displays initialize to 0 and the signal begins from 20.17v properly...
I feel quite confused why the VI runs differently when I turn on the highlight execution or not. Is it related to the time delay or something? Need your help!
Thanks a lot! : )
08-12-2013 06:20 AM
08-12-2013 06:29 AM
Ok, I see. So what if I put the initialize nodes into a sequence before the loops' ?
08-12-2013 06:34 AM
@cun wrote:
Ok, I see. So what if I put the initialize nodes into a sequence before the loops' ?
Not the best way to do it but that should work.
Ben64