Overview
Just for kicks... This VI will answer all your questions in the same fashion as the old 8-ball fortune teller.
Description
This VI uses a state machine with 3 cases to answer your question. Initially, the “Ask” button is visible. When a question is entered and the “Ask” button pressed, the “Ask” button is hidden with a property node. A Random Number (0-1).vi chooses a random index from an array of strings and is displayed as the answer. The “Try Again” button is then visible. When the “Try Again” button is clicked, the VI returns to the first case and you can enter another question.
Steps to Implement or Execute Code
- Run the VI
- Type a question
- Click “Ask.”
- Read your answer
- Click “Try Again” to ask again or “Stop” to end the VI
Requirements to Run
Software
LabVIEW 8.5 and later
Hardware
None
Additional Images
Front Panel

Block Diagram

Array of Strings that are used as the 8-Ball answers
