Outcome & Results



Create a “Graph” based State Machine The operation and transitions of the final program were performed synchronously with a Graph state machine where the Human Machine Interface set or retrieve the required data over MPI to align the user’s prompts and actions with those of PLC’s current state. This approach made debugging quarantining and debugging functionality a lot easier.
Explore and use SCL (Structured Control Language) Structured Control Language gave a much more familiar coding platform which was particularly useful in the implementation of mathematical or otherwise laborious operations. Primarily SCL allowed for the use of text based conditional statements and loops with more advanced features later explored.
Avoid use of other programming languages (LAD/STL/FBD) Given the primary objective of this project was to explore Graph and SCL the decision was made early to completely avoid the use of any alternate coding methods.
Explore HMI & MPI capabilities To provide a more aesthetic project a Human Machine Interface panel was incorporated for both user input and system output. This facilitated a lot of further learning on the intricacies of closer HMI PLC integration including but not limited to the quantity and rate of MPI communication possible between the PLC and HMI.
Explore additional SCL Datatypes Whilst implementing an algorithm to process both payment and change due in SCL the option of using arrays and strings inside the SCL block became apparent as a more efficient implementation method. Inside of this block an array of Boolean values is created to check which coin types are available, this then uses another array of coin values to calculate a third array of coins to be refunded. This method allowed these calculations to be done with only a few lines of code.


HMI Display Screens


The Home ScreenRoot Screen The Beverage type selection screenType of Coffee The Beverage customization screenExtra Shots
 The Home screen prompts the user to select the size of beverage that they desire. Once a selection is made does the flashing confirm button show up and an animation of green power lights on the cup shows their selected size. The animation was created using a second order system equation.  The Beverage selection screen prompts the user to select their desired drink selection. This screen is kept simple and only once the selection is chosen does it provide the next button. The user can press the back button anytime to go back to select a new size.  The Customization screen prompts the user to select some available options for their beverage. It allows the user to select as many extra shots as they want but allows them to choose only one milk option. Once the selection is made then the next button appears.
The Payment Option Screen Payment Sheet  The Coin Payment ScreenAdd Coins The Card Payment screenEftpos
 This screen allows the user to choose their preferred payment option. The user can also come back to this page and pay for their order using both payment methods.  The coin Payment screen allows the user to insert coins into the machine. The screen displays the order total, the Coins added total and the order balance. The machine will also recognize foreign currency and show an Invalid Coin message back to the user. Only when the Payment is paid in full does the next button appears.  The Card payment screen allows the user to tap their card onto an eftpos machine. This screen shows the order total and the amount to be charged on the card. In the event the user paid a portion of the order by coins, the eftpos machine will display the balance to be charged by card. The user can always go back and add more coins. Once the user tap their card and animation of their card being tap is shown. Once the payment is accepted then the next button appears
 The Coffee Cup Filling ScreenCoffee Being Made  The Receipt ScreenRecipt The Feed back
 When the payment is fully made the Coffee is filling screen will activate. If the user paid by coins and a balance exist, the exact change will be given back to the user and a coin animation of the exact coins will be shown. This screen will also show an animation of the cup being filed with the desired beverage and up to the right height.  While the cup is being filled a flashing message Please Wait is shown to the user. Once the cup is fill then a bright yellow massage showing Ready is showed.  The Receipt Screen comes on once the coffee cup is full. It displays an order receipt back to the user detailing their order, payment and change received. It also prompts them to rate their experience using this HMI.  The feedback is displayed on the final screen. The feed back is made from 1 to 5 transparent stars. The user can press new order to place a new order or let the timer to automatically go back to the home screen.