This can be accomplished by using the Format Into String function. You can either use the interactive 'Edit Format String' configuration pop-up or by directly specify the formatting options in a string constant.
Option 1: Edit Format String Configuration Pop-Up
This can be accomplished using the Format Into String
function in LabVIEW.
- Double-click the function to see the Edit Format String configuration pop-up.
- Choose Specify Decimal Point Character from the Selected Operation menu ring.
- Choose your decimal point (comma or period), then click on Add New Operation.
- Choose how you want to format the number from the Selected Operation menu ring.
- Click OK when you are done.
Option 2: String Constant
You can also create a string constant on the Format String
terminal and input %,;%f
.to default to a comma or %.;%f
to default to a period. This will accomplish the same functionality as using the configuration pop-up and results in a fractional number.Note
: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.