LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How use property node of control in array of cluster?

Hi,
 
Here I send code that express more clearly the problem.
 
I will make an experiment and the subject has a task of clicking on the good shapes presented.
 
First, they have to click before on a red rectangle, that is following by either by 500 ms or 5000ms.
 
2 shapes are each once presented simultaneously and the user has to click (choose) on only once. 
 
One click to the good shape (noted here S+ HE or S+ LE, HE and LE corresponding respectively to prior event of 5000ms and 500ms of waiting after they have clicked on the rectangle) is followed by a beep and one click to the bad shape (noted S- HE, and S- LE) is followed by 5 seconds of timeout.
 
4 presentations of two shapes are programmed with 4 different shapes presented once at left and once at right. 
 
I used two rings one at left and one at right that contains all 4 shapes presented.
 
I was suggested to build an array of cluster and connect it in a while loop and a sequence structure to programm succession of presentations and events.
 
The problem I have is to correspond each event following click on the shape (beep or timeout period) to the good choice (good or bad). Here, it is the position that controls the following events (left: beep and right: timeout). But once the good shape is at right and once the good stimulus is at left.
 
So, if I can include in the array of cluster, the properties of position of rings control, so I can change the position of the ring, following trials and make my programming right.
 
I have also another problem. If you click more than once on the rectangle, the program bugs. I don't know why and how debugging.
 
I hope that is clear for you.
 
Thanks in advance for your help.          
 
 
 
  
0 Kudos
Message 1 of 9
(3,464 Views)
Hi,

I am not sure I understood it all but I think you should change the architecture of the code to make it clearer and easier to maintain.
I would go for a state machine with pre-determined order.

hace a look at the example attached

hope this help


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Download All
0 Kudos
Message 2 of 9
(3,451 Views)
Thanks for the suggestion. What i wonder is if we can include in the array of cluster property of position of rings control and change it dynamically according to the trial is running. 
0 Kudos
Message 3 of 9
(3,434 Views)
Yes it is possible 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 9
(3,430 Views)
Ok, thanks, I tried it but I didn't succeed. I intent to manually put the property node with his constant in the cluster but it didn't work.
0 Kudos
Message 5 of 9
(3,422 Views)
well, of course it did not work if you try to drag a property node into a cluster constant.

you have different possibilities depending on what you want to do...

here is an example.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 9
(3,419 Views)
Thanks, I will look at this.
0 Kudos
Message 7 of 9
(3,412 Views)

Hi,

 

I used the architecture you suggested me. I am glad but I have a problem with one state. The state is waiting a click on a picture. The vi bugs, I don't know why, this event functions correctly in another context. Here the code.

Thanks   

0 Kudos
Message 8 of 9
(3,389 Views)

Hi,

 

I used the architecture you suggested me. I am glad but I have a problem with one state. The state is waiting a click on a picture. The vi bugs, I don't know why, this event functions correctly in another context. Here the code.

Thanks   

Attachment paint renf.zip (837 kb)

0 Kudos
Message 9 of 9
(3,362 Views)