LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write the string in labview

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 !

0 Kudos
Message 1 of 3
(2,167 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,153 Views)

What if your value is exactly equal to 30, or exactly equal to 60?  Or 100 or greater?

0 Kudos
Message 3 of 3
(2,122 Views)