LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Action on change

Hi,
 
I have the VI program as show in attachment.
 
I am entering data in the matrix POINTSX and POINTSY. When I click the OK button, I would like to compute the value of Q1,Q2,etc as shown.
 
I made a case with "Value change" (I also tried "Mouse up and Mouse down").
 
The problem is that when I click OK once, nothing happens. I have to click two times for my Qi to compute...
Is there a way that I can click only once to compute the Qi?
Is there a way that when I click OK, it goes to 1 and then return to his initial state without clicking twice?
 
Thank you very much,
 
Jack
0 Kudos
Message 1 of 6
(2,910 Views)
You need to place the terminals of the two array controls inside the event structure.
 
(Right now they get read at the start of the loop and not after the event executes.)
 
If the OK button is set to latch action, it should also go inside the event case for the same reason. This way it will properly reset.
0 Kudos
Message 2 of 6
(2,906 Views)

Hi,

Thank you very much, it's working !!!

I don't have to put the OK button in the event case structure.

Thank you again!

Jack

0 Kudos
Message 3 of 6
(2,869 Views)

Hi,

I would have another question...

The process with my OK button works. When I click on it, my XY data are transfer in Q1,Q2.

I would like to have a SAVE button that would also transfer data but would save them in a file. The problem is that if I make a case (SAVE: Value change), I can take back my XY points because they are inside de OK case....

Is there Anything I can do??

Thank you very much,

Jack

0 Kudos
Message 4 of 6
(2,847 Views)
ReHi,
 
If it's not possible for the SAVE button to transfer data and to save, is it possible just to save XY points?
 
Thank you very much,
 
Jack
0 Kudos
Message 5 of 6
(2,843 Views)

ReReHi,

I think I found a way with the local variables.

Thank you anyway!

Jack

0 Kudos
Message 6 of 6
(2,836 Views)