LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WANT TO CLEAR GRAPH, AND TABLE EVEN SEQUENCE STRUCTURE IS NOT RUNNING.

Solved!
Go to solution

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.

0 Kudos
Message 1 of 16
(2,852 Views)

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!

  • You don't need the sequence structure at all because dataflow determines the same execution order
  • Set the Start button to latch action and remove the local variable of it.
  • Eliminate the other local variables, instead brach the wires. (e.g. Sweep Function (0:Volts-Curr), Sweep Points (10), Type of Sweep Spacing, etc)
  • Place a small wait in the big FALSE case. There is no need to check the start button millions of times per second. You fingers are not that fast. 😄
0 Kudos
Message 2 of 16
(2,848 Views)

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.

0 Kudos
Message 3 of 16
(2,842 Views)

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?

0 Kudos
Message 4 of 16
(2,839 Views)

OK, here's a quick refactor showing some ideas. I canot test because I don't have your instrument.

 

(Look, no seqence structures!!!)

 

 

Message 5 of 16
(2,831 Views)

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.

0 Kudos
Message 6 of 16
(2,812 Views)

What did you change? Is the raw data from the instrument correct?

 

My code only allows saving in idle mode. It is not complete.

0 Kudos
Message 7 of 16
(2,808 Views)

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..

Download All
0 Kudos
Message 8 of 16
(2,797 Views)

@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? 

0 Kudos
Message 9 of 16
(2,777 Views)

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?

0 Kudos
Message 10 of 16
(2,767 Views)