LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

match pattern: change regular expression search via front panel?

Hello,

I have an application that I am developing which is making use of Serial VISA.

I am scanning the output of a serial port which is constantly spitting out a long string of data. 
Data is being pulled from the string with several combinations of SCAN FROM STRING functions and MATCH PATTERN Functions.

Question:
How can I use a button or TEXT box on the FRONT PANEL that can change the MATCH PATTERN Functions Regular expression?  

for example the string may spit out the following:
 Weight\s\s\s\s\s\s\s\s\s\s\s\s-0.00\slb\s\s\s\s\s\s-16\sbits\s+74.40\s\B0F\sCorrected\s\s\s\s\s\s-0.00\slb\s+0.999987\s%\s\r

in this case the serial device is spitting out data in LB.
It could be possible for the device to spit out data in KG ... thus I need to change the REGULAR EXPRESSION.



Thank you for your time

0 Kudos
Message 1 of 3
(2,532 Views)
Hi,

just a quick example.

there are other way of doing this but I think the ComboBox is quite an easy one.

hope this helps 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 3
(2,521 Views)
wow
cant get easier than that!




Thanks

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