LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Wrong number format" error on Windows XP

Solved!
Go to solution

So I have this weird error where my labview program gives me this message at running:

 

-23085 occured at an unidentified location.

Possible reasons:

Analysis: Wrong number format.

But this is only on the lab PC, which runs Win XP (32bit). My development PC runs Win 7 64bit and the program runs smoothly whithout errors. Labview 2014 32bit is installed on both PCs.

 

Is there a general solution to this or is it rooted in my actual labview program?

Thanks for your suggestions!

0 Kudos
Message 1 of 4
(3,035 Views)
Solution
Accepted by topic author ihfg00685

Hi ihfg,

 

what kind of calculation is your program running? Did you try to debug that problem?

 

Did you check the regional settings of both computers? Do they use the same numeric formatting, especially regarding the decimal separator?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(3,021 Views)

Thank you very much! Obviously one has to take care of the right decimal separators.

Additionally I saw an option to turn off the regional system setting for number formats (options > front panel > general). Maybe this would help, too.

0 Kudos
Message 3 of 4
(3,008 Views)

Taking care to set the computer to a specific number format is one possibility. Disabling regional number format another. Both have the drawback to be pretty cumbersome and in the case of disabling regional number format to disable it for the whole application, which means the numbers will be anywhere treated with a decimal point and also displayed as such. That could be a serious user problem, as your application suddenly looks and behaves differently than the rest of the programs on that computer.

 

The best solution is to actually leave the regional setting enabled and treat the actual number conversion explicitly wherever needed. This basically means to use the option in the To and From String conversion functions to use a specific format or the regional setting format.

 

If the number comes from a device or needs to be written to one, always expect/use the specific decimal character. If the number is entered as string through the operator then use the regional dependent decimal character. If the number comes from a file or needs to go into one, then it gets trickier. The Microsoft sanctioned way is to always treat text files according to the regional settings of the current computer. That is often working since the file is quite often created or used on the same computer, but it obviously can fail if the file is transmitted from/to another computer. Here you need to specify in the documentation any special requirements about this.

 

The Scan from String and Format into String support a specific format specifier that when added to the format string will tell the function to use this decimal character for any floating point numbers that follow until another special format specifier is encountered.

 

%.; will use decimal point

%,: will use decimal comma

%; will use the regional specific decimal character

 

The older "... To String" and "... From String" function have a boolean input where you can ignore regional settings. This is less powerful since you only can choose between using the regional settings or using a decimal point. The explicit use of a Decimal comma is not an option there.  

Rolf Kalbermatter
My Blog
Message 4 of 4
(2,933 Views)