LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert new data after every iteration.

Solved!
Go to solution

Hello, 

 

I am trying to read values off a DMM with a Function Generator and plot them in a table after every iteration. The current vi is giving the values after the for loop finishes all iterations. 

 

You can put a build array after the shift register, but once again the table would be outside the loop.

 

0 Kudos
Message 1 of 5
(1,965 Views)

If you want the table to be updated with every iteration, the terminal belongs inside the loop.

 

I would recommend to learn about proper code architecture and state machines. Tables are just 2D array of string. No need for fancy express VIs and opaque dynamic data operations. What determines your loop timing? Is R1 really allowed to be changed at random times during the inner FOR loop?

0 Kudos
Message 2 of 5
(1,957 Views)

If you use shiftregisters for your data you can update the table inside the loop, see attached .vi

0 Kudos
Message 3 of 5
(1,950 Views)
Solution
Accepted by topic author Jibica

@sture wrote:

If you use shiftregisters for your data you can update the table inside the loop, see attached .vi


No, since the "build table" express VI is configured not to clear data, shift registers are not needed. (After 20 iterations, your code produces a table with 210 rows, mostly duplicates!)

 

A shift register (or feedback node) is needed if we eliminate the dynamic data and express VI. The attached VI shows the two possibilities. The lower code is highly preferred!

 

Tablebuilding.png

 

Message 4 of 5
(1,934 Views)

Thank You got your kind help, it worked and now with your help my project is completed. 

0 Kudos
Message 5 of 5
(1,880 Views)