08-31-2016 01:59 PM
Hey everyone,
I'm fairly new to LabVIEW and attempting to design an executable to read measurements from an digital multimeter that takes measurements and builds them into an array that then transfers to an Excel document.
I've gotten the DMM up and running, I've gotten it to write to the file, but if I execute multiple times it tries to build the file using past results and the current test results.
How can I empty the system memory so that it starts fresh every time?
Right now I am using a loop which refreshes the digital measurements and uses buildarrays in order to compile all the results (shift registers to pull the arrays through). At the end of the code (stop button) they transfer to be compiled into tables.
Solved! Go to Solution.
08-31-2016 02:03 PM
Do you have an uninitialized shift register? If so, that is where your data is being retained. You could just initialize it with an empty array.
08-31-2016 03:15 PM
I think they are currently being initialized by the build array function. How would I go about initializing it on each execution with an empty array instead?
Hopefully I've attached the instrument to this post (so if I'm stating something wrong in the post it'll be in there). Thank you for the help!
08-31-2016 03:27 PM
Hi anthony,
I attached the VI to fix the shift register issue. When you run a vi with shift registers the register will stay in memory until you close it. So when you run your first iteration it will start from default, then stop. When you restart this without closing it the shift register will mantain the values from the previous run. So simply at a constant outside the loop so you reinitialize the register every run.
08-31-2016 03:33 PM
08-31-2016 03:36 PM
I marked the wrong one as a solution first but wow thank you for helping! Works perfectly and it's great to see that for the future! (Also it looks so much nicer now thank you)
08-31-2016 03:40 PM