From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView VI Optimization

I have been given a task of opttimizing the VI attached.

The VI describes a Building Heating System.

CXould anyone suggest me a way to make this smaller? i tried using sub VIs but they help only to an extent.

Any idea is appreciated.

 

Thanks.

0 Kudos
Message 1 of 5
(1,969 Views)

Hi amp,

 

Could anyone suggest me a way to make this smaller? i tried using sub VIs but they help only to an extent.

  • Start from scratch and use a better architecture, like state machines or producer-consumer schemes.
  • Separate device IO into their own loops/subVIs.
  • Use Subpanels for those different tab pages to move FP elements into their own (sub)VIs.
  • Use event structures to handle things like those "Visible" properties - instead of setting the same properties in each iteration…
  • Remove Rube-Goldbergs like that inner case structure in the 2-Punkt-Hysterese-Regler…
  • When those charts should be cleared upon stopping the while loop then you should call those "History" property nodes AFTER the loop… (Why do you need to clear charts upon stopping a VI at all???)

(Ihr habt doch an eurer Hochschule bestimmt auch eine Informatik-Abteilung, die dir bei sowas helfen könnte!?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(1,948 Views)

You can start by removing the 3 inches on the left, with ctrl-alt-drag. That's the easy one Smiley Very Happy.

 

I'd start by removing all the silliness. Most case structures can be replaced by one or two selectors. Some even by a or\and function. I'd do this mostly to get to know the application a bit.

 

To be honest, this one is borderline "start all over". It would depend on the content of the subVIs, which we don't have.

 

 

0 Kudos
Message 3 of 5
(1,928 Views)

@GerdW wrote:

(Ihr habt doch an eurer Hochschule bestimmt auch eine Informatik-Abteilung, die dir bei sowas helfen könnte!?)


Unless they made it in the first place Smiley Indifferent. I've seen enough professional programmer groups without any standards.

0 Kudos
Message 4 of 5
(1,927 Views)

Hi Wiebe,

 

I've seen enough professional programmer groups without any standards.

And more than enough students just being taught to usage of ExpressVIs… 🙂

 

@amp:

Forgot to mention: implement a better data handling, mabye even based on key-value-pairs (or maps nowadays)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(1,912 Views)