LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Developing a custom indicator

Solved!
Go to solution

I recently developed an app centered around an intensity graph with extended features for improved efficiency. The code is event structure listening mostly to keyboard shortcuts inside while loop. There are two functionalities that I use the most:

  • Keyboard shortcuts for cursor management: H, V, X for adding custom horizontal, vertical and cross cursor. Clicking near a cursor selects the closest one. In a text control, I can edit the selected cursor label, or I can delete the cursor by pressing delete.
  • Overlay text indicator which moves with the mouse pointer, in which X,Y,Z coordinates are written on mouse move. The indicator disappears when mouse is inactive or outside the graph and can be disabled.

As time passed by I realized I could utilize this same graph in other applications. I could pack the graph handling loop in a subVI, but still, it is just a subVI - I must put it in the code, link the graph reference to it and somehow stop the loop at the end of execution (global variable or something).

 

Is there any way of incorporating this probe deeper inside the LabVIEW ecosystem? I would like to place the graph indicator to the front panel and have:

  • the overlay text indicator created and linked to the plot automatically,
  • the graph handling code fully separated from the other code (it gets stopped when the other code stops),
  • have the option to change the cursor label by right-click > Change cursor label, resulting in string input popup (which I believe could be done somehow with child class of graph class).

I would appreciate at least some tutorials, or a code/project that does something similar, I just don't know what to search for. 

 

Thanks!

0 Kudos
Message 1 of 3
(1,187 Views)
Solution
Accepted by topic author VitSlaby

What you would need to look at is an X-control. X-controls package actual VI code with the control/indicator. However, X-controls can be a bit tricky.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 3
(1,157 Views)

Another option might be a QControl: https://labviewwiki.org/wiki/QControl


___________________
Try to take over the world!
Message 3 of 3
(1,108 Views)