06-13-2018 02:53 PM
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.
Solved! Go to Solution.
06-13-2018 03:08 PM - edited 06-13-2018 03:10 PM
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?
06-13-2018 03:23 PM
If you use shiftregisters for your data you can update the table inside the loop, see attached .vi
06-13-2018 03:58 PM
@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!
06-18-2018 02:54 PM
Thank You got your kind help, it worked and now with your help my project is completed.