LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

different cursors associated with different plots

Hi

I am failing to create cursors for different plots in an XY Graph. I have used the property "Plot" in the "Cursors list" array, but this doesn't seem to affect what I am trying to do.

I would like that cursors associated with a Plot, to be hidden when the plot is not visible.

I am attached a small vi that may explain better what I am trying to do. When Plot_1 is hidden, the cursor (that I am thinking belongs to Plot 1) is still visible. 

Please point me to the right direction

Thanks

 

0 Kudos
Message 1 of 10
(561 Views)

Something like this may be:

Cursors.png

 

Cursors.gif

?

Message 2 of 10
(554 Views)

hi thanks

that might be a solution indeed (although it involves some more work... I thought there might be a simpler way...)

thanks anyway

0 Kudos
Message 3 of 10
(544 Views)

@nitad54449 wrote:

hi thanks

that might be a solution indeed (although it involves some more work... I thought there might be a simpler way...)

thanks anyway


You can simplify this a little bit by using Cursor's  Visibility Property (if this can be set programmatically), but not much, you still need a loop and can do this in Run-Time only, I don't know any way to achieve this "statically" in development environment, no any link between "visibilities"

Screenshot 2024-05-02 16.01.28.png

 

This is how software engineering is working - for certain functionality we need to create some code... 

0 Kudos
Message 4 of 10
(528 Views)

Hi

Actually I am trying to do this at run time. I was thinking that the property "Plot" from the array CursorList, will associate a cursor with the respective "plot". But it isn"t or I don't know how to use. I tried also ActivePlot and cursor list but to no avail.

thanks

0 Kudos
Message 5 of 10
(522 Views)

Another way to do it, by property node and Cursors Index:

PinguX_0-1714665086109.png

 

Message 6 of 10
(498 Views)

Hi

Thanks, I will look into it. the main problem I have (I have tried the solution proposed by Andrey) is that my plots can change, i.e. what is now a Plot_0, if the user selects another plot, the cursors for Plot_0 are "moved" to the new plot, which may have a different range. So, I am thiniking to combine the method proosed earlier, I can associate the cursors list for a plot with its name (or rather the name of the dataset that produced the Plot_0).. But it's kind of messy.... (I was thinking naively that cursor can be associated with a plot, even if the name is changed, it has a reference number ...).

Thanks

0 Kudos
Message 7 of 10
(489 Views)

Are you talking about this ?

PinguX_0-1714670172863.png

 

Associating a cursor to a plot (by index).

0 Kudos
Message 8 of 10
(476 Views)

hu

yes, at runtime I don't know how to do it. Take a look at my vi

N

0 Kudos
Message 9 of 10
(454 Views)

@nitad54449 wrote:

hu

yes, at runtime I don't know how to do it. Take a look at my vi

N


If you need to assotiate cursor with plot in runtime, then use Cursor Mode and Plot together:

plots.gif

Cursor Mode = 1 will enable assotiation cursor with Plot, and then next one is Plot which will be assotiated.

0 Kudos
Message 10 of 10
(449 Views)