02-13-2020 04:12 AM
Hi everyone!
Now I'm doing that translate the string from analog value in real-time
ex) If, Value<30 = A , 30<Value<60 = B , 60<Value<100 = C
And then, I can show the string in real-time now
So, I want to write down that string one by one, when I push some botton!
please give me some advice for me !
02-13-2020 05:00 AM
Hi jdb,
@jdb8673 wrote:
Now I'm doing that translate the string from analog value in real-time
ex) If, Value<30 = A , 30<Value<60 = B , 60<Value<100 = C
And then, I can show the string in real-time now
So, I want to write down that string one by one, when I push some botton!
For your "ex)" you could use a simple Case structure to start. Keep in mind using floats for selector input isn't recommended.
Next step would be to use an array of your threshold values and use Threshold1DArray to find the corresponding index to select your string from a second array…
Showing a value "in real time" usually means to use a loop and read your input and create the output at regular intervals.
To save on "the push of a button" usually means to use either a case structure (and poll the button) or use an event structure…
02-13-2020 08:20 AM
What if your value is exactly equal to 30, or exactly equal to 60? Or 100 or greater?