07-26-2005 08:27 AM
07-26-2005 08:43 AM
07-26-2005 09:01 AM
I don't get you, anyway, I am asking that question because I just want to make a subvia of the application and of course some indicators shows the last iteration value which is normal because of the while loop, I am surching for a way to read out data for each iteration out of the while loop.
thx
07-26-2005 09:04 AM - edited 07-26-2005 09:04 AM
I would recommend that you look at a queue implementation. You can enqueue the data inside your subvi and then dequeue the data outside the subvi. You could also use notifiers, but be aware that there is the potential for lost data if not programmed properly. There are shipping examples with LabVIEW which show the use of each of these.
You may also use LV2 style globals (also called functional globals). LV2 globals have distinct advantages over standard globals with regard to race conditions in the program. LV2 globals use a single iteration loop with a shift register in which to store the data. There is a significant amount of information on this forum about the use of LV2 globals in your programming.
Message Edited by John Rich on 07-26-2005 09:13 AM
Message Edited by John Rich on 07-26-2005 09:13 AM
07-26-2005 09:22 AM
Hi,
If I understand what you mean... You have a subvi with a whileloop inside. you connected the Iteration counter to an indicator
So, in your top vi you get only the last iteration count. That is completely normal. The top vi gets the value of the indicator after
the subvi completed his job.
If you want the iteration counter to change while the loop is runing, you should use a reference to the indicator on your top vi and
use a property node to change its value.
07-26-2005 09:24 AM
07-26-2005 09:57 AM