NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with the Table

Hi to All´
 
I have a small problem and I need help
I want to move 2 axis X&Y (first X than Y) and I want to save the results in one table.
The problem  is that Y moves but in Table the Nr. stays 0.(see attachment)
 
Thanks
Toni
0 Kudos
Message 1 of 2
(2,835 Views)
Hi Toni,
 
the feedback node you have used in your code memorizes the last input value pretty much like a shift register, and initializes with the default numeric value (0), if the init terminal is not wired. So in the first iteration of your outer FOR loop, the node's output is 0 (there is no previous iteration). In the next iteration, it returns the value which was stored in the first iteration, which is - as you have wired the loop index to the input - also 0. During the third iteration, finally, the output changes to 1, which is the iteration index of the second iteration...
 
So the solution is very simple - just get rid of that feedback node. You don't need anyway - the outer iteration index terminal can be directly used.
 
I have optimized your code a little (e.g. changed the representation of your variables so there is no need for additional type conversions which are represented through the tiny red dots), and attachted the resulting VI to this eMail.
 
HTH, and best regards,
Sebastian
 
 
0 Kudos
Message 2 of 2
(2,815 Views)