From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-14-2011 10:54 AM
Create a LabVIEW user interface (UI) that will
• Capture the name of the user
• Illuminate an LED, set the color of an LED, or show an image after a Start button is pressed
• The delay between the button press and the UI change should be randomized with an algorithm such as:
delay = 5 seconds + 5 * RANDOM seconds,
Where RANDOM is a number between 0 and 1 generated by the LabVIEW random number VI. You can adjust the fixed and variable delays as you see fit, but neither value can be zero.
• Provide a Stop button to be pressed when the screen image (LED or graphic) changes color or appears
• Provide screen displays for the delay time and reaction time
• Create a LabVIEW block diagram that will generate a spreadsheet-compatible result file with
• The date and time of the experiment
• The names of the team members
• The course name and lab section
• For each test run
• The subject name, the start delay, and the reaction time
• With this interface, capture at least 20 tests for each team member. They do not have to be done consecutively.
• Analyze the results for individual, team and class reaction times in your software of choice
(Excel, LabVIEW, Maple, MATLAB, etc.)
I am not sure what to do.
10-14-2011 11:36 AM
Hi,
Have you any previous experience using LabVIEW? If not, you could start by checking this link http://singapore.ni.com/labviewlearningcenter/programming . You could also check those Getting Started exercises in LabVIEW to make yourself more familiar with the development environment and to give you some ideas how you could implement your application. There's also a lot of examples in the Help->Find examples.
Hope this helps you forward!
-Matti
10-14-2011 11:40 AM
This won't be hard to do. I've actually done somethng very similar to test if people have synethesia, which is the tendency of some people to associate certain colors with numbers. If they have it, they respond faster to certain color-number combinations and make more mistakes when color-number do not correspond to what they expect.
Is this a homework assignment, or a request for freelance work?
Advice is freely given, but I don't do other people's work for them.
Have you got anything built yet?
10-14-2011 11:45 AM
Can you post what you have tried so far? There are lot's of questions in there. This wouldn't be homework would it? The givaway was one of the bullets "The course name and lab section" Don't take it wrong, there is nothing wrong with asking questions about your school assignment as long as they are specific such as "How do I set the color of an LED?"
10-14-2011 01:08 PM
Here is what I have so far. From here i get lost.
10-14-2011 01:16 PM - edited 10-14-2011 01:17 PM
My first piece of advice is to ditch the sequence structure and study dataflow. Here is a very good source of information.
10-14-2011 02:08 PM
Not bad for a start.
One big problem is that you're not using the timer correctly. The 'Wait (ms)' vi gives the millisecond timer value, which is not useful by itself.
You need to have something to compare this time to. In the example below, I take 2 measurements of the timer -- one at the beginning when Illumination turns on -- and again at the end when the user responds. Then you subtract them to find out the difference in time.
Also, you need to divide this number by 1000 to convert from milliseconds to seconds. You have the divide by 1000 reversed.
10-14-2011 02:21 PM
Other than that, you're off to a pretty good start. (Don't worry too much about the sequence structure. It's appropraite in this situation because you want to be 100% certain of the order of execution.)
Now, you just need to collect the remainder of the data and save it to a file. The way I like to do it is to collect all the data and header information into a string with the 'concatenate strings' function (and put Tab characters between each piece of data.) Display this string on the front panel so you can run it over and over again and make sure it works the way you want. Only after you're happy with the content and formatting of the string should you plug it into a Write to File function.
10-14-2011 07:56 PM - edited 10-14-2011 08:02 PM
@LandBelenky wrote:
Other than that, you're off to a pretty good start. (Don't worry too much about the sequence structure. It's appropraite in this situation because you want to be 100% certain of the order of execution.)
Now, you just need to collect the remainder of the data and save it to a file. The way I like to do it is to collect all the data and header information into a string with the 'concatenate strings' function (and put Tab characters between each piece of data.) Display this string on the front panel so you can run it over and over again and make sure it works the way you want. Only after you're happy with the content and formatting of the string should you plug it into a Write to File function.
Flat sequence structures are rarely a good design choice except for the most basic sequences. You are always better off going with a state machine as a design choice. It is much more flexible and easier to maintain. Often one will write an application and think they have considered everything they need to do. Overtime new features are added and working with flat sequence structures becomes a nightmare. LabVIEW has a way to control execution sequence; it's called data flow. It is a VERY powerful control mechanism once you have learned to use it effectively.
I am a firm believer of teaching people good habits from the start. Once bad habits are developed they are very difficult to break.
Also, I question the one frame with the Wait VI. The Wait will progressive getting longer with every loop iteration since it is using the i value of the loop. This will not give you an accurate time for when the stop button is pressed. A short, consist timeout would be preferred. For example, if the user grabs a cup of coffee and comes back after a minute has elapsed they will have to wait a full minute again after they hit the stop button. This would not give you the accurate time of when the user hit the stop button. It gets even worse with longer delays before the stop button is hit.