Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

Car Wash Review

Hi,

 

Attached is my solution to theCar Wash sample exam, I'd appreciate it if someone would look at my ATM solution and tell me what you think

 

thanks!

 

 

Mohamed Bakr

0 Kudos
Message 1 of 5
(4,877 Views)

I'd say it is pretty good.  There is room for improvement for sure but overall I think it covers almost all the requirements, and it is structured in a simple, but correct way.

 

First I'm not certain but I think that there was a requirement that when a vehicle is done, and it makes it to the exit, that the software will reset, and allow for another car to be washed.  If this isn't the case never mind, but I think having the ability to choose wash settings and click start again is needed.

 

Here are a few nit-picking issues all of which are minor.  I see mixed control styles used on subVIs.  I generally only use one style in VIs that are never seen, modern.  But using all classic or all silver isn't a big deal either just being consistent might help.

 

I see a mix of icon, and non-icon view for terminals in subVIs, I'd say be consistent, but personally I prefer the non-icon view.  To help this make sure and change this setting in Tools >> Options when you first get the machine.

 

There is some over lap of wires behind objects, and labels over objects.  

 

Some code could be simplified, like the Determine Wash Cycles VI.  In the past I've seen people would use the cluster reference, then use that and query all boolean references in it using a property node.  The benefit of this is then getting the value of the buttons, and the text of the buttons that are true, can be don in a for loop, instead of using 9 select functions, and a build array.  This is also a more scalable design.

 

Why do you use Enqueue at Opposite end, instead of Enqueue?

 

Some boolean operations could be simplified by using a compound arithmetic.

 

Some unnecessary wire bends.

 

I think there could be more comments in the subVIs.  I think one check will be if every VI has at least one comment.  That is one of the default tests in the VI Analyzer.

 

I don't think you need an uninitialized shift register for reset, that should probably have a constant, so the program startups up consistently each time.

 

I didn't see any error handling on exit, by that I mean if an error happens is the user prompted?  I'd just drop down a simple error handler at the end.  Oh and if an error happens, then the code in the shutdown case won't do anything (except release the queue) because an error into those property nodes cause it to do nothing.

Message 2 of 5
(4,866 Views)

OK a few things I see:

 

  • Tip stips on UI objects-  You don't have any!  That is bad
  • The Stop Boolean has a Latching mechanical action.  The terminal NEEDS to be in the Stop Value Change Event case
    • Stop or Error passes the error through if there is an error so, in the shutdown case only the destroy queue will actually execute.  Better to just OR the error and the boolean into the condition terminal and destroy the queue outside the main loop and simplify the state selection
    • the error is not handled (put a simple error handler on the error SR out)
  • What is "Placeholder.txt" (an empty file) doing in the project? What is it supposed to be doing?

As Hoovah said- overall not bad but could be improved


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 5
(4,591 Views)

Placeholder.txt is just a text file that NI includes

0 Kudos
Message 4 of 5
(4,577 Views)

@Gregory wrote:

Placeholder.txt is just a text file that NI includes


I see.

 

Historically, that sample exam had a requirement to hold "Step Time"  and "Station#" for each "Wash Step"  in a file.  The latest spec omits this requirement.  and provides a table instead.  I was not aware of the Spec change and, thought I had a valid miss on your submissions functionality.

 

Your Actual CLD will have a File IO requirement.

 

Bonus points: How would you modify your code to enclude that requirement?

 

That is actully a really good bit of practice because you can be sure in the real world you are going to have a conversation like this:

 

You: Hey boss, that Car Wash App is done, tested and ready to ship!

Boss: The client came back and told us they have a lot of pressure from the marketing team to "Go Green" to differentiate their product.  They want to be able to save water.  Can you make the step times adjustable?

You: ?

Boss: Also, Their Field Sales Team is finding that a lot of potential clients gust do not have the room for a full sized system so they want to combine station 1 and 2 on a shorter model. 


"Should be" isn't "Is" -Jay
Message 5 of 5
(4,572 Views)