0
$\begingroup$

In Automating Manufacturing systems by Hugh Jack, Chapter 11: Flowchart based design, 11.6: practice problems, question number 3. I've attached a photo of the book's solution (link 1) and an other one of my own solution (link 2). My problem with the book's solution is that after the start block, assuming the door is already closed, then the user would have to press the button twice according to the flowchart for the door to open.

The question is:

"Design a garage door controller using a flowchart. The behavior of the garage door controller is as follows, - there is a single button in the garage, and a single button remote control. - when the button is pushed the door will move up or down. - if the button is pushed once while moving, the door will stop, a second push will start motion again in the opposite direction. - there are top/bottom limit switches to stop the motion of the door. - there is a light beam across the bottom of the door. If the beam is cut while the door is closing the door will stop and reverse. - there is a garage light that will be on for 5 minutes after the door opens or closes."

Link 1:http://www.4shared.com/photo/YPA5d2kYce/image.html Link 2:http://www.4shared.com/photo/9yyZRsj8ba/image.html

Am I right? Or what am I missing? Do I have to assume a certain position of the object whenever faced with such type of questions?

$\endgroup$
1
$\begingroup$

Yes you are correct in that the book assumes the initial start position to be either open or stationery after being stopped during previous opening and it would require two presses to get it off the ground.

Both your answer and the book forget to make a loop in state 6, and also forget the 5 minute timer.

Your solution does not account for initial starting position other that either closed or open, ie, if there was a power failure during closing/opening, the door will not move again unless you press the button whilst also pressing a top/bottom limit switch.

If you are going to describe or create something with a flow- or state chart which is safe and fully/consistently functional according to specification you have to account for all possible positions/states.

It was a pain to go to that external site for reference. Please paste pics in question.

| improve this answer | |
$\endgroup$
  • $\begingroup$ To clarify: Your solution is following the specification to the letter whilst the authors is not. $\endgroup$ – Nikke Oct 23 '16 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.