10-27-2015 11:28 PM
Hi, everyone
I am very new here and need your suggestion.
I am doing a project on cursor control by using eeg signal. First, I need to develop a stimulus display by creating a blinking buttons in random order. Now, I can create the blinking button at the same time, but I dont know how to make it randomly and notify the random sequences to me. below is my blinking buttons VI.
For example, if button1 finished blinking, button 3, 2, and4 will blink respectively randomly. There is only one button blinks in one time, cannot blink two or more buttons at the same time. Moreover, I want the program to notify me what is the sequeces when each button blinks like button1, 3,2,4,3,4,2,1,....
THank you for your suggestion in advance.
10-27-2015 11:44 PM
pardon.. if u make clear enough about your doubt, i think i will do help to my extent to make you clear..
10-28-2015 12:31 AM - edited 10-28-2015 12:53 AM
WARNING:
(Reported to moderator)
{Edit:} I have not seen any unusual problems but, I have never seen 2011 green primitaves either. if someone can point to an NI product where that is expected I'll wellcome the opportunity to learn
How about that? I've never seen a "Select" primative icon with terminals visable before.
(Who would DO that?) you really need to dig into the BD edit-time Right-click menus to even find that option? 15 years and I've never seen it.
10-28-2015 01:53 AM
Hi kuzing,
I want the program to notify me what is the sequeces when each button blinks like button1, 3,2,4,3,4,2,1,....
Wrong expectation…
You don't want to get "informed", you want to control the blinking sequence! You are the one who sets the blinking order and you are the one who has to program this!
I would suggest to limit your VI to just one loop. A state machine approach could be useful too…
10-28-2015 01:54 AM
10-28-2015 07:00 AM - edited 10-28-2015 07:01 AM
@kuzing wrote:
Thank you dhans, what I doubt is that how to make buttons blink randomly. if you open and run an attached file, you will see 4 buttons blinking at the same time. However, I want it to blink in random order and only one button. For example, after clicking on the Boolean text visible button (in the front panel), button 1(or 2,3,4) will blink, then button 3,2,4 respectively, and do it again randomly within 1 minute.
You have conflicting requirements here. Do you really want a random or do you want a set pattern?
I would use an array to show the buttons and then it is a simple Replace Array Subset to choose when one should light up.
10-28-2015 08:58 PM
Many thanks, GerdW and crossrulz,
I had a confliction of random order that I shoud create it first, now I can create it. thanks to all of your suggestions and youtube!!
10-28-2015 10:54 PM
state machine type program or randomm number creator type program will be helpful for you. if u chose state machine you would get continuous order of light blinking like 3,4,2,1,3,4,2,1........ But if you want random blinking without sequentially you may go for random number creator. Just try these types and you will surely get a result as you asked in this forum.
Note: you cannot predict which light is going to be blinking if you choose random number creator.
All the best. May be this answer is deserved kudos!!!!
10-29-2015 01:04 AM
Hi dhans,
why should a state machine only generate a fixed sequence of blinking lights? You can go in a random order - it all depends on your programming of the state switches!
But you can easily add states for user input checks, file storage, etc.!
10-29-2015 01:51 AM
Hi buddy, there should be some end in the state machine. After that it will start from initial. That is what i said. Between that span you can get random sequences.
I think so. Did i say wrongly?