I have a graph with some cursor on it and I want to allow the user to create and move annotation on the graph. It seems that moving these annotations will cause the 'Cursor Move Event' to be fire.
This is causing me some problems... Does anyone have heard of that? Any workaround?
I'm using LabVIEW 8.6 on Windows XP.
Hello 'Bakk Diagram',
I have 3-4 graph indicators on the same time base. I would like to move the cursors on every graph if the user moves a cursor on any of them (these graphs are same time base). My first idea was to use stacked plots but you can't use annotations with them.
I used the 'Cursor Move' event to update de cursor on every graph.
The easiest solution is probably to use the 'Cursor Release' event. The front panel will not as nice but it should do the trick...
If you have a brighter idea, tell me. If not, I'll do with it.
I see. If you use the cursor release event, the changes will only update after a move. If you want continuous updating even as it is being moved try this.
Use the Event Producer-Consumer structure located in the templates in LabVIEW (File->New).
This will allow you to run the code from a 'Cursor Grab" Event in parallel with the master loop which then waits for a'Cursor Release' event.
Make your 'Cursor Grab' code a while loop that makes all the cursor location values the same with a rate of about 30hz (human eye detection limit), and keeps running until a boolean local variable turns FALSE. That variable will be you flag from a 'Cursor Release' event.
When the 'Cursor release' event does fire, dont pass it on to the queue in the master loop. Instead, simply set that local boolean variable to FALSE which will stop your 'Cursor Grab' code on the next iteration.