From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto Managing Multiple Cursor Groups

Fisrt Post!

 

I'm looking for a clean method to managing multiple cursor groups in a waveform plot(I've yet to find it!). The grouping of cursors consists of 2 main cursors which define some event in the data set. Within the selection there are 2 "sub" cursors which will define 3 regions for the event (for example: the events startup, running, and shutdown regions). To complicate things a bit more, within a single data set there could be more then one event which means I'll need to keep track of multiple groups of cursors. The image is a mockup example for a single event.

 

Each individual group of cursors should move as a cursor band:

  • left main cursors moves the band but does not change the size of the band
  • right main cursors only adjusts size of band.
  • sub cursors should never be outside main cursors.
  • etc.

 

 

cursors.jpg

 

Has anyone had to deal with managing multiple groups of cursors and what was your solution? Thanks for any insight.

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

It's not what might be considered "clean", but I believe Property Nodes and math are the only way.

 

More specifically: in an event structure, handle the Cursor Move event. One of the items in the event is CursIdx. Based on which cursor is moved, change the position of the other cursor(s). If realtime update is too slow, use a shift register and the Cursor Grab and Release events. Another nice thing about the event structure is that you can handle key presses to move the cursors, too. Arrow keys, shift-arrow keys for more steps per key press...

0 Kudos
Message 2 of 5
(2,352 Views)

You need to create a subVI, which will execute based on the 'Events' generated on the Front Panel of main VI...!!

Pass the reference of the graph to this subVI and code as per the required functionality...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 3 of 5
(2,349 Views)

It seems to me there should be more inherent cursor functionality beyond a single array of cursors.

 

Based on both your advice this is want I've come up with. A class object to control band cursors with sub cursors within it. Short term it will provide the functionality I need but long term I think the "cleanest" solution will end up being an xcontrol object which provides the same functionality. The bulk of the work is obviously done in the move method of the class object. Still lots of room for improvement but it's a foundation to start from.

 i1.jpg

 

 

Download All
0 Kudos
Message 4 of 5
(2,328 Views)

Sounds like you already know, but check the xcontrol's graphing performance before committing.

As for built-in functionality - I feel this is one of those issues that's just barely on the "do nothing" side of being able to satisfy everyone. But a subset could arguably be included. Lots of other work to be done with graph UI, first.

0 Kudos
Message 5 of 5
(2,318 Views)