LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading value with comma or dot

Solved!
Go to solution

Hi,

I have one problem...I read parameters from the controller in the form of (0.900) with dot. The condition must be met when the value i read is greater than 0, but for me the condition is met only when the value is equal to 1 or more , so i made the code like this, replacing the dot with comma (see picture). Now it works fine on one computer and reads data even if it is 0.200 and the copndition is met but on the other computer the condition is met only when it is 1 or more. What is teh problem?

tominsek_1-1757919316260.png

 

 

0 Kudos
Message 1 of 3
(215 Views)

HI, 

I configured it by myself. Only problem was the regional format settings of computer.

0 Kudos
Message 2 of 3
(189 Views)
Solution
Accepted by topic author tominsek

Hi Tominsek,

 


@tominsek wrote:

Only problem was the regional format settings of computer.


Usually you don't have control over settings of other peoples computer!

 

It would be more safe to check the regional format in your VI and either

  • change from point to comma (or vice versa) in the string data
  • use ScanFromString with the correct format string of %.; or %,; (read the help on format strings!)
Best regards,
GerdW


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