Part 2 (50 points): Modify the appropriate files in PE2SimpleState.lvproj to create a counter. The counter should:
- (5 points) Be automatically initialized to zero.
- (5 points) Be able to count the number of times a button is pressed.
- (5 points) Be able to be reset to zero, and allow the user to continue to count button presses.
The front panel of PE2Main.vi should have 3 buttons labeled:
- (5 points) Count
- (5 points) Reset
- (5 points) Stop (You will receive 5 points if pressing Stop, stops the program.)
On the block diagram you must:
- (5 points) Use the event structure in the Wait for Event state to handle the button presses.
- (5 points) Create additional states to initialize, increment, and reset the counter. (You will not receive full credit if you take these actions within the event structure itself- instead events in the event structure should cause the correct state in the case structure to execute.)
Type definitions must be modified correctly:
- (5 points) PE2Data.ctl must store the current count in a control (field) called count.
- (5 points)PE2State.ctl must have the appropriate states to make the counter work. Don’t forget that you need to create a case for each item in PE2State.ctl.
When you have completed parts 1 and 2, create a new Zip File Build Specification and upload the generated zip file to the Practical Exam 2 Wednesday Blackboard assignment.