The code behind the garage operation was designed as a state machine with six main states: waiting for input, checking available spots in the garage, marking spots as taken or not taken in the parking data array, updating the GUI buttons, calculating the motor way points to move the car as desired, and actually moving the motors. The state machine controlling the main processes was set in a time loop, which ran in parallel with another time loop operating a simple queue system for holding user commands. All programming was done in LabVIEW 2016 with the myRIO microcontroller.
The GUI provides an easy to use interface via a numeric keypad and simple visual aid to show occupied spots, providing users with familiar interfaces and intuitive displays. A simple ‘help’ button and brief explanation is available for users requiring additional context for GUI control.
The state machine and the GUI command receiver run in parallel so that user feedback can be received during operation of car lift.
A time loop is structured to execute motor functions first before reading encoders and performing proportional controls calculations on the motors' duty cycles to ensure real-time motor operation.