LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writetospreadsheetfile.vi writes only single digit for 0 to 9 eventhough the array was configured for double precision

When writing an array of numeric values to a text file using writetospreadsheetfile.vi, the following observation was made.
 
Expected output : 3B BA 96 00 81 31 86 5D 00 64 05 60 02 03 31 80 90 00 66
Actual output      : 3B BA 96   0 81 31 86 5D   0 64   5 60   2   3 31 80 90   0 66
 
I have changed the display properties of the array, to show 2 digits. But in FP, it displays proper expected output, but in text file, its writing just single digit value for 0 to 9. Is it the expected behaviour? Or am i missing something?
 
Thanks,
Mathan
0 Kudos
Message 1 of 9
(3,219 Views)
To get it in hex use %02X.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 3 of 9
(3,207 Views)
Yes, you are right. From the data shown, he probably wants %02x. The crucial point is the leading zero.
 
(I was probably somewhat confused by the actual datatype with "double precision" in the title, which is something completely different. :D)
Message 4 of 9
(3,188 Views)

Thanks pals,

It works.

Mathan

0 Kudos
Message 5 of 9
(3,175 Views)
Dears,
 
Unexpectedly, it didn't worked. Sorry, last time i was in a hurry and didn't checked that much.
Please correct me.
 
 
Thanks,
Mathan


Message Edited by mathan on 08-13-2008 01:29 AM
0 Kudos
Message 6 of 9
(3,135 Views)

Dears,

Am very sorry. In my first post in this thread, i mentioned as array of numeric values. But its actually an array of string values.

Thanks,

Mathan

0 Kudos
Message 7 of 9
(3,129 Views)
You have an array of strings. You need to convert them to numerics first.
Message 8 of 9
(3,127 Views)
For example like this:
 


Message Edited by altenbach on 08-12-2008 11:48 PM
Message 9 of 9
(3,123 Views)