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: 

How to block points of an XYGraph

Solved!
Go to solution

Hi, I am doing a labview program for a project, I use an XYGraph with options to add points, move existing ones and delete them.

I have been trying to limit the elimination of points for a few hours, because I want the start and end points(in this case 0 and 11) cannot be eliminated and remain fixed. At the moment I have not found a way to do it, if someone can help me, I would greatly appreciate it.

I attached my VI.

0 Kudos
Message 1 of 7
(2,374 Views)

Hi Aleix_C!

 

What do you mean with limit the elimintation of the points?

 

If what you want to do is nos allow the elimination of the first and last points, I would extract them, remove the relected points based on the configuration, and add the first and last points again.

 

(I can not download the code right now, but I would take a look if this does not resolve your doubt.)

0 Kudos
Message 2 of 7
(2,332 Views)
Solution
Accepted by topic author Aleix_C

Just check the range

 

move.png

Message 3 of 7
(2,315 Views)

Hi Aleix,

 

I want the start and end points(in this case 0 and 11) cannot be eliminated and remain fixed. At the moment I have not found a way to do it

IF cursorindex > 0 OR cursorindex < 11 THEN
   delete current point
ENDIF

A simple case structure might help…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(2,310 Views)

Hi!

If you remove a point from Y array, you should remove it aswell from X array. I should download the code to completly understand the whole code.

Message 5 of 7
(2,305 Views)

Oh yeah! It works, thank you so much!

0 Kudos
Message 6 of 7
(2,244 Views)

Thank you abarrenetxea and GerdW for your help too, nice comunity!


0 Kudos
Message 7 of 7
(2,237 Views)