From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-16-2014 09:54 AM
Hello,
'Looping Table.vi" This VI generates random numbers and gets the real time to plot them into a table. After a certain amount of entries, say 10, the first entry gets deleted and so on...(like First in First out (FIFO)).
I would like the same concept but instead of a random number generator, i would like to control the input with a numeric slider and have the entries shown in an array, with after 10 entries the 1 first gets delted and the 11th entry gets inserted, like a queue.
Any help would be appreciated!
Solved! Go to Solution.
07-16-2014 09:57 AM
07-16-2014 12:53 PM
Hello Thuba25,
You can make use of Array size, Build array and Replace array subset functions to achieve this. Try to draw a flowchart before implementing code this will give you idea where to use which finction.
07-16-2014 03:26 PM
Hello Miraz,
Thank you for your tip! I have used what you suggested and come up with this new VI. However, my problem is that, if I move the slider out of the while loop ( to implement that external data is going into this sub while loop) then how can i do the same thign as before?
Moving the slider outside the loop will only register the same number over and over again, and will not update the new values.
07-16-2014 03:37 PM - edited 07-16-2014 03:38 PM
You need to learn dataflow.
If you acquire data externally, the acquisition needs to be inside the loop. Alternatively, the data can be read elsewhere and you could use a queue to read it in this loop.
You can right-click the slider to make it U8.
07-17-2014 12:06 PM
Hello Thuba25,
I could not see your VI because I have LabVIEW 2010 and not 2013, however to answer your question, you can move the slider outside the while loop and then use a queue structure to acquire the data from it.
I think the problem you are trying to solve does not require the queue structure, your code will become unnecessary complex.
Please give a little more try, I am sure you will reach to solution else the forum will provide solution.