01-21-2007 06:36 AM - edited 01-21-2007 06:36 AM
Message Edited by ahlers01 on 01-21-2007 06:38 AM
01-23-2007 03:26 AM
01-25-2007 01:22 PM
@TomBaum wrote:
Hi ahlers01,
When you want to use 'Scan from String' VI to read out numbers the standard format specifier for separator characters depends on your local settings. If you want to read out numbers with separator characters which don't agree with your local settings you have to overwrite the format specifier. For reading numbers like 1,23 use the format specifier '%,;%g' and for 1.23 use '%.;%g'. You can also look this up in the LabVIEW help topic Format Specifiers Syntax Elements.
When you use 'Scan String for Token' VI the standard format specifier for separator characters is '.'. If you want to read out nubers like 1,23 you have to overwrite the format specifier (operator), use '%;%g' for both types of numbers. Otherwise you use the format specifier like shown above.
Regards
TomBaum
01-25-2007 02:55 PM
01-25-2007 03:24 PM - edited 01-25-2007 03:24 PM
I also agree that you don't need to define any tokens because you have delimiters in place. 🙂
If the string were "find1.23in string" (notice no delimiters around the number!), a %g on a US computer will still produce the desired result (see image), but will fail with a string input of "find1,23in string". Unfortunately, it seems we cannot switch the decimal seperator with a token of "%,;%g", the number will no longer get recognized and we only get two elements in the output ("find1.23in" and "string").

Somebody would need to test on a computer set to "," to see how things work.
It would be great if the token string would accept switching with "%,;" and "%.;", respectively. 🙂 (there is always the product suggestion center;))
Message Edited by altenbach on 01-25-2007 01:26 PM
02-08-2007 11:10 AM

02-08-2007 11:28 AM

02-12-2007 04:36 AM