LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving annotation on graph fire the 'Cursor Move' event?

Hello,

 

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.

 

Thanks!

 

Vincent

0 Kudos
Message 1 of 5
(1,755 Views)
Hey, you are correct.  Moving the cursor does fire that event.  There is no work around per-se aside from not using that event for anything.  There are three other cusor events you could try using.  Could you describe your application a little more so I can figure out exaclty what is causing the conflict?
Chris Bakker
SET Americas
CEO

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

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.

 

Thanks!

 

Vincent

0 Kudos
Message 3 of 5
(1,726 Views)

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.

Chris Bakker
SET Americas
CEO

0 Kudos
Message 4 of 5
(1,703 Views)

Something like that will do the job...

 

Thanks!

0 Kudos
Message 5 of 5
(1,689 Views)