LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

number to fraction string +format value

Hi there,

I just met a stupid question which made me crazy, please help.

 

The question is simple:

 

Target: Numeric floating control-> number to fraction string -> format value -> desirable string format

 

For example: 20.00 -> 20.00000 (Q1: why extra 0s?)-> "20.00"

 

I use the following program:

 

 

3-5-2011 10-09-57 PM.png

 

why doesn't it work, please?

 

Thanks!

 

 

 

0 Kudos
Message 1 of 8
(5,292 Views)

Hi TriStones,

 

"Why it doesn't work?"

Because you haven't read the context help for "Number to fractional string"! Especially the sentences on those two additional inputs of that function (Q1)...

 

I would suggest using FormatIntoString like that:

check.png

(I tried to replicate your example, but your wiring is very bad: it's not clear which wire is connected to which input...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(5,279 Views)

Hi GerdW

 

Thanks!

 

“Because you haven't read the context help for "Number to fractional string"! Especially the sentences on those two additional inputs of that function (Q1)...”

 

May I ask which sentences....?

 

"your wiring is very bad"

 

Actually this is one of the best I have, I just find no way to improve, could you give me some suggestion???

0 Kudos
Message 3 of 8
(5,260 Views)

Use code cleanup tool. Or click on individual wires and do a Ctrl-B.  The problem was the wires you have going into the concatenate string function, particularly the space constant and the "Goto" constant.  The wires didn't line up with inputst to the function, so it was harder to tell than it should have been what the order of the strings were you were concatenating.

0 Kudos
Message 4 of 8
(5,257 Views)

Hi TriStones,

 

"May I ask which sentences....?"

Those sentences:

check.png

 

The point on bad wiring has already been explained by Raven...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(5,212 Views)

I want to display the number like this : 5.000 has to display 0005.0. Some one give the solution in Labview 8.5.

 

Anilkumar

0 Kudos
Message 6 of 8
(5,072 Views)

Hi Anil,

 

try this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(5,068 Views)

Thanks GerdW It works Fine.

 

Anil

0 Kudos
Message 8 of 8
(5,050 Views)