Jump to content

Plot Selection Overlay for XYGraph - Do I want an XControl?


Recommended Posts

I'm writing some LabVIEW software to store and display data from a variety of data sources, mostly through an NI DAQ board.

I'm displaying the data (stored in an SQLite database) on an XYGraph.

I would like to have a toggle-able, probably semi-transparent box listing each of the plots on the graph, with the option to turn the plots on/off by clicking, along with some grouping of similar plots (all temperature measurements, or all measurements from experiment #5, etc).

The Bloomy post at http://www.ni.com/newsletter/51918/en/ gives me semi-transparent panels pretty easily (in fact, this can conceivably be tri-state, since I have on, off and invisible :D)

I've already programmed a simple multi-column listbox for something else in this project that switches symbols and handles double-click, mouse up/down, etc, so I could maybe use a modified version of that to hold my plots.

I have never successfully used an XControl for anything, but when I come to problems involving collections of strange custom controls, I always think, is this what an XControl is for?

So, do I need an XControl here? Or will I just be diving into another rabbit-hole leading to yet another unsuccessful XControl attempt? If so, what should I be using instead?

In case it matters, the bulk of the project uses NI's Actor Framework to handle separate sections, and the graph is inside a subpanel, inside another subpanel.

Some images of current pieces. The parent holds the scrollbar, and my current no-op (except show/hide on the little menu button bottom left) overlay (not at all transparent). The child holds the actual graph, and an ugly global variable mean (I needed it quickly for a colleague's use...). The child is embedded in a subpanel of the parent (above the scrollbar) and the parent is embedded in a subpanel of the MainUI's 'Actor Core.vi'.

 

parentGraphAC.png

childGraphAC.png

Link to post
Share on other sites

The way I see it, XControls are for cases where you want to create a custom interactive "widget", and you plan to embed multiple copies of this widget in other front panels. (Unfortunately, it doesn't always work well, but that's a different topic.) So, do you want multiple copies of your custom box? If you don't, then you definitely don't need an XControl. If you do, then I'd consider it.

Also, does it have to be an overlaid box? Would you consider a separate pop-up dialog altogether?

Link to post
Share on other sites

Probably just one per graph, so one. Guess that's XControls out?

I'm pretty sure I could make the things I want nicely inside a class, but don't know how I'd then run it. I saw in what I expected to be an unrelated thread here mention of transparent VIs, and looking at those makes me tentatively hopeful, but will take a bit more thinking to work out if that's what I want (especially given communication between the two VIs needed).

A separate popup is I suppose possible, since then I can use the VI appearance or property nodes or whatever to have it appear (and a button to end the VI to make it disappear), and that would allow reading of the 'results', I guess. But I was hoping to use it as a 'legend' of sorts, pop it up when I wanted to check which colour line was which result, that kind of thing.

If I use a modal popup, then my graph presumably won't update (?) and if I have the VI run asynchronously with call-and-collect, I'm probably adding a few different types of execution (Actor, reentrant subVI, maybe notifier/queue into async subVI, results from async subVI), which seems likely to cause problems (especially because I'm bound to mess it up the first N times).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By ensegre
      Is anyone aware of a limitation on what the smallest possible FP size is? On LV 2017, I am under the impression that this is 116x41 on one windows machine, and 1x1 on a linux. Known issue, WM, or deserves a CAR?
      The reason I'm asking: I'm fiddling with the cosmetics of an Xcontrol. I would have nothing against a larger transparent border, but when I webpublish the big FP using it, the large transparent border turns grey on the snap png.
      ETA:, ah, https://forums.ni.com/t5/LabVIEW/How-to-set-front-panel-size-to-be-same-as-one-led/td-p/1565524
      ETA2: ok, tried the snippet of that thread and get either no reduction or eloquent "Error 1 occurred at Property Node (arg 1) - Command requires GPIB Controller to be Controller-In-Charge" for tighter sizes.
       
    • By Benoit
      Hi there!
      I am trying to find a workaround the the missing possibility to set key focus in an array at a specific location by using X-Control.
      I am struggling at the point that i manage the key focus in my X-Control to work, but I cannot set to other control. it always stay at the same one...
      Is anyone manage to enable key focus on specific element of a X-Control?
       
      Benoit
    • By Muthuraman
      Hi,
       
      I used xcontrol many years back. I am trying to refresh my knowledge. I tried with a simple keypad . Button 1 button 2 and button 3. Data is string.
      When Button 1 is pressed string goes 1. Button 2 - string goes 2, etc.
      For button 1, 2, 3 value change events, i have modified the data and so i have made the action cluster -> Data changed as True. But it looks like it is not working.
      What basics am i missing. Please help.
       
      Regards,
      Muthuraman S
      Xcontrol-Keypad.rar
    • By The Q
      The QControl Toolkit by Q Software Innovations is an object-oriented and extensible alternative to XControls. Use the QControl Toolkit framework and the QControl Creation Wizard to create QControl Classes and receive the benefits of XControls without the headaches. Take advantage of easy UI logic code reuse. Encapsulate and decouple the UI logic away from the business logic of the main application and from the UI skin. Use wherever the VI Server and LabVIEW object-oriented programming are allowed. Easily extend the capabilities of current LabVIEW controls through access to all properties available at run time. And easily use the toolkit with more complex frameworks like the Actor Framework or other plugin architectures where LabVIEW libraries and packed project libraries are used and where XControls can behave unpredictably. 

      Check it out now on the NI Tools Network here.
      I also started a thread on the NI Community: UI Interest Group page, here.
    • By Benoit
      Name: Calendar XControl
      Submitter: Benoit
      Submitted: 06 Jan 2016
      Category: *Uncertified*
      LabVIEW Version: 2011License Type: BSD (Most common)



      This XControl allow you to have a nice calendar as a control. Any selection of the date is highlighted in light blue. The supported language are English and French acessible trough the property.
       
      Ce XControl vous permet d'avoir un beau calendrier comme control. Toute sélection de date et mis en évidence par une couleur bleur clair. Ce XControl supporte le Français et l'anglais par l'intermédiaire des propriétés.

      Click here to download this file
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.