LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wiring diagram unreadable

Has anyone seen their wiring diagram get in a state where it is unreadable and seems to be jumbled together?  If so, how can this be corrected?  I'm using version 8.6.

0 Kudos
Message 1 of 5
(2,624 Views)

LabVIEW 8.6 has the option to clean up your diagram, it will try to give your code a better look.

This will result in a bigger diagram, after but it allows you to spot better the places where you can use a  subVI.

LabVIEW 8.6 is the first version with this feature so be prepared for some crashes/unexpected results (save often, commit often).

Clean up is activated by the key-combo <ctrl-u> or the menu option Edit->Clean up diagram

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 5
(2,619 Views)
0 Kudos
Message 3 of 5
(2,607 Views)

Hi Ton,

 

Well, I don't think it will be quite that easy.  I think my main VI has grown too large because I cannot see sub VI's and only partial wires here and there.  I'm not sure if this is because it's taking up too much memory or not.  I will try the clean up tool to see if this helps.

 

Tommy

0 Kudos
Message 4 of 5
(2,606 Views)

The link that   posted does apply. The only way to prevent this from happening is to get in the habit of keeping your code modular and your subVIs rather basic. Don't let your code get this way in the first place. The first moment you start to see it get messy start to clean it up right then and there. Once you have gotten to where you are now it is not an easy task to fix it and clean up the code. Prevention IS the best cure for spaghetti code.

 

Steps you can take to try to clean your code up is to try and find sections of code that would be a good candidate for being a subVI. Select that code and create a subVI from it. LabVIEW can do this for you automatically. Chip away at the code until it is more managable and clean up as you go. In the most extreme cases it is best to basically start over and rewrite the code. Consider using a state machine to control your processing task. Spend a little time up front defining the state machine before you begin to implement it.

 

Unfortunately there is no magic bullet to make good code out of spaghetti code. Sorry I can't give you better advice for cleaning it up at this point.



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 5 of 5
(2,591 Views)