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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help debug

OK, so I think I've got something that will do what I want, but it seems to have errors.   Any help would be appreciated.

Let me just state what the program should do.

1) Takes input of a (3 column) spreadsheet data file (.txt) Example file is attached (sample2.txt)
2) Makes 3 plots... two mini plots for inspection of Column 1 (y) vs. Column 2 (x), Column 1 (y) vs. Column 3 (x).
  The third larger plot should be one of the other two graphs selectable by the switch (simply replotted, larger and with cursors).
3) With that large plot, you should be able to move the two cursors to select a range of data.
4) The data in that range will be deleted when you press the button, leaving a smaller sub-array of data.
5) This deletion should be repeatable any number of desired times, while every time leaving a smaller sub-array of the original data set.
6) After every deletion, the graphs should replot the new sub-array of data.
7) After you're satisfied with the data, you can save the new smaller sub-array into a similar spreadsheet file.

OK, so I have two versions, one "compiles" and the other doesn't.  The one that did "compile" (grapheditorMOD.vi) seems to have a problem, where it will almost do what I want, but then the data reverts to the original array of values.  I figured this was a problem with the nesting of the while, and case structures, so I tried swapping them to get the other version (grapheditorTES.vi).  That seems to give an error when passing the arrays between the structures. 

ANY thoughts would help, and be much appreciated.

Message Edited by gatordan82 on 06-15-2006 02:49 PM

Download All
0 Kudos
Message 1 of 5
(2,473 Views)

can you attach examples of a data file. Doesn't have to be actual data but something correctly structure with realistic values.

 

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 5
(2,462 Views)

Hi gatordan82,

At first I don’t see any differences between the Vis. ? Smiley Sad

Then, you always cut on the original data, read from the file. If you want to keep the parts cutted, you should pass the data (the arrays) through shift registers to the while loop. Btw, the shift registers in the for- loop are unnecessary since the loop is executed only once; but they don’t affect the algorithm.

To pass the array into Shift registers, there is a very nice feature (I hope this is available in 7.0 too, I only have 7.1) to replace the input terminal of the while loop with a shift register:

Right- click on the input- terminal and choose “replace with shift register”, then follow the steps shown below. Very cool!



And the third thing I noticed was, all three “delete from array”- nodes in the for- loop get the same index- and length values, you only have to calculate them once.

I hope, this brings you closer to your solution,

Greets, Dave

 

Message Edited by daveTW on 06-16-2006 02:30 AM

Greets, Dave
0 Kudos
Message 3 of 5
(2,452 Views)
Dave is right, you need shift registers on the while loop to have the vi working. Moreover, you may get rid of the unnecessary for loop; also, you don't need to get the position of the cursors three times: just one will do the job.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 5
(2,442 Views)
thanks for the help, I've got it sorted out now.
0 Kudos
Message 5 of 5
(2,429 Views)