05-28-2011 02:22 AM
Hello everyone, I have made this vi which runs automatically at start up and I am able to use my start/stop butoon to control this vi. Now I want to clear vi graph and table even when sequence structure is not executing like the start/stop button. And I also want when I run program both the graph and table should be cleared. I have tried many things but as I am new to labview I am unable to do it. Thanks in advance.
Solved! Go to Solution.
05-28-2011 03:18 AM
Instead of using "build xy graph express VI" accumulate the x and y data in a complex array contained in a shift register of the outer loop. Initialzie it with an empty array at program start and whenever you want to clear.
Also simplify!
05-28-2011 02:15 PM
hey thanks for replying but I have put sequence structure in order to use star button, so that I dont have to use that run button at all. And I am not getting what you trying to tell me, can you elaborate it a little bit , though I have used your time delay suggestion.
05-28-2011 02:20 PM
What is a star button? Do you mean the Start button? Why would a button need a sequence? All you need is the case structure, right?
05-28-2011 04:09 PM
OK, here's a quick refactor showing some ideas. I canot test because I don't have your instrument.
(Look, no seqence structures!!!)
05-30-2011 12:37 AM
Hi, I went to my lab today, the modified vi that you have given works great but it is having problem in some parts. It is not saving any data, one column of table is always zero and during sweep: source current sense voltage mode, it always gives some random data irrespective of the fact whatever control I feed. Thanks and Regards for helping.
05-30-2011 12:46 AM
What did you change? Is the raw data from the instrument correct?
My code only allows saving in idle mode. It is not complete.
05-30-2011 03:50 AM
I didnt changed anything, and I know your code just saves in the ideal mode. The code was not saving anything, (ie the file was blank), and the data table was only showing one column having data(the voltage one) and the other had data having only 0. And during the current as a source the instrument is using values other than control. But that I will solve myself, just help me with the data table, and saving problem. Thanks a lot for the help..
05-30-2011 11:23 AM
@gj;AKLDFJG wrote:
and the other had data having only 0.
You need to show more decimal digits. From the x-axis, you can see that the values are around 1E-6, so use a different format for the table.
You can replace the "number to decima string" with e.g. "number to exponential string" or change the precision (currently 3) to e.g. 8.
Same for the format for "write to spreadsheet file". Instead of "%.3f" use "%.08f". See if it makes a difference.
Also note that the column headers of the table need to be switched depending on the mode. Did you implement this already?
05-30-2011 01:39 PM
Hi, I did whatever you said, now the table is showing data, but the data is still not saved. I tried to use probe and that showed tha the shift register that were on the outer loop are not storing any data. I am attaching snapshot to make it more clear. And one thing more I can save this data in what kind of formats?