LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data range selection on a XY graph using cursor

Solved!
Go to solution

Hi Friends,

 

I would like to select a data range from a XY graph using cursor for further data processing. I tried to use property node's cursor position and cursor index, none of them worked, both pupped up an error 1055 , saying the possible reason is object reference invalid. Attached is my VI:

XY-graph_DataSelection.vi, which has first part to generate data and dynamically graph it, the second part is to select data range on a static graph.  

 

I found a related VI on this forum, also attached: PlotSelection.vi, which is very complicated.

 

I am wondering if there is a simpler way to make it work?

 

Thanks,

Gu 

 

I searched the forum and found  

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

Hi edmonton,

 

simple explanation: you cannot read non-existing cursors!

 

Simple solution: create two cursors for your 2nd graph…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,492 Views)

Hi GerdW,

 

Thank you for your suggestion. 

Following your suggestion, I changed a sample graph cursors vi found in the LabVIEW samples. The two cursors are in different styles, one free and one with a plot. I would like to use both free, so no one moves on a plot. I just need a X data range, X1 and X2 from each cursor. Could you please help with changing the property to turn cursor 2 into a free style? and I am also wondering if the left part of the graph having the group of plots  to be removed or hidden so that more space can be used for graph. 

 

Attached is my VI.

Thanks,

Gu

0 Kudos
Message 3 of 5
(2,445 Views)
Solution
Accepted by topic author edmonton

Hi edmonton,

 

Could you please help with changing the property to turn cursor 2 into a free style?

Delete the cursor. Create a new "free" cursor…

 

I am also wondering if the left part of the graph having the group of plots to be removed or hidden

Right-click the graph->Visible items->plot legend…

Best regards,
GerdW


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

Hi GerdW,

 

Thank you!

 

I found the way to configure the cursor property, which can be done by right click the graph\property\cursors, there is a drop down list for selecting cursor mode.

 

Gu

 

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