취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

convert engineering string into a number

Hello,
How can I convert an engineering string into a number with a floating point without loosing precision ?
 
Thank you
labview 7.0
0 포인트
1/15 메시지
4,632 조회수
Sorry for the draft but I'm looking for something tlike this :
labview 7.0
0 포인트
2/15 메시지
4,619 조회수
Well, you've made a simple task fairly complicated. What's wrong with using either Scan String or Fract/Exp String to Number? Also, don't confuse the precision of the conversion with the number of digits displayed. Right click on a numeric indicator and select Format & Precision to change the display.
3/15 메시지
4,614 조회수

The last VI I have done is this one (see attached file)

 

In fact it's so easy with changing directly the format and precision!!! thank you 😉

labview 7.0
0 포인트
4/15 메시지
4,604 조회수

What Dennis meant is that you can use "Fract/Exp String to Number" for everything, no need to jump through all these hoops!!! 😄

It can handle all kinds of inputs with full precisions (e.g. 1234, 4.5E-12 (upper case "E"), 1.23456789e12 (lower case "e"), etc.) The attached example shows a few possible inputs together with the numeric output formatted two different ways.

(You seem to convert all decimal points to commas, thus you probably use a non-US OS (German?). If all your strings have decimal points instead of commas, you can just disable the local decimal point in "Fract/Exp String to Number" as shown. Your version actually does not work correctly on an US computer, because the commas are not recognized as decimal separator here.)

Message Edited by altenbach on 07-20-2005 12:59 AM

0 포인트
5/15 메시지
4,597 조회수
Hello alten ,
 out of curiosity i would like to know  . How did you get two different formats of  indicators (one in scientific and the other in floating ), connected to one terminal in the program 'convert engineering string into a number'.
regards
renault
 
0 포인트
6/15 메시지
4,584 조회수
Hello renault,

you can connect more than one data sink to a data source...

The formatting is done in the indicator (right click on the numeric indicator inside the arrays, properties or format&precision).


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 포인트
7/15 메시지
4,576 조회수
Thanks Gerd . got it .
0 포인트
8/15 메시지
4,574 조회수
A really neat part is that all the stuff the other guys have been telling you about can also be done programatically using property nodes so if you are writing a GUI you could have an indicator change its format and precision based on the value its displaying...
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 포인트
9/15 메시지
4,473 조회수
And the winner for the LabVIEW code obfuscation is: 매우 기쁨 이모티콘
0 포인트
10/15 메시지
4,558 조회수