01-13-2011 07:37 AM - edited 01-13-2011 07:39 AM
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
Solved! Go to Solution.
01-13-2011 08:33 PM
You should be able to get information and cursor events as well as set characteristics of the cursors by using a property node.
01-14-2011 01:36 AM
Can someone tell me the name of the property that i should use?
I checked everything but can´t find this event.
Thanks
01-14-2011 02:35 AM
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.
01-14-2011 02:39 AM
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.
01-17-2011 06:51 AM - edited 01-17-2011 06:51 AM
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
01-17-2011 07:06 AM
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.
01-17-2011 07:40 AM
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)
01-17-2011 09:59 AM
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.
01-17-2011 10:18 AM
Yes, thats how i did it.
Thanks for the help