LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to decimal rounding issue

Solved!
Go to solution

It took you only 3 minutes to figure out the answer.  I guess you finally got around to reading the posts immediately above yours. Smiley Wink

Message 11 of 27
(783 Views)
No. I was correcting my previous comment because I forgot to say what I replaced my Decimal String to Number block with. I still have not found a solution. Replacing that block gave the same result with bad error. I do not have access to my code but if I can figure out how to get a screenshot of it and post it, I can say what I think my problem might be, but that would be tomorrow morning
Message 12 of 27
(780 Views)

That certainly wasn't clear in your last post.  Fractional String to Number is the correct function to use.  It is unclear whether you are using a decimal point correctly, or using a comma in your number.  Your post lists the number both ways.  You may need to use the connector about using the System Decimal point.

 

You could also use either Scan from String Function or the Scan Value function.  They will let you more explicitly define the format of your incoming string based on a set of Format Codes.  (LabVIEW help will show you the codes.)

0 Kudos
Message 13 of 27
(778 Views)

Could you explain how to post a snippit of code? I know that's generally how it's supposed to go on here and it would help a lot to show exactly what I need

0 Kudos
Message 14 of 27
(766 Views)

Right now the string array is transposed and sent to Filter Input, and those results are fine, but as soon as it goes through the Decimal String to Number block, the number 32,768 rounds off to 32.00000. When I replaced the Decimal String to Number block with a Fract/Exp to Number block the same thing occured. Could the "Type" terminal on the Variant to Data block be changed to Numeric that way I don't even need to convert a string anymore? I've tried looking at the help for the Variant to Data, Decimal String to Number, and Fract/Exp to Number block and I am still having troubles. Also, the 2 that is attached to the Decimal String to Number block was just testing to see if that changed anything at all. I am just quite lost at this point. Thank you for any input. Much appreciated.

0 Kudos
Message 15 of 27
(758 Views)

LabVIEW 2011 allows you to create snippets from selected code. Please read the LabVIEW Help on how to create snippets. In fact, several of your questions would be answered if you actually read the LabVIEW Help.

 

Then, attach the picture that's created to a message.

0 Kudos
Message 16 of 27
(757 Views)

@Szklanam wrote:

blah... blah... blah...

 

attachment of a BITMAP!!!!!!!!!!!!!!.


DON'T POST BITMAPS!!!! DON'T CHANGE THE EXTENSION OF THE FILE TO GET AROUND THE BAN ON BITMAPS!!!!

0 Kudos
Message 17 of 27
(755 Views)

No need to be mean about it. I'm new to all of this so calm down. And you always say to look at the help but never say how to find it. I tried looking at LabVIEW help to get partial codes from a bigger VI and found nothing. So what should I search for?

0 Kudos
Message 18 of 27
(752 Views)

No need to answer. I found it from a different source

0 Kudos
Message 19 of 27
(749 Views)

@Szklanam wrote:

No need to be mean about it. I'm new to all of this so calm down.


I will not "calm down". If you're new to this, learn some posting etiquette. Don't you think there was a reason why there's a ban on bitmaps? Did you think it was just for fun? No, it's because the same file, when saved as a PNG, is only a fraction of the size.

0 Kudos
Message 20 of 27
(745 Views)