LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to decimal rounding issue

Solved!
Go to solution

The snippet squishes everything together

0 Kudos
Message 21 of 27
(646 Views)

@Szklanam wrote:

The snippet squishes everything together


what?

0 Kudos
Message 22 of 27
(631 Views)

Whenever I try and select the snippet of code, it adds a wire that goes up higher on my VI and pushes everything down to show both the wire and the blocks. Maybe it won't be squished when I send it. I guess we'll find out.

0 Kudos
Message 23 of 27
(629 Views)

There was a chunk of code that our equipment manufacturer had provided and the error was in one of the constants. Changed from a 5 to a 4 and the comma was causing the problem is no longer there, making everything else work fine.

 

0 Kudos
Message 24 of 27
(612 Views)

@Szklanam wrote:

Whenever I try and select the snippet of code, it adds a wire that goes up higher on my VI and pushes everything down to show both the wire and the blocks. Maybe it won't be squished when I send it. I guess we'll find out.



I've never seen that happen before.

 

But I also use the Code Capture Tool (CCT) which I find is much better than the Snippet option build into LabVIEW.

 

 

0 Kudos
Message 25 of 27
(600 Views)

Hi !!

 

I want to read the attached text file with the vi attached ...

But all the values after decimal poin are discarded.

 

 

I could do this in another computer but not in the computer in my lab ....I tried with the same file and vi in both computers.

 

 

Would anyone knows what to do??

 

 

is it a computer setting problem or some thing to do with labview?

 

 

 

Hasan

Download All
0 Kudos
Message 26 of 27
(545 Views)

It works fine for me.

 

(By the way, get rid of the While Loop)  There is no need to read the same file over and over as fast as the CPU will allow.)

 

I am going to take a guess at your problem.  Are you using a PC that uses a decimal "comma" rather than a decimal point?  The file uses a decimal point.  If your PC is set to use a comma for decimals, it is probably truncated at the decimal point because it doesn't understand what to do with it.

 

Look at the format settings in LabVIEW help.  To force a decimal point, you may need to add %.; to the beginning of your format string.  Otherwise, fix your windows regional settings to use a decimal point instead of a comma within control panel.

Message 27 of 27
(533 Views)