05-13-2015 10:29 AM - edited 05-13-2015 10:32 AM
Hi,
It is my first experience in LabView.
I did a program that communicate with Power Supply Device via RS232, sets an output voltage and read Voltage and Current in some sort of a program: Voltage goes up, staying in some value and then goes down. So there are many FOR LOOPS that sequensed one after another.
I need to make a 2 live Charts (one for current and second for voltage), and the only one solution that i could obtain is using local variables. BUT also I need to export my data to the file after the end of the program (with real elapsed time for collecting data points) and with the use of local variables I cannot do so. Maybe the Shift Register will work, but I could not make it work.
Thank you for help.
05-13-2015 10:52 AM
05-13-2015 11:06 AM - edited 05-13-2015 12:21 PM
You have multiple, deeply stacked, sequential loops. Way too complicated.
All you need is a simple state machine architecture using a single loop and a single instance of your charts. No local variables needed. Simplify!!! You could even graph both values on a single chart.
Look at your code. It is basically repeating the same thing with slighly different inputs. You only need to change the inputs based on state, and re-use the same IO function instances. Only one instance each needed.
(you also have some misguided autoindexing near the middle of your code. Bad!)