LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

active cursor to select data for further processing

Solved!
Go to solution

I have included my data and partial vi with annotated text. Briefly, my input data is from a DEM so the row # represents distance in the x-dir, column # represents distance in the y-dir and the data is elevation. I would like to process the data sequentially one column at a time where I visually select the data I would like to keep for further processing. The position of the data is important, thus the selected range data needs to be put back into the same column and rows as it was in the original input data set. The rest of the column not within the selected range can be NaNs.

 

 

 

 

Download All
0 Kudos
Message 1 of 7
(3,406 Views)
Sorry here are the proper attachments.
Download All
0 Kudos
Message 2 of 7
(3,402 Views)

Hi Jammin,

 

Is there something specifically that's not working with your VI?  What behavior do you expect to see, and what are you actually seeing? 

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 3 of 7
(3,371 Views)

Here is a more recent version. I would like to be able to select data using the active cursor from each row of data. I would then like to place all this data back into an array in the same location it was originally in, and have all the values outside this range set to NaN. At this stage I am not able to select the data one row at a time, I would like to be able to use boolean controls to i) load xs graph, then stop to allow the range of data to be selected via active cursors and then ii) process the selection and move to the next row of data. The finished output would be of similar format to input file, but the non NaN data would only be for the ranges I have selected.

 

Currently the boolean controls do not work and I have not been able to reinsert the data. If I were to do this in matlab I would use for loops, however, I would not be able to visually select the data as you can in labview. I really like the visual aspect of labview, it is just taking me awhile to wrap my head around it, especially the row and column protocols (it seem I am always transposing). 

 

 

0 Kudos
Message 4 of 7
(3,364 Views)

Latest version still having issues with pausing the process, I am sure it is pretty straight forward but have yet to get it. At this point would just like to be able to:

 

1) plot one column of data in a XY graph - can do it now but can't pause loop                 

2) pause while I select cursor positions, would like it to stop automatically after each iterations and wait until I manual push a continue button - 

3) save the positions along with column number in a text file - think this is wired right using iteration of while loop as column number

4) repeat for remainig columns until finished

 

Also included small subset of original data.

 

 

Download All
0 Kudos
Message 5 of 7
(3,341 Views)
Solution
Accepted by topic author Jammin

1) It seems to pause just fine when I run it.  What happens when you select the pause button?

2) This can be accomplished best by using a shift register for the column number instead of the iteration.  You then use a continue button which triggers the shift register to increment.  One thing to make sure of is that the continue button has the Latch When Released mechanical action (right click then Mechanical Action).  Here's an example of this: 

 

IncrementExample1.png  IncrementExample2.png

 

3) For a shift register to hold the values that you need to write to the file, you'll need to make sure that it is always passing the array you're adding to into the right side of the shift register.  You'll also want to use Build Array instead of insert into array.  Here's an example:

 

ShiftRegister1.png  ShiftRegister2.png

 

4) This should happen automatically after the previous steps. 

Jared S.
Applications Engineering
National Instruments
Message 6 of 7
(3,322 Views)

The pause button did work, but couldn't hit it fast enough to stop the loop. Thank you very much, your solution works perfectly.

 

 

dave

0 Kudos
Message 7 of 7
(3,316 Views)