LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create events on waveform-cursors?

Solved!
Go to solution

Hello,

i have a waveform-graph with the cursors-field. In the cursors-field i can add new cursors or activate one of the existing cursors by clicking on its name.

In the VI runs an event-structure in a loop.

Now i have two questions on this:

 

1. Is there an event that i can catch when "a new cursor is added"? ( Inside of the event there should then the cursor automatically be centered.)

 

2. Is there an event that i can catch when "a cursor is activated / active cursor changed"? (inside if the event i want then to switch the cursor symbol to "cross" for moving the cursor if it was before on symbol zoom.)

 

Thanks for the help

0 Kudos
Message 1 of 10
(2,945 Views)

 

 

You should be able to get information and cursor events as well as set characteristics of the cursors by using a property node.

0 Kudos
Message 2 of 10
(2,918 Views)

Can someone tell me the name of the property that i should use?

I checked everything but can´t find this event.

 

Thanks

0 Kudos
Message 3 of 10
(2,903 Views)

Hi OnlyOne,

Ans 1) You can use "Cursor List" property node. When you will add new cursor, this list will be updated. Then you can use "Cursor position" property to place it at center.

Ans 2) You can use "Cursor grab" event. As shown in following image.CURSOR EVENT.JPG

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 4 of 10
(2,891 Views)

Hi,

I think there is no specific event to detect the cursor create/ delete event.

But you can use   "Cursor move/ cursor grab" event in the event structre to handle the active cursor change..

 

pls try with attched vi(LV2009), you will get some idea to handle the cursor create/ delete event.

 

0 Kudos
Message 5 of 10
(2,889 Views)

Thanks to all for the ideas:

Currently i´m looking for a "Bring-to-Center"-property that i can execute inside the event.

Does this exist?

 

@G K: Thanks for the vi, but i only have LV 8.5 😞

Can you resave it in my version? Thx

0 Kudos
Message 6 of 10
(2,841 Views)

Hi OnlyOne,

If you right click on cursor on cursor palette you can select option to "Bring to center".

I did not find same option in property node. Any ways pragmatically you can bring cursor to center.

If you plot 100 points you can pick middle point and using " Cursor position" you can get it to center position.

I hope it will help.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 7 of 10
(2,835 Views)
Solution
Accepted by topic author OnlyOne

Hi OnlyOne,

attached is the vi saved in LV8.5

 


 

Currently i´m looking for a "Bring-to-Center"-property that i can execute inside the event.

Does this exist?

 


This property is not available i guess..but you can achieve by setting the "cursor postion" property if you know the visible graph length (x, y value)

 

Message 8 of 10
(2,829 Views)

There is no need to define or limit the graph size unless the user wants too. You can get the visible graph size by using a property node to get the X and Y scale range then calculate the center. The results from that calculation can then be used in the program to set the cursor in the center of the graph when the cursor is created.

0 Kudos
Message 9 of 10
(2,814 Views)

Yes, thats how i did it.

Thanks for the help

0 Kudos
Message 10 of 10
(2,810 Views)