when a coin is clicked on with the mouse it is placed into

Post New Homework

FIGURE shows the graphics simulation of the drinks machine.

2077_Graphics simulation of the drinks machine.png

The list of inputs and outputs is as follows:

IP0 Coin slot sensor        OP0 Coin hold solenoid
IP1 Cola drink button      OP1 Coin accept solenoid
IP2 Lemon drink button   OP2 Dispense cola drink solenoid
IP3 Cherry drink button   OP3 Dispense lemon drink solenoid
IP4 Lime drink button      OP4 Dispense cherry drink solenoid
IP5 Reject coin button     OP5 Dispense Lime drink solenoid

The operation of the Soft Drinks Machine is as follows;

When a coin is clicked on with the mouse it is placed into the slot, it then operates the coin sensor IP0. This should operate OP0 (coin hold solenoid), which will hold the coin in place. At this point either a drink is selected or the coin rejected.

The rejection of a coin is by operating IP5, which should reset OP0 allowing the coin to fall into the rejection box. If a coin is rejected, pointing the mouse at the coin and clicking resets the machine.

If a drink is selected by the operation of one of the drink select buttons, OP1 (coin accept solenoid) should operate. This allows the coin to fall into the Kept box. Once the coin has dropped into the box, the solenoid corresponding to the selected drink should operate, allowing the drink to be dispensed.

Once the selected drink has been dispensed, clicking the coin will reset the machine.

Important Notes: When writing the program you must ensure that:

(a) The coin cannot be rejected once a drink has been selected.

(b) Selecting a drink disables all of the other drink buttons.

As usual, use the listed inputs and outputs and any flags, timers, and counters you require to complete the assignment. Use the documentation facilities to describe the program function.

Post New Homework
Captcha

Looking tutor’s service for getting help in UK studies or college assignments? Order Now