RE: Fw: Language Independence on Serial Output of .

2004-03-10 Thread Holland, Guy
Greg,
You're right that I'm using the format to string.vi.  In my case I should've used the 
%.; when formatting.  I would've never known there was an issue until our new FSE 
from Belgium couldn't get the application to work on his laptop.  Anyways, the 
suggestions from Irene, Richard, Michael, Stephen and yourself have helped me solve 
the problem.  

Thanks again,

Guy

-Original Message-
From: Greg McKaskle [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 7:57 PM
To: [EMAIL PROTECTED]
Subject: Re: Fw: Language Independence on Serial Output of .


 This is great information.  I think I will have to use both yours and Richard 
 Mahoney's advice.  Your suggestion will work for the mean time but I think 
 the solution is to use Richard's format specifier %.; suggestion. Actually, 
 I think the ultimate solution would be for NI to transparently do this 
 formatting so I don't have to.  If I send a . why would I want it to be 
 anything else other than a .? 
 

It is hard to tell from your original post, but the decimal substitution 
shouldn't be happening except when formatting numeric values to string, 
when displaying elsewhere in the UI like on scales, and when scanning 
from string.

So ideally, you want your numerics displayed in text to match the rest 
of the OS locale.  The problem is when you start communicating with 
instruments, they don't know about locale and want things to use the 
period for decimal.

So, if you don't care about the UI display of numerics and scales, and 
you want everything to be periods, set the Option to ignore the locale 
and use periods.

If you do care about the UI, keep the locale setting and remember that 
when writing to instruments to use the % code to specify the decimal for 
that format.  The % code is in the dialog for string formatting by the 
way.

Greg McKaskle




Re: Language Independence on Serial Output of .

2004-03-09 Thread Rolf Kalbermatter
Holland, Guy [EMAIL PROTECTED] wrote:

I have an application that outputs a string with numbers via the serial
port.  Ex. SG1.23,4.56,7.89.  I developed the application in English
but when the application was installed onto a Non-English say Holland
language, the output string turns into SG1,23,4,56,7,89.  The periods
are replaced with commas.  I believe it might happen with all languages
that use commas ($1,00) rather than periods ($1.00).  How can I get around
this problem so that my application can be language independent?

You have a couple of options:

1) Change the International Settings in your Control Panel (will affaect
   all applications on that computer)
2) Change the LabVIEW global settings (disable Options-Misc-Use
   localized decimal point) (This will affect all string formatting
   functions in your application. You can also add the according setting
   useLocalizedDecimalPoint=False to your application INI file.)
3) Define with each formatting command what format to use by prepending following:
   %.; use decimal point
   %,; use decimal comma
 

This is great information.  I think I will have to use both yours
and Richard Mahoney's advice.  Your suggestion will work for the
mean time but I think the solution is to use Richard's format
specifier %.; suggestion. Actually, I think the ultimate solution
would be for NI to transparently do this formatting so I don't have
to. If I send a . why would I want it to be anything else other
than a .? 

Not sure what you mean. Mind reading software hasn't been developed yet ;-)

Rolf Kalbermatter
CIT Engineering Nederland BVtel: +31 (070) 415 9190
Treubstraat 7H  fax: +31 (070) 415 9191
2288 EG Rijswijkhttp://www.citengineering.com
Netherlands mailto:[EMAIL PROTECTED]




Language Independence on Serial Output of .

2004-03-08 Thread Holland, Guy
I have an application that outputs a string with numbers via the serial port.  Ex. 
SG1.23,4.56,7.89.  I developed the application in English but when the application 
was installed onto a Non-English say Holland language, the output string turns into 
SG1,23,4,56,7,89.  The periods are replaced with commas.  I believe it might happen 
with all languages that use commas ($1,00) rather than periods ($1.00).  How can I get 
around this problem so that my application can be language independent?

TIA,

Guy Holland
Intralase Corp.




Re: Fw: Language Independence on Serial Output of .

2004-03-08 Thread Irene He
 - Original Message - 
 From: Holland, Guy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 08, 2004 12:15 PM
 Subject: Language Independence on Serial Output of
 .
 
 
 I have an application that outputs a string with
 numbers via the serial
 port.  Ex. SG1.23,4.56,7.89.  I developed the
 application in English but
 when the application was installed onto a
 Non-English say Holland language,
 the output string turns into SG1,23,4,56,7,89. 
 The periods are replaced
 with commas.  I believe it might happen with all
 languages that use commas
 ($1,00) rather than periods ($1.00).  How can I get
 around this problem so
 that my application can be language independent?
 
 TIA,
 
 Guy Holland
 Intralase Corp.
 
 

You can go to control panel-Regional Options-Numbers
tab to change the Decimal Symbol to . instead of
'. But that will affect all the decimal numbers on
that computer. So may not be the best way to handle
it. Unless you can retrieve what the decimal symbol is
used in a computer, then you can programmatically
change your command string to match that settings or
you have to make up a list of all the contries that
use , for decimal numbers so that you can set the
strings correctly depends on the user input what
country they are. I know Germany use ' instead of
. too at least.


=
Irene He
[EMAIL PROTECTED]
msn Messenger ID: [EMAIL PROTECTED]
www.hytekautomation.com
www.geocities.com/irene_he




RE: Language Independence on Serial Output of .

2004-03-08 Thread Mahoney, Richard C
Guy,
If you use a format specifier of %.; to format your code prior to sending it out, 
you wont have this issue.
If you don't use any format, the system default will be used. and different systems 
will have different defaults.
To strictly control this format to be the same everywhere, add the format identifier. 
Refer to the 
localization code entry in the Help reference...
HTH 
Rick M. 
Lockheed Martin Corp.

 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Holland, Guy
Sent: Monday, March 08, 2004 12:15 PM
To: [EMAIL PROTECTED]
Subject: Language Independence on Serial Output of .


I have an application that outputs a string with numbers via the serial port.  Ex. 
SG1.23,4.56,7.89.  I developed the application in English but when the application 
was installed onto a Non-English say Holland language, the output string turns into 
SG1,23,4,56,7,89.  The periods are replaced with commas.  I believe it might happen 
with all languages that use commas ($1,00) rather than periods ($1.00).  How can I get 
around this problem so that my application can be language independent?

TIA,

Guy Holland
Intralase Corp.




RE: Fw: Language Independence on Serial Output of .

2004-03-08 Thread Holland, Guy
Irene,

This is great information.  I think I will have to use both yours and Richard 
Mahoney's advice.  Your suggestion will work for the mean time but I think the 
solution is to use Richard's format specifier %.; suggestion. Actually, I think the 
ultimate solution would be for NI to transparently do this formatting so I don't have 
to.  If I send a . why would I want it to be anything else other than a .? 

Thank you,

Guy


-Original Message-
From: Irene He [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 9:49 AM
To: [EMAIL PROTECTED]
Cc: Holland, Guy
Subject: Re: Fw: Language Independence on Serial Output of .


 - Original Message - 
 From: Holland, Guy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 08, 2004 12:15 PM
 Subject: Language Independence on Serial Output of
 .
 
 
 I have an application that outputs a string with
 numbers via the serial
 port.  Ex. SG1.23,4.56,7.89.  I developed the
 application in English but
 when the application was installed onto a
 Non-English say Holland language,
 the output string turns into SG1,23,4,56,7,89. 
 The periods are replaced
 with commas.  I believe it might happen with all
 languages that use commas
 ($1,00) rather than periods ($1.00).  How can I get
 around this problem so
 that my application can be language independent?
 
 TIA,
 
 Guy Holland
 Intralase Corp.
 
 

You can go to control panel-Regional Options-Numbers
tab to change the Decimal Symbol to . instead of
'. But that will affect all the decimal numbers on
that computer. So may not be the best way to handle
it. Unless you can retrieve what the decimal symbol is
used in a computer, then you can programmatically
change your command string to match that settings or
you have to make up a list of all the contries that
use , for decimal numbers so that you can set the
strings correctly depends on the user input what
country they are. I know Germany use ' instead of
. too at least.


=
Irene He
[EMAIL PROTECTED]
msn Messenger ID: [EMAIL PROTECTED]
www.hytekautomation.com
www.geocities.com/irene_he




RE: Fw: Language Independence on Serial Output of .

2004-03-08 Thread stephen . mercer




 If I send a . why would I want it to
 be anything else other than a .?

Because the person who wrote it down was working in Language A and the
person who read it later was working in Language B. LabVIEW does
transparently handle things for you -- it handles the localization issue so
that you do not have to detect which language you're working in to
correctly display the information. Your original e-mail asked how you could
make your application language independent. What you really want is how to
make your program language dependent -- as in, it always displays in a
particular language's formatting regardless of what machine the code is
running on.

Pojundery,
Stephen R. Mercer
-= LabVIEW RD =-




RE: Language Independence on Serial Output of .

2004-03-08 Thread Michael Aivaliotis
Don't change anything in your OS or code.
Just add the following in your LabVIEW.ini file:

useLocaleDecimalPt=False

Add the above to your application (exe) ini as well.
I had the same problem for a German install.

Thank You
Michael Aivaliotis
http://forums.lavausergroup.org

 I have an application that outputs a string with numbers via 
 the serial port.  Ex. SG1.23,4.56,7.89.  I developed the 
 application in English but when the application was installed 
 onto a Non-English say Holland language, the output string 
 turns into SG1,23,4,56,7,89.  The periods are replaced with 
 commas.  I believe it might happen with all languages that 
 use commas ($1,00) rather than periods ($1.00).  How can I 
 get around this problem so that my application can be 
 language independent?




Re: Fw: Language Independence on Serial Output of .

2004-03-08 Thread Greg McKaskle
 This is great information.  I think I will have to use both yours and Richard 
 Mahoney's advice.  Your suggestion will work for the mean time but I think 
 the solution is to use Richard's format specifier %.; suggestion. Actually, 
 I think the ultimate solution would be for NI to transparently do this 
 formatting so I don't have to.  If I send a . why would I want it to be 
 anything else other than a .? 
 

It is hard to tell from your original post, but the decimal substitution 
shouldn't be happening except when formatting numeric values to string, 
when displaying elsewhere in the UI like on scales, and when scanning 
from string.

So ideally, you want your numerics displayed in text to match the rest 
of the OS locale.  The problem is when you start communicating with 
instruments, they don't know about locale and want things to use the 
period for decimal.

So, if you don't care about the UI display of numerics and scales, and 
you want everything to be periods, set the Option to ignore the locale 
and use periods.

If you do care about the UI, keep the locale setting and remember that 
when writing to instruments to use the % code to specify the decimal for 
that format.  The % code is in the dialog for string formatting by the 
way.

Greg McKaskle