To download NI software, including the products shown below, visit ni.com/downloads.
Overview
A simple State Machine example that logs the Date/Time that an Intruder enters a building (simulated by pressing a Boolean Front Panel control).
Description
This VI logs date and time of the intrusion event when the "Intruder?" button is pressed, and shows the logged data and time that corresponds to the intrusion number selected. Every step within the State Machine architecture is fully explained, a Flow Diagram image illustrating the operation of the State Machine is also embedded into the Block Diagram.
Requirements
Steps to Implement or Execute Code
Additional Information or References
The Case structure can automatically create a CASE for every state added to the ENUM. To achieve this, right-click the case structure and select "Add Case for Every Value".
Please make copies of the ENUM when using it in code, to achieve this hold down the CTRL key on your keyboard whilst clicking and dragging an existing instance of the ENUM.
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.