LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reusing custom indicator with value-dependent property nodes logic

Hi to you all, LabView Pros! 

 

Well, I need to make some UI for voltmeters and ammeters. And they have to be analogue + digital. And they have to go from negative to positive values. And yup, of coure we don't have just a magic slider that fils itself from zero to negative, or from zero to positive. Nope. That would be too easy. We don't like it to be easy here, in labview, don't we? We have like 10 diferent slide-something indicators, but none of them work like this. Instead we have to use some walkarounds like that: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kJndSAE&l=pl-PL

 

But it's  fine. It's labview after all 🙂 

 

And now, I have to display this metter in the appended VI in a few places in my program. Can I make some kind of subvi or custom control from it, and just reuse it as a 1 block with all its logic yus doing its thing behind a screen? Or do I have to make subvi of blockdiagram with 2 inputs as references to digital displays and 1 as value, and output as cluster of two DBLs, and then save the indicator as custom indicator and link its references to inputs of subvi every time i use it in my program? 

 

Thank's for any advices! 

Dominik

 

P. S.

Of course Loop in the VI is only for sake of life-time demonstration. 

0 Kudos
Message 1 of 3
(127 Views)

As far I use something like solution in attachment. Digital+analogue_meter_indicator.vi is subvi for Demo_of_walk_around.vi. 

 

Is there any better way to do this?

Download All
0 Kudos
Message 2 of 3
(120 Views)

Hi Dominik,

 


@Dominik.Bejma wrote:

And now, I have to display this metter in the appended VI in a few places in my program. Can I make some kind of subvi or custom control from it, and just reuse it as a 1 block with all its logic yus doing its thing behind a screen? Or do I have to make subvi of blockdiagram with 2 inputs as references to digital displays and 1 as value, and output as cluster of two DBLs, and then save the indicator as custom indicator and link its references to inputs of subvi every time i use it in my program? 


I'm not able to look at your VI due to its LabVIEW version. (I prefer LV2019.)

 

From what you write I guess you could package your code into a XControl. LabVIEW brings them to create fp elements with their embedded logic. They are a little bit tricky to handle (and they don't support to be used as array elements), but you will find an example in LabVIEW in the File->New… dialog!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(79 Views)