LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically randomize position of ring pictures

Hi,

I wanted to randomize position of ring pictures. I succeed. I wanted also, when a user clicks on any picture, the picture make invisible and repeat this until only one picture remains.
Now, What I want to do is to randomize position for each trial. Here, in the code I send you when a user clicks on one picture, the position of remained pictures doesn't randomize after. How can I do?

Then, another problem, if it is not too hard for you, I want the VI stops if the user doesn't click on any figure within 5 seconds for example (I used elapsed time Vi but it doesn't work).

Thanks in advance. 
0 Kudos
Message 1 of 18
(3,514 Views)

Hi Nousome,

You may want to take a look a the example I have linked to in post #4 of this thread.

http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true

It shows you how to move a random number of objects around on a picture control and makes them each disappear under the appropriate conditions.

If you adapt that example with a detection of where a user clicks on the pciture control, it sounds like your project is half done!

If you use this approach, please post an example of how you did it and I will add it to the collection.

"Trying to teach you how to fish"

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 18
(3,514 Views)
Thanks I will look at this.
0 Kudos
Message 3 of 18
(3,501 Views)
Sorry Ben, I an a beginner and I don't understand very well your code, it is a little more complicated for me. Could you look at the Vi I sent, please?
0 Kudos
Message 4 of 18
(3,490 Views)
Sorry Ben, I an a beginner and I don't understand very well your code, it is a little more complicated for me. Could you look at the Vi I sent, please?
0 Kudos
Message 5 of 18
(3,472 Views)

Hi Nousome

randomizing a picture position is different from having different views of the picture control.

look at my other example, I'm not usisng the picture position at all and still show all possibilities.

You only need two picture rings and eventually move them around.

Stop using so many controls and indicators.

greetings from the Netherlands
0 Kudos
Message 6 of 18
(3,469 Views)

Of course, sorry I express badly what I did. I didn't change the positions of rings but change only presentation of picture into the ring (which contains all posibilities). I display 4 rings because I want them to be displayed all simultaneously.

My problem is to activate random number after each time the subject clicks on one picture. Here, the random number is active only at the beginning, I don't succed to reiterate it despite trials to use in a while loop or for loop.

0 Kudos
Message 7 of 18
(3,460 Views)
is this what you were trying to do.
tell me if you need anything else
0 Kudos
Message 8 of 18
(3,452 Views)

thanks a lot, it works almost like I want. The only problem I discover when I simulate the vi is when the subject clicks on a rectangle, for example, it is the rectangle I want to eliminate and not only the ring picture. The random cannot reactualize the number that it has to select.  I don' think at that before.     

 

0 Kudos
Message 9 of 18
(3,448 Views)
So maybe the solutions is to randomize position of pictures (which contain each only one shape). But is it possible to randomize position of a control?  
0 Kudos
Message 10 of 18
(3,436 Views)