10-15-2013 03:32 PM
Hi,
I have 3 input parameters. One is a random value .
Inside a loop I read this random value . bsed on this value I would like to select between the other parameters.Let me use an example.
X is the random value. Y and Z are the other 2 parameters.
1- In the first iteration if X is greater than previous X , I would like to show the value of Z
2- In the second iteration If X< greater than preious X then I would like to keep showing Z if not I show Y
3- ( lets say we are showing y) In the 3rd iteration If X< greater than preious X then I would like to keep showing Y if not I show Z
So as said the value of X is used to toggle between Z and Y so when the condition is met we keep showing y or Z if not we show the other parameter.
Could you please help me to implement this logic in LV
Thanks
10-15-2013 03:40 PM
Tried anything yet?
You can do some logic and ranges in the case structure if the input is a number.
You can also pull up/down the shift register terminals to get the previous n entries of the shift register.
10-15-2013 03:54 PM
Hi SnowMule,
I have used shift register for X so I continuously read X and compare it with the previous X , but I don't know how can I relate that to select Y and Z. I don't want to select Y and Z if the result is true or false. I would like to continue reading one of them if the condition is true and then read the other one if the condition is false
10-15-2013 04:28 PM
I have attached my vi but it is not working in a way that I like
Now when the condition is true I see A and when not I see B
But I would like to see A or B as long as the condition is true and switch to the other one if the condition is false
10-15-2013 05:21 PM
You only need a shift regsiter with a single output, your solution seems a bit convoluted. 😉
Anyway, if you want to switch whenever the comparison is false, here's what you would do. Modify as needed.