LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My solution for boiler example -for CLD

Hi all,

 

I am currently preapring for the CLD and so attempting the sample examples. I have given a try for the boiler example.

 

I request all the champs here to provide me the comments on the coding. As coding was done in working time documentation is not done in very good way. But i would like to know the overall comments on it.

 

Thanks in advance!!!

0 Kudos
Message 1 of 8
(4,278 Views)

I hate to be the bearer of bad news but I doubt this would pass. There are lots of things that need improvement. Below is a quick list of things you need to look at.

 

  • Document all controls, indicators and VIs.
  • DO NOT leave the front panels and block diagrams maximized. You should try to fit things on a single screen. Also, the main front panel must look like the requirements including the basic size.
  • Keep your wires straight. Avoid unnecessary bends. Something that is definitely not done in your code.
  • Label wires that pass through your state machine. This adds to the documentation and readability of the code.
  • Don't place items on top of each other.
  • Make better use of subVIs.
  • Document your code better. Referring to block diagram comments.
  • You have an issue with your state machine. You effectively queue things up in an array but it is possible that you will not execute all the states.

I didn't try running it so I can't comment on the functionality. As soon as I opened it I knew you had more to concentrate and practice than the basic functionality 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
Message 2 of 8
(4,250 Views)

A suggestion on the wires. Select in and out tunnels and use the alignment tool. Then right-click on the wire and select clean up wire.

 

Your terminals are just sitting there all lonely outside the while loop. Put them inside the associated event case. Not only is it cleaner, and not only will the value of latching booleans reset automatically if latching, but you can double click on the FP control and go right to the event case where it is handled.

 

You have four data shift registers. I suggest creating a typedef cluster containing the four items. Create one shift register and unbundle or unbundle as necessary. It might seem like more work but it makes it much easier to keep the wires clean.

 

Did you know that you can move the input nodes of the event structure? You can also resize so that only the node(s) you need are available.

 

Here is your stop event

 before.PNG

 

Here is the stop event with the recommended changes. Much cleaner.

 

after.PNG

=====================
LabVIEW 2012


0 Kudos
Message 3 of 8
(4,242 Views)

Thanks for the comments...i would definitely imporve on the points mentioned.

 

0 Kudos
Message 4 of 8
(4,227 Views)

Dear Sir,

 

I didn't get your following point:

 

DO NOT leave the front panels and block diagrams maximized. You should try to fit things on a single screen. Also, the main front panel must look like the requirements including the basic size.

 

  1. Can you please explain sir?
  2. Also,I know when Coding, my block diagram should fit into my screen? What should i do if my code is stretching my Block diagram loop size more than my screen size? Should I use sub-vi's to reduce the size or use multiple states to make that logic?
  3. If i have multiple states in my program, should i need to use Wire label in all the states?

 

Regards, 

Aditya A

0 Kudos
Message 5 of 8
(3,598 Views)

@AdityaAbhishek wrote:

Dear Sir,

 

I didn't get your following point:

 

DO NOT leave the front panels and block diagrams maximized. You should try to fit things on a single screen. Also, the main front panel must look like the requirements including the basic size.

 

  1. Can you please explain sir?
  2. Also,I know when Coding, my block diagram should fit into my screen? What should i do if my code is stretching my Block diagram loop size more than my screen size? Should I use sub-vi's to reduce the size or use multiple states to make that logic?
  3. If i have multiple states in my program, should i need to use Wire label in all the states?

 

Regards, 

Aditya A


Well this is an old thread but the information is still relevant.

 

One way to really annoy another developer is to save your vis with the BD and FP "Maximized".  you almost never need to use up the WHOLE screen to view a panel and its very good practice to display only as much as you need

Like so, 

Capture1.PNG

now when the next developer opens your vi they don't have it cover the entire screen.

 

And try to save them on your primary monitor, so they don't open up off screen somewhere.  (Reminds me that I need to talk to someone at lunch today- he keeps forgetting that last part and my secondary monitor is left of my primary Smiley Frustrated)

 

Scrolling in one direction for a BD is sometimes acceptable- Do use sub-vis and appropriate architectures to reduce the BD footprint (avoid the Stacked sequence structure- it is NOT appropriate in 99.999% of cases)

 

Wire labels belong outside of structures that use them so they are always visible but can be replaced by a named node, constant, or terminal label in many cases

e.g.

Capture1.PNG


"Should be" isn't "Is" -Jay
Message 6 of 8
(3,572 Views)

Please explain this.

 

And try to save them on your primary monitor, so they don't open up off screen somewhere.  (Reminds me that I need to talk to someone at lunch today- he keeps forgetting that last part and my secondary monitor is left of my primary Smiley Frustrated)

0 Kudos
Message 7 of 8
(3,544 Views)

As an example.

This vi was saved by a co-worker with the FP hanging off teir primary monitor and extending onto a secondary monitor to the right of the primary monitor

Capture1.PNG

So, when I open it I only see a small section of the FP at the extreme right side of my monitor


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(3,534 Views)