ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tabellenstring nach Array Problem

Hallo!

 

Ich habe einen String der Form "-2.1234, 1.12314,---,---".

 

Sollte die Zahl positiv sein, dann ist statt dem - Zeichen ein Leerzeichen im String. --- kann jeweils auch eine Zahl enthalten.

 

Wenn ich die Funktion Tabellenstring nach Array verwende, kann ich als Trennzeichen "," angeben und bei Format String "%.;%f". Das funktioniert soweit auch ganz gut, nur dass immer nach der dritten Nachkommastelle abgeschnitten wird.

Ein "%.;%.2f" erzeugt genauso 3 Nachkommastellen. Die --- werden einfach als 0 interpretiert und stellen kein Problem dar.

 

Was mache ich falsch? Soweit ich es verstanden habe, sollte bei %f immer sechs Nachkommastellen verwendet werden.

 

Vielen Dank für die Hilfe

 

Christoph

0 Kudos
Message 1 of 5
(3,466 Views)

Did you adjust the display format of your indicator to show all desired digits?

 

If this does not help, please attach some illustrative code.

Message 2 of 5
(3,465 Views)

Works just fine here: (this is on a US computer) I set the indocator to show 6 digits of precision.

 

Message Edited by altenbach on 09-17-2008 09:09 AM
Message 3 of 5
(3,462 Views)

Hey,

 

Thanks for your reply! I actually didn't check how many digits the indicator is showing. 

 

But i bet this is the problem. I was quite tired when i was doing this. Smiley Wink

 

I will check it next monday when I'm back to the office.

 

Thanks again for pushing me to the right direction.

 

Christoph

0 Kudos
Message 4 of 5
(3,444 Views)

Hey,

 

the problem was that it showed only 6 significant digits and not 6 digits after the comma.

 

Thanks again

 

Christoph

0 Kudos
Message 5 of 5
(3,415 Views)