Discussion:
writetospreadsheetfile.vi writes only single digit for 0 to 9 eventhough the array was configured for double precision
(too old to reply)
mathan
2008-08-05 04:40:06 UTC
Permalink
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 66Actual 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
altenbach
2008-08-05 05:40:05 UTC
Permalink
Try %02d as format.
waldemar.hersacher
2008-08-05 06:40:08 UTC
Permalink
To get it in hex use %02X.
altenbach
2008-08-05 16:10:07 UTC
Permalink
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)
mathan
2008-08-06 04:40:04 UTC
Permalink
Thanks pals,
It works.
Mathan
mathan
2008-08-13 06:40:06 UTC
Permalink
Dears,
 
Unexpectedly, it didn't worked. Sorry, last time i was in a hurry and didn't checked that much.
Please correct me.
 
<img src="Loading Image...">
&nbsp;
Thanks,
MathanMessage Edited by mathan on 08-13-2008 01:29 AM


Example_VI_BD6.png:
http://forums.ni.com/attachments/ni/170/348882/1/Example_VI_BD6.png
mathan
2008-08-13 07:40:18 UTC
Permalink
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
altenbach
2008-08-13 07:40:18 UTC
Permalink
You have an array of strings. You need to convert them to numerics first.
altenbach
2008-08-13 07:40:19 UTC
Permalink
For example like this:
&nbsp;
<img src="Loading Image..."> Message Edited by altenbach on 08-12-2008 11:48 PM


02x.png:
Loading Image...

Loading...