NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CyGa

Re-write LabVIEW code for Full UI and Simple UI

Often working with Full Featured UI and Simple UI codes to create custom interfaces for TS, I noticed that the versions shipped with LV2012 are full of deprecated functions.

Also, most of their implementation go against good LV coding rules.

 

Re-writing them could be a great idea !

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
15 Comments
Mr._Jim
Active Participant

Hey CyGa,

 

Hmm... I was looking at the TS 2017 version of the Full Featured UI when I posted that...  I opened up TS 2014 SP1 to do a quick comparison, and you're right - some things have definitely improved. (Foot in mouth on the "layer of dust" comment, but only partially. ; )

 

Looking at the TS 2017 full featured UI, I specifically observe:

  • Five instances of the deprecated FP.Open property
  • VKey translation for versions of LabVIEW prior to LabVIEW 8.0 (how nostalgic!)
  • TSUISupport (vi.lib): non-standard connector panes on 30 out of a total of 48 VIs. (Forgiving the two-terminal ones, etc.)
  • TSUISupport: Missing context help documentation for ten VIs
  • _TSUISupport.llb\TestStand - Cleanup Menus.vi refers to an "_oldvers.llb" call for conversion from old LabVIEW versions
  • _TSUISupport.llb\TestStand - Drag Splitter.vi: Could definitely be made more clear at a glance. Left to right wiring is preferable for readability.
  • _TSUISupport.llb\TestStand - Get VI Normal Bounds.vi calls deprecated VI property, FP.OSWindow without ostensibly using the property
  • _TSUISupport.llb\TestStand - Insert Command Collection in Menu.vi needs refactoring
  • _TSUISupport.llb\TestStand - Load Bounds.vi needs minor refactoring
  • _TSUISupport.llb\TestStand - Menu Command Data.vi needs refactoring for readability (Yes I have high standards.)
  • _TSUISupport.llb\TestStand - Save Bounds.vi could be more readable
  • _TSUISupport.llb\TestStand - Save Sizes.vi could be more readable

_TSUtility.llb is generally much higher quality code and there are VI documentation and standard connector panes, but still some occasionally messy wiring in there.

 

...so I guess what I'm really asking for is a cleaning-up of _TSUISupport.llb. I don't really have a problem with cleaning up the code that's part of the UI examples since I'm writing modified UIs anyway.  However, modifying the vi.lib code seems like a bad idea and I'd like to be compatible with that code in the future. It would be nice to have a newer, (non-llb?), cleaned-up version alongside the older one so as to maintain backward compatibility for existing callers of _TSUISupport.llb.

 

Is there uglier code out there? Oh, emphatically yes, a thousand times over - it gets much, much worse. ...but this is NI's code and it should be a model to follow. We should be encouraging potential LabVIEW novices who see this code to aspire to a higher standard.

 

Thank you for reading this missive - I mean it constructively and my sincere hope is that it fosters improvement that benefits everyone.

 

Mr. Jim

Al.B
NI Employee (retired)

Hi Jim,

 

Thanks for the feedback.  I made some updates to the TSUIsupport.llb based on your suggestions and wanted to get your feedback on the changes.  The updated file is available here for download, just replace the copy in vi.lib with this one:

 

_TSUISupport.llb

 

Note that I did not change most of the connector panes to 4-2-2-4 to avoid potentially breaking compatibility. I also made your suggested changes to the full UI for TestStand 2019 SP1; I can provide the updated file if you'd like it.  

 

Let me know if you have additional feedback on the changes.

 

Thanks!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
CyGa
Active Participant

@Al.B Thank you for the effort ! I've not been able to take a look at it yet, but I will as soon as I start a new TS UI dev.

But, can you change the status of the idea into 'In development' or 'Completed' ?

It would, at least, give some hope to people who posted ideas since 2013 (yes, this 'idea' is kind of old now...). And give the feeling that NI is listening to their beloving customers 😉

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
WireWeaver
Active Participant
Status changed to: Under Consideration
 
https://www.linkedin.com/in/trentweaver
bienieck
Active Participant

By the way maybe update also examples code. Right now you can find there something like this:

recursion.png

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.