08-21-2011 10:54 PM
Yep I'm perfectly aware of VI Properties >> Documentation. I did enter comments in there for my main VI and my sub VIs. See a couple of examples below.
Main VI
And another example from one of my sub VIs
They're not as elaborate as the comments in your example but they're there. So I thought you might be referring to something else when you talked about the comments. Anyway I just wanted to clear that up......no need to yell
Thanks again for the help.
08-22-2011 07:26 AM
I must have missed them when I looked. But yes, those comments explain what the vi is going to do. Sorry for my mistake
08-23-2011 01:06 AM
Positives:
1. Documentation is good... I mean comments
2. Clear wiring
3. Meaningful control name
Suggestions:
1. If there is only two case, use Select (under Programming>>Comparison palette) instead of case structure(See the attachment)
2. VI & SubVIs icons are not so clear. May be you can add big font or something, change the color of VI bcoz block diagram and VI colors are similar.
Thanks
G'Ramy
08-23-2011 09:33 AM
Thanks for the comments! Good suggestion about my icons....I'll make sure I change the background color and maybe use different size or style font to make it stand out.
Regarding the use of Case structures vs Select functions, why do you say to use Selects instead? Is that the recommended style, or is there another reason?
Thanks again G'Ramy
08-23-2011 09:49 AM
Unless it is a boolean case selector the case structure requires a default case and it always creates additional diagrams (look at tooTools>Profile>VI Metrics.. show diagram metrics) So, a select function will operate with more opimal performance. The flip side- what about scaleability? The case is evidently more scaleable. so the choice is up to the developer to interperate the final products goals.
08-23-2011 10:01 AM
For selecting between two values G'Ramy is right, unless as Jeff pointed out future scalability is a possibility. The situation where one case requires significant calculation or other processing while the other just passes a value is better handled with the case structure. If you used Select in that situation, the calculation or processing would always be performed even if the result was not used.
Lynn
08-26-2011 09:50 AM
Great, thanks to all of you for your comments. It makes perfect sense to use a Select structure for a Boolean case, where there's not a lot of code to execute. I'll do that from now on.
08-26-2011 09:54 AM
I wrote the Boiler Controller sample exam, this was my first pass. I would appreciate it if you could take a look at this one and give me some comments.
Notes:
-I know the block diagram is way too big. I started a huge While loop and Case structure because I didn’t know how big the code would be, then I didn’t want to go back and shrink everything. On my next pass at this exam I will make it smaller, and certainly during the actual exam I will if I have time.
-The spec calls for writing elapsed time to the log file in two of the cases. I could not decide what that meant, since in one case elapsed time would always be 10 seconds, and the next “elapsed time” would simply be the next state execution. I left some string text at those inputs since I didn’t want to spend even more time on a relatively minor issue.
-The Log file has a small bug where every time the program is entered, if the file already exists I start writing at the top of the file. I should start at the bottom of the file.