LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Live editing multiple graphs

Solved!
Go to solution

Thanks for your input!

Though it doesn't really work for me :s

0 Kudos
Message 11 of 18
(1,948 Views)

Update: I've managed to do what I want, except for one thing. When I move the cursors, it doesn't remember the part i've already deleted. Is there a possibility to select an area I want to delete, press a button, and then remembers that I deleted that bit? And then go on and select other pieces to delete?

I've build a separate VI to try this out.

Thanks

0 Kudos
Message 12 of 18
(1,944 Views)

Hi lvl,

 

whenever you want to "remember" something in a loop you should use a shift register.

I don't see any in your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 18
(1,943 Views)

Thanks, I understand. 

However, I only want it to remember when I press an ok button. Should I use a case structure to do this? I've tried the shift register but then it gives an error. How can I use shift register and still replace values with NaN?

0 Kudos
Message 14 of 18
(1,938 Views)
Solution
Accepted by topic author LvL1995

Hi LvL,

 

you don't want to change those small "Replace by NaN" FOR loops!

 

You want to keep the last settings for the next iteration of your WHILE loop so the shift register belongs to the WHILE loop! You need to determine which data you want to store and how to handle the "new" data (from the "calc mean" FOR loop on the left) together with your "old" data stored in the shift register!

THINK DATAFLOW!

 

Suggestions:

- the "calc mean" FOR loop belongs outside of the WHILE loop as it always calculates the very same data

- the first of those 3 subarrays belongs into the shift register, the other ones stay unchanged

Pseudocode:

IF ok-button THEN
  data := manipulated data
ELSE
  data := original data
ENDIF

 - property nodes are handled top-down, so you should set ActiveCursor first before reading its position!

 

Edit: see attachment for suggestions!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 18
(1,935 Views)

Ok, I've put them on the while loop. But now my graph doesn't plot. Should I put a new while loop around the two cases?

sorry, saw your edit just after I posted the reply. Will look into your suggestions first now! Thanks 🙂

0 Kudos
Message 16 of 18
(1,924 Views)

you update your graphs after the while-loop.

 

ask for the distance before entering the loop,

put the graphs inside the loop


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 17 of 18
(1,919 Views)

Thank you for your help! It works, and I've managed to make a subVI of it. Only thing left to do is figuring out how to make a undo button, but I've seen a lot of subjects about that on this forum.

LvL

0 Kudos
Message 18 of 18
(1,908 Views)