Jump to content
RnDMonkey

Suitable way to support a multi-channel user interface?

Recommended Posts

I see a lot of knowledgeable minds around here, so here's my challenge. I have a test system that will have, at the user interface level per channel, 3 inputs and 2 outputs that together encompass a simple test scenario. I would like that scheme repeated up to 10 times in a single application so you could watch a bank of units under test, allowing both scripted or manual manipulation of inputs; plus viewing and logging of the outputs.

 

Here is an example of what I think I want the user to interact with:

post-43593-0-80584900-1454001373.png

 

I would like to associate each of these "subpanels" (not to be confused with actual subpanels - yet) with a LabVIEW class object that will handle the interface with hardware. All channels would be coordinated by a top-level VI (let's call it the Controller) that aggregates the channels and provides the ability to parse script files to press buttons and stuff. Here's where I'm having trouble, conceptually. One solution seems to be to spin off a new asynchronous call-and-collect VI (in the form of the pictured panel as a brat VI) that has the brat throw its control references into a queue for the Controller to catch and store for later access. The brat would receive stuff like a user stop event and the hardware session's class object when first called. I would then create an array a grid of 10 Sub Panel controls on the Controller's front panel and place each brat VI into its own Sub Panel like a facade.

 

The core of the hardware IO would be built into the brat VI (operating on the class objects), with the Controller pulling the strings and catching outputs and user interaction through dynamically registered events and property nodes operating on the brat's references. This all seems like it should all be workable and isn't fundamentally new to me.

 

Does this seem reasonable?

 

Another - much less (in)formed - concept I had was to avoid the ACBR brat structure entirely and implement this "subpanel" as an XControl that I can treat like a regular control on my Controller's front panel. I think of XControls because I can't have a cluster with both inputs and ouputs (unless I access the indicators with property nodes and fake it, I think), though I am actually only assuming that XControls allow both at once, or the equivalent behavior. In this scenario, the controller would retain an array of my hardware session's class objects and index them associated with each control. This way, the controller would invoke a hardware IO operation in a for loop to iterate across all devices. Similarly, when one of the XControls had a button clicked, the controller would see the value change event, figure out which one fired it, and do some function for only that associated hardware.

 

I've never implemented an XControl before - at all - so the first solution is going to be the easier one for me. Is there a good argument for going the XControl route over the asynchronous-brats-with-Sub-Panel route?

 

Thank you for your inputs, and sorry for the wall of text!

Share this post


Link to post
Share on other sites

You don’t need to you Async Call By Ref, you know, or (yikes) XControls.  A standard synchronous Call-by-ref is fine.  The simplest is just to have your controls connected to a hidden output-terminal indicators and have the main program poll them for changes at a few Hz.  Alternately you just have references to your controls on the block diagram connected to output indicators.  Then the main program calls the subVIs once on initialization to get the references and uses dynamic event registration and property nodes to control them (tip: make sure the subVIs front panels are loaded before registering).

Share this post


Link to post
Share on other sites

I had to chew on what you said for a while before really visualizing what you were saying. I decided to go with ACBR for a few reasons:

1. I'd like each front panel to be controllable independently

2. I don't know how many nodes will be run, up to 10 total

3. I want to be able to pick up and drop nodes without affecting others

 

I know that these issues are surmountable using a synchronous call model, but I feel like it's just easier to mount and unmount them asynchronously and have the nodes shut down if they see that they are no longer in their sub panels.

Share this post


Link to post
Share on other sites

I had to chew on what you said for a while before really visualizing what you were saying. I decided to go with ACBR for a few reasons:

1. I'd like each front panel to be controllable independently

2. I don't know how many nodes will be run, up to 10 total

3. I want to be able to pick up and drop nodes without affecting others

 

I know that these issues are surmountable using a synchronous call model, but I feel like it's just easier to mount and unmount them asynchronously and have the nodes shut down if they see that they are no longer in their sub panels.

 

I know of quite a few people that use the MDI toolkit for things like this. If your VI are self contained then it is incredibly easy just launching panels. I don't normally advocate MDI for devices due to possible resource conflicts but it may be worth looking at for your use case.

Share this post


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 AInvisibleNinja
      I'm trying to run a VI using the Call by Reference function, then embedded it into a subpanel in my Main.VI. Once the VI is embedded, I can't use it in the subpanel. It's like everything is blocked and it won't let me interact with any of it. If I use an invoke node and call the Run VI method, this isn't an issue. Unfortunately, this is part of a much bigger application that use Call by Reference functions, so I can't replace those calls.
       
      I have attach image snippets showing my code. Does anyone have any suggestions why this might be happening or a work-around to fix it? Thank you in advance!


    • By MikaelH
      I have an issue with a Sub Panel in a generic GUI VI we use as part of our company's OO based application framework.
      Most often the SubPanel behaves like it should.
      But sometimes after the application has stopped, the VI that was last inserted into the SubPanel, is still inserted according to LV.
      When this happens (and I start the application again) I can't insert that VI into the SubPanel again, I can insert other VIs, but if I try to insert the last Inserted VI, LV says:
      Error 1145: Cannot open VI because it is already in a subpanel control.
      If I try to open the VI's FP, LV opens the FP of the GUI VI that has the SubPanel (just like it should if it was inserted), but the SubPanel is Empty.
      And LV behaves the same, even after the SW stopped?!?!
      When LV stops all SubPanels should be emptied (i.e.all inserted VIs should be thrown out.)
       
      Has anybody else experienced this strange behavior?
      Our framework is doing something that LV doesn't like of, but I haven't figured it out yet.
      We do see one strange behavior as well.
      We start up the framework with a VI that kicks off some processes (just like you do in Actor Framework), and when the framework starts up and starts inserting stuff in the SubPanels, the Top VI becomes broken, but it's still running.
      Have you guys seen this as well?

       
       
    • By Christian Butcher
      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'.
       


×
×
  • Create New...

Important Information

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