YoungSchola Posted October 26, 2011 Report Share Posted October 26, 2011 Howdy, I am having trouble coding a VI. I am wishing to make boolean based vi in which the user has to select a choice which color is brighter or dimmer? I want to randomize the choices so that it isn't always making a higher choice or alternate the presentation. I want to record the time of presses with the millisecond counter vi. I also want to record the number of correct and incorrect choices so that if they get 3 correct the colors seem closer in brightness and shift the color choices close to matching after 3 correct guesses until they get 3 incorrect guesses. Any insight on how to do this would help greatly. Thanks, Schola Quote Link to comment
Aristos Queue Posted October 26, 2011 Report Share Posted October 26, 2011 As is standard with these requests, please post your initial attempt at writing the VI and then we can help make adjustments, but we cannot help with nothing to start from. Quote Link to comment
YoungSchola Posted October 27, 2011 Author Report Share Posted October 27, 2011 I have attached the file. I want to store the number of times the boolean is pressed. Also I want to make other conditions so if the individual does not select the right choice it goes to a previous condition. For example, if the person selects the wrong choice in "psychometric 2" then it goes to the "psychometric " vi or condition. Any coding help would be GREATLY appreciated. Pyschometric_color_all.vi Pyschometric_color_all2.vi Quote Link to comment
Aristos Queue Posted October 28, 2011 Report Share Posted October 28, 2011 The easiest way to count the button presses is to use the Event Structure, like this: Every time the button gets pressed, the value in the shift register gets incremented by one. Look at some example files (use Help >> Find Examples... in the menus) of usages of the Event Structure. You probably also want to combine this with a basic state machine pattern. You essentially have 3 states: "Draw the two colors", "wait for button to be pressed", "Evaluate results". You can code that up like this: In the "Wait For Buttons" case, put the Event Structure. In each case, you decide which frame you want to happen next. Sometimes it will be a fixed constant, sometimes there will be some decision about which frame to go to next. This is the state machine pattern and there are lots of good examples of it, also, in the Example Finder. Good luck. 1 Quote Link to comment
YoungSchola Posted October 28, 2011 Author Report Share Posted October 28, 2011 Thanks a bunch!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.