Develop a “Mackworth Clock” in LabVIEW using 12 LEDs. Basically, this Clock is used a vigilance test to find out the alertness of a person while doing repetitive work which may result in fatigue.
With the understanding of how a “Mackworth Clock” works, develop using LabVIEW a clock using 12 LEDs.
6. A numeric display also shows the number of misses in percentage
Solved! Go to Solution.
I would suggest asking your professor or whoever assigned you this project. If you have specific LabVIEW questions feel free to post those here.
Not sure what you mean by "explanation of this question".
Do you have a problem understanding the requirements or do you have a problem translating them to LabVIEW?
Is there any specific item in the requirements that you don't understand? Which one?
What is the probability of "random"? What should the user do if two or more LEDs are skipped at once?
Do you know LabVIEW? How far did you get? Did you place the LEDs? Did you find a mechanism to read the space bar? Should it also show a count-down clock for the 5 minutes?
Do you have a specific question?
Ask yourself "What happens". For the time being, don't get hung up on "How does it happen". Here are some "What Happens" things that I see:
There may be other "What Happens" to think about. You should do all of this with pencil and paper. Once you have a good notion of "What" you want to do, you can start thinking about "How" you could use LabVIEW to carry out some of the tasks.
We obviously don't know what you have been taught about LabVIEW. We also don't know how much attention you have been paying in class (or how many times you've viewed the Tutorial Videos and actually have done the Exercises yourself, from scratch).
I hope no-one simply "Posts" a "Solution" to this problem, as it will cheat you out of a chance to Learn LabVIEW. Give it a try. See if you can, at least, make the Clock Tick. [Here's a "How" -- How would you implement the Clock, meaning how do you want to make it look?]
Bob (can you guess one of my "job titles"?) Schor
is more like im unsure what to start at block diagram... Im lost..
You definitely need a toplevel while loop so the code repeats forever or until stop is pressed.
Then you need some kind of timing. A 10ms loop time would seem reasonable. Go to the next (or skip one) LED whenever the iteration is divisible by hundred. (what kind of time resolution do you really need?)).
devise a mechanism to measure reaction time. Typically one would take the difference between tick counts (one taken at the LED skip, and one taken at the button press). Compare the elapsed time with 200ms to decide success vs failure.
You need a random number generator that sometimes skips an LED.
You need some way to accumulate results. Typically a shift register comes in handy to accumulate # of tries and # of successes.
To work out most of the logic, use a big button that the user needs to press (you can switch to reading the space bar later).
Start simple, then add features:
please do some training before starting to code.
No need for huge sequences and lots of local variables!
Just a suggestion to replace your current code:
No need for 12 single LEDs when you can use an array.
No need to repeat code: this usually is done using a loop!
(The code in this picture still is "bad" and highly user-unfriendly…)
Wow! How much time did you spend to create all that duplicate code?? If you can explain the problem in a few sentences you can assume that the diagram should not be larger than a postcard. 😉
Use a cluster of 12 booleans and operate on a boolean array to be converted for display. Here's a quick draft (took me minutes, mostly to arrange the LEDs in a circle :D) to show how to cycle the LEDs and skip occasionally.
Now try to incorporate the button and add some timing. As I said, spin the loop at a fast rate, reset a timer whenever the boolean is skipped, then see how much has elapsed when the button is pressed. (none of that is implemented in my example)