When a coin is clicked on with the mouse it is placed into the slot
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

When a coin is clicked on with the mouse it is placed into the slot

EXERCISE 4 – DRINKS MACHINE

FIGURE 4 shows the graphics simulation of the drinks machine.


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. 

Hint
EngineeringInput and output is basically the communication that takes place between the outside world and the information systems like computers. Inputs are the data that are keyed in by the human while the output is the data or feedback that is given by the computer....

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.