LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a String to a decimal Value

Solved!
Go to solution

Hi guys,

 

I'm getting an input of data into labVIEW via serial communication (VISA VI), the data coming into labVIEW is in the form of a string, I'm unable to to convert this string to a decimal using the provided VI, but am having no luck. How would I go about this?

 

I'm a first year electronic engineering student working on my first year project, and require the use of serial communication to get my data from an external device into labVIEW.

- Cheers

Download All
Message 1 of 5
(950 Views)
Solution
Accepted by topic author RobotRyan

Your format string is wrong- "f" isn't a valid format. Press Ctrl-H and hover over the function and you can see the "quick help" and the "full help" for the function where you can look up format specifier syntax. You want "%f"- all valid formats begin with the % character.

Message 2 of 5
(945 Views)
Solution
Accepted by topic author RobotRyan

On your 'Scan Value' function, use '%f' instead of 'f'. That should work.

Message 3 of 5
(894 Views)
Solution
Accepted by topic author RobotRyan

Or here: Format Specifier Syntax - LabVIEW 2018 Help


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 4 of 5
(879 Views)

Hey RobotRyan,

Thank you for reporting back and marking the correct solutions! This now is the most solved thread I have ever seen 😉


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 5 of 5
(781 Views)