LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search a Text-String for two possible outputs result strings embedded in the text.

I am trying to search a string that outputs result as "Sucess" or "Failure". I am configuring a device using command prompt, and I get a text based result as shown on the front panel after the configuration has been done successfully, namely the following:
 
C:\SHOAB\HCE-ME_Functional_Tester\LABVIEW_DEVELOPMENT\DIGI-ME-FCT\ConfigLoad>connectprog /upload /destip=192.168.192.211 /config=C:\SHOAB\HCE-ME_Functional_Tester\LABVIEW_DEVELOPMENT\DIGI-ME-FCT\ConfigLoad\ME211Prod.rci /username=root /password=dbps /reboot
Digi Connect Programmer
Version 1.3.19.0
Copyright 2003-2005 Digi International Inc.
Device found
Connect to device: SUCCESS
Read configuration file: SUCCESS
Upload configuration C:\SHOAB\HCE-ME_Functional_Tester\LABVIEW_DEVELOPMENT\DIGI-ME-FCT\ConfigLoad\ME211Prod.rci: SUCCESS: Some settings may require a reboot.
Reboot device:
SUCCESS
 
I need to make sure that the device returned a "SUCCESS" in the three areas as highlighted in RED above. For this task, in the block diagram as you will see, I am trying to search for the three "Success" confirmations from the device (highlighted in RED above). I am not able to find any help on how to search for a string of characters, that could be either success or some other text.
 
Can someone throw some light on it, as the LABVIEW help files do not explain in depth if there is a way to search for a string that can vary. Although there exists a similar example on Ping test, but there since only one numeric characted is being seached its easy. But in my case, am not sure how the syntax would work. So I need some help here.
 
Thanks,
 
Shoab
Download All
0 Kudos
Message 1 of 3
(2,785 Views)
I attached a vi that should work (assuming your data format is consistent).

For some infomation on regular expressions (which is what I used)
http://www.regular-expressions.info/tutorial.html
looks like it might be good,
The book Mastering Regular Expressions is very good but complete overkill for most things.


Matt
Message 2 of 3
(2,783 Views)

Worked like a charm, as my output is consistent. I had spent quite some time, trying to figure that one out.

Thank you very much for you prompt and accurate help.

Shoab

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