Example Code

Using State Machines and Event Structures to emulate security interface of an ATM

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

 

Overview
This example implements state machines and case structures to emulate a PIN machine like you might find on an ATM or similar system.


Description
Using the state machine architecture and an event structure can register key changes. The machine emulates the keypad and display that you might find on an ATM or home alarm system.

The user can enter 4 digit to match the password. If in-correct the VI returns to default If correct a green LED is lit and the 'Set' button is activated. On pressing 'Set' the user is now able to enter a new password and a red LED is lit indicating the VI is in the Set state. Once the new passcode is set, the VI returns to its default state

There is also a 'Clear' button that will erase the current input in case a mistake is made

 
Requirements

  • LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Download and open the project
  2. Run “Input program.vi”
  3. Enter 4 digit to match the password

Additional Information or References
VI Block Diagram

5-306.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Tim, CLD, CTD
National Instruments (UK & Ireland)
________________________________________________
"No problem is insoluble in all conceivable circumstances"

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.