otherwise. is there
About KeepCoins and that diverter... to where does it divert? To the
internal
cashbox? And that Ejectcoins diverter dumps collected coins to the reject
bin, where the customer can take it out again? Again, I need to see the
machine. And that would be my answer during an exam too
LOL.
However, assuming my guesses are correct, it seems that it may work
if you implement a statemachine with states like these:
MachineIdle - turn off EjectDrink, turn off KeepCoins, turn off Ejectcoins.
machine waits for 'AcceptCoins'. If signal present, it moves
to NewPurchaseAttempt
NewPurchaseAttempt - if MachineEmpty , turn on EmptySignOn and turn on
EjectCoins
and move to WaitOperator state.
else turn on KeepCoins and EjectDrink, and move to MachineIdle
state.
WaitOperator - wait until signal 'MachineEmpty' goes false, turn off
EmptySignOn
and move to MachineIdle state.
I see no need/use for that input 'RejectCoins' without a better description
or if I don't get to see the actual machine.