LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions on how to clean up a VI

So, this is what I've managed to do in the afternoon of just sitting at my desk.

0 Kudos
Message 11 of 13
(428 Views)

Much improved. Some othe rthings to consider is that you should never run wires under objects or backwards. Try to minimize wire bends as well. I realize that you must be working on a VERY large monitor but try to avoid saving your front panel so large. It is so large I don't see any of the window borders for your front panel. Same goes for the block diagram. I run my resolution at 1600x1200 which is fairly large. Not everyone has monster displays.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 13
(418 Views)

#1 Dont use eternal loops! Have atleast 1 stop button and locals at the other loops (even if there's better solutions).

#2 Make sure all loops can stop! If you have several event loops you surely need an empty timeout that'll check for stop.

 

#3 Code tips. Instead of building a constant array, make it a constant. You can even place it in a VI of it's own to save space.

As Mentioned, instead of building a cluster ouf of the Doubles, simply place a cluster on the front panel and use it. 🙂

The number conversion to string is Rube'd, simply wire the array to Number to string. (you should probably use a string to Fractional)

The check for file and folder is redundant, i'm pretty sure the Save file will create the path if needed.

The build cluster doesn't do anything at all, does it? It isn't used for anything else than building a cluster ... it'd be easier to just build array. Also, it should be inside the Save event so it doesn't create arrays when not needed.

 

I'm pretty sure all of it can be a single event loop, or possibly better producer/consumer.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 13
(413 Views)