LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update a control value using property nodes

NI has always graded the CLD more on style and documentation than on execution.
0 Kudos
Message 11 of 13
(1,104 Views)
Besides a front panel design, employers and the customer have no need for style, so don't know why this is a big part of grading. "Unecessary bends in wires", "overly complex solution", "property nodes used to update values", "error terminals on property nodes not wired" and "errors not handled" have no justification.
 
So now if I follow NI methods I must -
don't bend wires
dumb down my soln, no event structure on 1 state machine
wire property nodes that will never error although the reference number out is wired
add error handling to an error free application.
 
I sure most of you professional don't code this way!!! Someone needs to break this tradition...
 
OoooK
richjoh
0 Kudos
Message 12 of 13
(1,086 Views)
Actually most of the items you listed are pretty important.  Remember, this is basically NI's stamp that they consider you a good, qualified LabVIEW programmer.  Just because you can make a program that works doesn't mean it is a good, well-written LabVIEW program.

You should take a look at the Rube Goldberg thread.  It shows lots of example of overly complex code.  This and this are two of my favorites.  While the original code may function, it is by no means good code.

Many on this list can point to examples of inheriting code where the programmer did not write good code.  That IS something your employers and customers should care about.  You will not be around forever and they will at some point will have someone else look at your code to support it.  There have been several instances where I have walked into a customer and told them I was going to throw away the code because it would be faster for me to rewrite it from scratch than attempt to try to support existing code.

If you don't believe in error handling, you're doing yourself a disservice.  Even if you "know" a VI or property node will not generate an error, it should be wired.  There are invalid values for porperty nodes, and sometimes properties are dropped between one LabVIEW version to the next.  I just upgraded a project from 7.1 to 8.5 and several plot properties were no longer valid.  If I had not used the error cluster, I would have spent hours trying to determine why my plots didn't behave the same way.

I think you will find most of the professionals on this list will support most, if not all, of the comments NI made about your CLD.

Personally I don't have a problem with bent wires, as long as they don't bend too many times - 2 to 3 times max.
Message 13 of 13
(1,080 Views)