LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect value in string control

Solved!
Go to solution

Morning All,

 

As part of a serial data program I am creating, I now need to write values to a device. The user will enter the appropriate values into a string control, and press 'write'. Is there any sort of feature/ way that LabVIEW can automatically detect if there is a value in a string control.. If so, it gets written, if not, it gets ignored ?

 

Thanks,

 

Richard.

0 Kudos
Message 1 of 5
(3,926 Views)

I am not sure whether labview can do it automatcially, But if you eanble Update value while typing you can data immediately and check if it is valid or invalid

-Or can use event structure and throw error if the entered value is invalid.

Thanks
uday
Message 2 of 5
(3,915 Views)

How about using Value Signalling/ Value change in Event structure

If an String control is mapped to an event structure and whever there is a change in String conrol, it will trigger for the the event where you can make the state machine to Write to device state.

 

Make sure you are validating the data before sending to device as suggested by uday, as the data will be send to device as soon as it is typed where the user confirmation is minimal.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 5
(3,909 Views)

Well as simple as it sounds... I have found using the equals fucntion along with a string constant, can produce the result i am looking for!

0 Kudos
Message 4 of 5
(3,896 Views)
Solution
Accepted by topic author lvrichard

@lvrichard wrote:

Well as simple as it sounds... I have found using the equals fucntion along with a string constant, can produce the result i am looking for!


If you are just searching for an empty string, there is the Empty String/Path? primitive.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(3,876 Views)