08-19-2016 04:36 AM
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.
Solved! Go to Solution.
08-19-2016 04:41 AM
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.
08-19-2016 04:53 AM
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.
08-19-2016 05:32 AM
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!
08-19-2016 07:31 AM
@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.