LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW coding techniques - excessive nested structures

Hi, in the attached VI, I have lots of nested structures. I'm certain that this is bad coding practice and I was hoping someone with experience in coding large applications in LabVIEW might have a look at it and let me know if there is any approach that might allow me to clean this up a bit or offer any suggestions at all.
I'm not including the sub VIs since it's really the program flow that I'm wondering about. I think everything related to my question should show up OK without the sub VIs. Thanks!
0 Kudos
Message 1 of 4
(2,897 Views)
I didnt take a real in depth look but you could definately make much of the code in the sequence structures into sub-vi's and use data flow to control the execution order, that would eliminate quite a bit of the nesting etc... and make it much more readable...

Dan
0 Kudos
Message 2 of 4
(2,897 Views)
Thanks - that's a great idea.
0 Kudos
Message 3 of 4
(2,897 Views)
I would also add "init" and "exit" states in the state machine and put there the code that is executed before and after the while loop.


LabVIEW, C'est LabVIEW

Message 4 of 4
(2,897 Views)