From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Keeping the Cursor of XY graph in a fixed position

Hello,

 

I'm trying to filter the data between 2 cursors for analysis and saving to file(which I'm able to do). The data in the graph will be cleared every 30 seconds. I want to keep the 2 cursors in a position in the graph such that even when the graph is getting cleared, the position of the cursor should be visible to the user. ie, I have 20 data points written to the graph for 1st cycle. In the 2nd cycle(exactly after 30 seconds), the next cycle data will be plotted in the graph before clearing the graph. But, in that case the position of the cursors will not be visible in the graph since the position of cursors will be with respect to the 1st cycle. What I'm trying to achieve is, even when the graph data is getting cleared, the position of the cursors should be exactly in same position for next cycle, it should not stay in same position with respect to the previous cycle. Can anyone please suggest me a method for this?

0 Kudos
Message 1 of 5
(2,143 Views)

The no. of data points can be different for each cycle.

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

Hi Rishi,

 

set the cursor position to the correct point after updating the plot.

Use property nodes to do so…

Best regards,
GerdW


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

Before displaying, you know all data 🙂 so you can place your cursors at any position you want.

'Funny effects' migth be due to autoscaling...

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(2,120 Views)

Hi GerdW & Henrik,

 

Thanks for your responses. I have got a workaround for it. I changed the cursor type to single plot and changed the x-axis data type to relative time. So that, after the graph gets cleared for next cycle the X axis will start plotting from 0. Thus, the position of the cursors will be fixed for next cycle data as well. 

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