Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify my simple state machine into a counter?

Part 2 (50 points): Modify the appropriate files in PE2SimpleState.lvproj to create a counter.  The counter should:

  1. (5 points) Be automatically initialized to zero.
  2. (5 points) Be able to count the number of times a button is pressed.
  3. (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:

  1. (5 points) Count
  2. (5 points) Reset
  3. (5 points) Stop (You will receive 5 points if pressing Stop, stops the program.)

On the block diagram you must:

  1. (5 points) Use the event structure in the Wait for Event state to handle the button presses.
  2. (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:

  1. (5 points) PE2Data.ctl must store the current count in a control (field) called count.
  2. (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.

0 Kudos
Message 1 of 2
(5,454 Views)

Do you really think someone will do the entire work for you ?

 

Try by yourself and come back with detailed questions.

0 Kudos
Message 2 of 2
(5,446 Views)