Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

ATM Machine Simulation Troubleshoot

I am trying to simulate an ATM machine. I successfully implemented the user input for login and password but I couldn't program the Deposit, Withdraw and Fast Cash functions. I am also having trouble with displayed messages since they keep reappearing. If anyone can help with any of these issues it would be much appreciated.

0 Kudos
Message 1 of 3
(2,157 Views)

@mrashidi1 wrote:

I am trying to simulate an ATM machine. I successfully implemented the user input for login and password but I couldn't program the Deposit, Withdraw and Fast Cash functions. I am also having trouble with displayed messages since they keep reappearing. If anyone can help with any of these issues it would be much appreciated.


When developing application like this make sure you follow proper design patterns/architecture.

It is suggested to avoid Flat Sequence structure as much as possible, To achieve your application simple state machine will solve your case.

Application Design Patterns: State Machines - NI

 

If you are practicing this for CLD Exam, Please make sure you understand the program structure completely not just replicating the sample exams

 

Also, there is a separate community page available for getting code review Certification - NI Community

where you can post your code module for review.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 3
(2,147 Views)

Before trying to do certification examples, I would recommend to study some of the examples already posted in this forum.

 

As has been said, significant parts of your code raise huge red flags. For example:

 

  • Your outer loop will stop after one iteration as it if is not even there. Make sure you know the difference for the various stop conditions. Yours is set to "continue if true" (probably by accident!) and has a FALSE wired.
  • Event structures NEVER (never ever!!!) belong inside sequences and inner structure. Once the first frame has completed, it can never be reached again, so if you would press the log in button while the middle loop is running, the entire VI will lock up forever (Event is set to lock the front panel until it completes, but it can never complete!)
  • If you operate the tab control via program and want to prevent the user form operating it directly, make it an indicator. No need for local variables.
  • Gove your controls and indicators etc. reasonable names. "enum" or "tab control" "page 2" "page 2" are not reasonable names or tab names. "Stop" is not a good name for a "return card" button.
  • Look at state machines; One outer loop, No inner loops, no sequence structure, etc. Should fit on a postcard!
  • You have race conditions in the middle loop. For example you have popups asking for amounts, both amounts cannot be entered while the popup is open, the popup is pointless and will appear over and over without any possibility of escaping.
  • Your inner loop burns 100% of a CPU core when no popup is active.
  • Username and password fields should be set to "limit to single line" (right-click...), else an enter at the end will be part of the entry and the fields will never match.
  • your boolean output of the first case structure is identical to the selector value, so just branch from there. No need for diagram constants.
  • You only need one input for the amount. The mode determines if it is a deposit or withdraw, right?
  • ...
0 Kudos
Message 3 of 3
(2,126 Views)