8:52 am
August 29, 2015
I want to convert a character string to a numeric using the decimal string to numeric function. The target is an Atmega2560 and the compiler is V1.0.0.18. LabView is V2014.
The examples below indicate my findings. If the input string starts with the first numeric character and the offset is 0, the conversion works correctly. If the input string starts with a non numeric character and the offset is set to 1 the conversion does not work.
The conversion fails when run on the target board, however the routine works correctly when checked in the LabView development environment.
Is this an incorrect use of the function?
Target - Atmega2560. Compiler - V1.0.0.18. LabView - V2014
2:54 pm
March 12, 2015
Please take a look at the help documentation on this primitive in the user manual (String Palette section). Unfortunately, the offset input is not handled at this time. You should be able to use String Subset to get just the numeric portion of a string before conversion, which is essentially the same thing as using an offset.
String Palette
NOTE: Offset input is ignored.
-Fract/Exp String to Number
NOTE: Offset and use system decimal point inputs are ignored.
29
1 Guest(s)