Possible bug: Saving array with extended and double precision to spreadshee​t

If one concatenates a double precision array and an extended precision array with the "build array" vi and then saves using "Write to Spreadsheet File" vi any digits to the right of the decimal place are set to zero in the saved file. This happens regardless of the format signifier input (e.g. %.10f) to the  "Write to Spreadsheet File" vi.
I am on Vista Ultimate 32 bit and labview 9.0
This is a possible bug that is easily circumvented by converting to one type before combining arrar to a spreadsheet. Nonetheless, it is a bug and it cost me some time.
Solved!
Go to Solution.
Attachments:
Spreadsheet save bug.vi ‏9 KB

Hi JL,
no, it's not a bug - it's a feature
Well, if you would look more closely you would recognize the "Save to Spreadsheet" as polymorphic VI. As this polymorphic VI doesn't support EXT numbers internally (it only supports DBL, I64 and String) LabVIEW chooses the instance with most accuracy: I64 (I64 has 64 bits precision, DBL only 53...). So your options are:
- set the instance to use as DBL (by right-click and "Select type...")
- make a copy of this VI, save it with a different name and make it support EXT numbers (don't rework the polymorphic VI as you would break compatibility with other LV installations or future revisions)
And yes, those coercion dots always signal some conversions - you should atleast check what's going on there...
Message Edited by GerdW on 05-21-2010 10:01 PM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • I have read 118 files (from a directory) each with 2088 data and put them into a 2 D array with 2cols and 246384row, I want to have aeach file on a separate columns with 2088 rows

    I have read 118 files from a directory using the list.vi. Each file has 2 cols with 2088rows. Now I have the data in a 2 D array with 2cols and 246384rows (118files * 2088rows). However I want to put each file in the same array but each file in separate columns. then I would have 236 columns (2cols for each of the 118 files) by 2088 rows. thank you very much in advance.

    Hiya,
    here's a couple of .vi's that might help out. I've taken a minimum manipulation approach by using replace array subset, and I'm not bothering to strip out the 1D array before inserting it. Instead I flip the array of filenames, and from this fill in the end 2-D array from the right, overwriting the column that will eventually become the "X" data values (same for each file) and appear on the right.
    The second .vi is a sub.vi I posted elsewhere on the discussion group to get the number of lines in a file. If you're sure that you know the number of data points is always going to be 2088, then replace this sub vi with a constant to speed up the program. (by about 2 seconds!)
    I've also updated the .vi to work as a sub.vi if you wa
    nt it to, complete with error handling.
    Hope this helps.
    S.
    // it takes almost no time to rate an answer
    Attachments:
    read_files_updated.vi ‏81 KB
    Num_Lines_in_File.vi ‏62 KB

  • C++: Is it possible using callback function with ncacn_http and rpcproxy server ?

    I have a remote procedure and I can call it using http over rpc. I pass trough an rpc proxy server for arriving to my rpc server.
    But I cannot call a callback function to my client inside the server function.
    Is it possible using callback function with ncacn_http and rpcproxy server ?
    We are using IIS on windows server 2008 R2 and the server rpc and the client on the same PC with rpc rpoxy.
    If I use ncan_ip_tcp all works fine.
    Thanks
    Gianluca

    Hi,
    About the develop question please post to the MSDN forum.
    MSDN forum Developer Network
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=WAVirtualMachinesVirtualNetwork&filter=alltypes&sort=lastpostdesc
    Thanks for your understanding and support.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • All MacBook Pro, iMac purchase in 2012 bug! starting with mine and those of all in Fnac st Lazare (France), try to open the keychain you will see ...

    All MacBook Pro, iMac purchase in 2012 bug! starting with mine and those of all in Fnac st Lazare (France), try to open the keychain you will see
    I've tried to open keychain first from my macbook pro because of Safari and Chrome, they still dont work in wifi unless Firefox, then I went to a Fnac (like Best Buy) and I try to open the keychain in all the iMacs exposed and everytime the application froze , to the macbook air at  the iMac all of them froze.

    Hello Kavans,
    Thank you for the details of the issue you are experiencing with your MacBook Pro.  I recommend reviewing the following article for this issue:
    Mac OS X: Why your Mac might not sleep or stay in sleep mode
    http://support.apple.com/kb/HT1776
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Populating a dynamic array with objects and managing it in runtime.

    So I'm another stuck firstyear. I'll try and make my question compact. I'm using Flash CS6 and have drawn an animated character on the stage that consists of separate parts that are animated and its head is a separate class/symbol entirely because it has not only animation, but a state switch timeline as well. This said Head extends the Main that is the character MovieClip.
    I am using a dynamic array to store and .push and .splice objects of another class that would collide with this said Head.
    I also discovered the super() function that is implicitly called as the constructor of the parent in any child class that extends the parent, in this case Head extends Main. The issue is that my collidable object array is populated within the main, within the function that spawns every next collidable object with a TimerEvent. This said function then gets called twice due to the super() call.
    I have tried putting this super() call into an impossible statement in my child class, but it doesn't change a thing, and it was said that this method is unsafe so I don't even know if it should be working.
    However what confuses me the most is when I trace() the .length of my collidable object array at the end of that function. As I said earlier, the original function both spawns an object after a period of Timer(1000) and adds it to the stage as well as adds the object onto the object array, but the super() constructor only duplicates the length call and a creates a copy of the object on the stage, but it does not add the second copy of the object onto the array. The trace() output goes on like so:
    1
    1
    2
    2
    3
    3
    4
    4
    etc.
    I wonder why and I'm really stumped by this.
    Here is the code in question:
    public class Main extends MovieClip {
                        public var nicesnowflake: fallingsnow;
                        var nicesnowflakespawntimer: Timer = new Timer(1000);
                        public var nicesnowflakearray: Array = new Array();
                        public function Main() {
                                  nicesnowflakespawntimer.addEventListener(TimerEvent.TIMER, nicesnowflakespawn);
                                  nicesnowflakespawntimer.start();
                        public function nicesnowflakespawn(event:TimerEvent) : void {
                                  nicesnowflake = new fallingsnow;
                                  nicesnowflake.x = Math.random()* stage.stageWidth;
                                  nicesnowflake.y = - stage.stageHeight + 100;
                                  nicesnowflakearray.push(nicesnowflake);
                                  stage.addChild(nicesnowflake);
                                  trace(nicesnowflakearray.length);
                                  for (var i:Number = 0; i < nicesnowflakearray.length; i++){
                                            nicesnowflakearray[i].addEventListener(Event.ENTER_FRAME, snowhit);
                        public function snowhit(event:Event) : void {
                                  if (nicesnowflakearray[0].y >= 460){
                                            if (nicesnowflakearray[0].y == stage.stageHeight) {
                                            nicesnowflakearray.splice(nicesnowflakearray.indexOf(nicesnowflake), 1);
                                  //if (this.hitTestObject(nicesnowflake)){
                                            //trace("hit");
    I am also fiddling with the collision, but I believe that it would sort itself out when I deal with the array pop and depop properly. However I'm pasting it anyway in case the issue is subtly hidden somewhere I'm not looking for it. And here is the child class:
    public class Head extends Main {
                        public function Head(){
                                  if (false){
                                            super();
                                  this.stop();
    So like what happens at the moment is that the array gets populated by the first object that spawns, but there is two objects on the stage, then when the objects reach stage.460y mark the array splices() the one object away and displays an error:
    "#1010: A term is undefined and has no properties.
              at Main/snowhit()"
    then when the next object spawns, it repeats the process. Why does it trace the array.length as "1, 1, 2, 2, 3, 3, 4, 4, 5, 5, etc" until the despawn point and then goes on to display an error and then starts from 1 again, because if the array length is more than one object at the time when the first object of the array gets spliced away, shouldn't it go on as usual, since there are other objects in the array?
    Thank you very much to whomever will read this through.

    There are multiple problems:
    1. You should add eventlisteners for your objects only once, but you add eventlisteners every time your timer runs to all of your snowflakes, again and again:
                                  for (var i:Number = 0; i < nicesnowflakearray.length; i++){
                                            nicesnowflakearray[i].addEventListener(Event.ENTER_FRAME, snowhit);
    change it to
    nicesnowflake.addEventListener(Event.ENTER_FRAME, snowhit);
    I don`t see why its even necessary to employ this snowflakearray, it would be much straight forward if you simply let the snowflakes take care of themselves.
    2. Then you have to change your enterframe function accordingly
    public function snowhit(event:Event) : void {
                                  if (e.currentTarget.y >= 460){
                                            if (e.currentTarget.y == stage.stageHeight) {
                                            e.currentTarget.removeEventlistener(Event.ENTER_FRAME, snowhit);
                                            removeChild(e.currentTarget);
    3.
                                  //if (this.hitTestObject(nicesnowflake)){
                                            //trace("hit");
    since "this" is a reference to the Main class (root) it surely won`t function as you intend it to.
                                  if (false){
                                            super();
    makes no sense to use a condition that can never be true

  • Formatting a string with time stamp and double precision numbers

    %s\t%f\r%f
    This is a format string that I have in old code that I've decided to change.  Problem is I cannot make sense of the string codes in my own old code! Let me explain what I want, and hopefully someone can explain how to do it.
    I am using the format into string subvi to merge a time stamp (formatted as %m%d%Y%H%M%S%5u) and two different double precision numbers.  This string is then wired into the Write Characters to File subvi so that I can record data as a .txt file, and open it in either Matlab or Excel.  There is a minor problem with the string format above because in excel the first time stamp entry is blank, and the first loop only gives the two double precision numbers withouth the time stamp - the time stamp appears in the next loop (probably a looping issue and not due to the string format, but if you see differently please let me know).  Now what I want to do is 1. potentially fix that problem and 2. add some more doubles. 
    1. Is there a string format issue that is evident that I am not seeing that causes the time stamp to be formatted into the string after a carriage return?  Or should I be looking at looping issues?
    2. How do I add another one - three floating point numbers (double precision)?  Are the \'s marking different numbers in this string constant?  Or is it the %?  I can't find any information about the \'s, but I see that % begins the format specifier. 
    Ideally, I want these data in the following columns:  Date, Time(absolute), FP, FP, FP, carriage return for the next loop (FP is floating point double precision number).
    Thanks,
    Brad

    Hi JonN,
    Here there is no need of string concordinate function (in your code), the same result you can find if you connect the output of the format string to shift register, and shift register in data to initialize string connector in format into string function.
    <<KUDOS ARE WELCOME>>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

  • Confused with float and double

    Hi,
    I have done the following program which is supposed to deal with temperature and scales.
    import java.math.BigDecimal;
    public class Temperature {
         private float temp;
         private char scale;
         public static void main(String args[]) {
              Temperature t = new Temperature(40.5, 'F');
              System.out.println(t.getCTemperature());
         public Temperature() {
              temp = 0;
              scale = 'C';
         public Temperature(float pTemp) {
              temp = pTemp;
              scale = 'C';
         public Temperature(char pScale) {
              temp = 0;
              scale = 'C';
         public Temperature(float pTemp, char pScale) {
              temp = pTemp;
              scale = pScale;
         public float getCTemperature() {
              if (scale == 'C') {
                   return temp;
              } else {
                   float celciusTemp = 5 * (temp - 32) / 9;
                   BigDecimal bd = new BigDecimal(celciusTemp);
                   return bd.setScale(1, BigDecimal.ROUND_HALF_UP).floatValue();
    }When I try to compile I get the following error :
    F:\programs\ch4>javac Temperature.java
    Temperature.java:8: cannot find symbol
    symbol  : constructor Temperature(double,char)
    location: class Temperature
    Temperature t = new Temperature(40.5, 'F');
    *^*
    *1 error*
    I don't understand why the number 40.5 is considered like a double and that I can't use Temperature(float, char);
    If I'm not mistaken the compiler is asking for a constructor like Temperature(double, char) right ??
    thanks.

    Can I second Mr TuringPest, and Sir J.Bloch... Do NOT use floats, unless of course you have a really really good reason. Internally, java does all it's floating point arithmetic in doubles anyways, so you're just shooting yourself in the accuracy-foot by forcing it to: promote to double to calculate, "narrow" result back to float... promote, narrow ... promote, narrow ... promote, narrow ... The net result can be astoundingly inaccurate... So just use doubles.

  • A possible reason to problems with HomeSharing and TV shows

    I discovered this bug and it may account for some of the problems people describe having with HomeSharing and TV shows (Shows or episodes missing when accessing a homesharing library).
    If one selects one or several TV shows (individual episodes or whole season) in iTunes, only those selected will be visible when accessing the shared library from another mac. To fix it, I have to disconnect from the shared library (clicking eject arrow), deselect the TV shows (in list view using the column browser, select All Genre, All Shows and All Seasons) and then reconnect to the shared library.
    This problem dos not occur with Movie or Music files.
    The problem do not apply if accessing the library from an iOS device (iPod Touch,iPad2,iPhone4, iPhone5).
    The library is shared by a Mac Pro (mid-2010, 10.8.2, iTunes 11.0.1(12)) and the problem occurs when accessing the library from a MacBook Pro, iMac and Mac mini (all using iTunes 11.0.1 under 10.7 or 10.8). All TV shows are home-ripped or home-recorded and do not use any DRM.

    If i select music on my machine using the column browser then only the selected music appears under music on in the home share on my wifes machine. If I select the top entry eg Steve's Library then everything shows.
    Just tried it for TV Shows and it does the same
    Resolved it by removing any selection on my machine, Ejecting the Home Share on my wife's machine. Re selected the Home Share and it reloaded the full list

  • Problems with convertNumber and Double values

    I've serious troubles using convertNumber with Double data in input fields.
    While output formatting works fine, the outputted string fails to be converted back - I get conversion errors.
    So the value that is written to the input field generates a conversion error being submitted! This is not good practice!
    I've found out the following: (I use german locale, so following examples containing ',' means decimal point)
    <f:convertNumber pattern="##0.00" />generates the right output, eg. for Double(20.50) - "20,50", but this value ("20,50") will not be parsed using the above pattern! Only values with non zero last minimum fractional digit (eg "20,51", "20,59", ... ) will be parsed!
    In addition, the above pattern doesn't parse numberstrings that don't contain all significant digits.
    For example an input of "20" will not be parsed to "20.00"!
    Maybe this is not the right forum for that problem, since i think this is a general java formatting problem (?).
    But as the problem arised by using the convertNumber tag and acting like this on numeric input fields is not very comfortable, I liked to post this here. Maybe someone can give me some advice?

    I also have found this problem, except that in my experience it is the decimal part that must be non-zero, not just the last digit of the decimal part. So with a pattern of "0.00" the string "1.50" (one and a half) will be accepted whereas the string "1.00" will not.
    My guess (just a guess) is that it is related to the documented behaviour of the DecimalFormat object when it parses a number. According to the documentation:
    The most economical subclass that can represent the number given by the string is chosen. Most integer values are returned as Long objects, no matter how they are written: "17" and "17.000" both parse to Long(17). Values that cannot fit into a Long are returned as Doubles. This includes values with a fractional part, infinite values, NaN, and the value -0.0. DecimalFormat does not decide whether to return a Double or a Long based on the presence of a decimal separator in the source string. Doing so would prevent integers that overflow the mantissa of a double, such as "10,000,000,000,000,000.00", from being parsed accurately. Currently, the only classes that parse returns are Long and Double, but callers should not rely on this. Callers may use the Number methods doubleValue, longValue, etc., to obtain the type they want.
    Which means that "1.50" will be returned as a Double while "1.00" will be returned as a Long. Perhaps there is then a class-cast exception whie trying to use this value?
    If this is indeed the problem, the solution is to use the getDouble() method of the parsed Number to create the Double to be returned, but this is for the implementer to do - not the user!

  • Sending (String/Bean) Arrays with Webservices and DII

    I'm using the application server from the Sun J2EE SDK (J2EE(TM) Application Server 1.4 Developer Release (build b44-dr) and I'm trying to get an array with Beans or Strings to be send to an Dynamic Invocation Client.
    Can someone point me to an example or send one to me, I'm really stuck with it.

    Can nobody point me to an example how to send arrays with a webservice to a Dynamic Interface Invocation Client???

  • Is it possible to load ipad with photos and songs before giving to someone as a gift? What account and pass to use?

    I am planning to buy an Ipad for a special girl's birthday. I want to make a surprise and load it with her pictures and some songs I will choose. Question is: Is that doable? Will I need to create an username and password on iTunes? When she get the gift will she be able to keep the stuff I have added? Has anyone done that before?
    Thanks!

    So I will need to create a brand new Apple ID with password and give that info to her and tell her to change her password of course and the email address associated with the apple id. Does that make sense?
    Problem is: if she already has an Apple ID, then all the stuff will be lost. Is that correct?

  • How do i convert a double array (with spaces and tabs) to a string?

    Hi
    In our files, we have a mixture of spaces and tabs as a delimeter. How do I convert a double array into a string?
    Thank you.

    Not sure about the last part of your question.
    The Search and Replace pattern can be better than the simple Search and Replace string when you have to do complex searchs, such as detecting multiple spaces.
    Have a look at the attachment.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    ReplaceSpaces.vi ‏27 KB

  • Possible bug during logout with Time Machine and File Vault enabled?

    I have File Vault enabled on my machines so when I logout from them they do a backup to my Time Capsule.
    *I don't login as root!*
    Yesterday when I logged of everything was normal in the beginning.
    All windows were closed and the progressbar showed up with the backup. Approx: halvway in the backup the finder was showned again.
    See image: http://www.liajnad.se/wp-content/uploads/2009/07/leopard-logout.jpg
    I couldnt open o terminal window as root but I was able to browse around in the filesystem as root even though I hadn't login as root.
    Anyone else seen this problem?

    Just to clarify, the new finder that was started had *root privilegies!*

  • External Table - possible bug related to record size and total bytes in fil

    I have an External Table defined with fixed record size, using Oracle 10.2.0.2.0 on HP/UX. At 279 byte records (1 or more fields, doesn't seem to matter), it can read almost 5M bytes in the file (17,421 records to be exact). At 280 byte records, it can not, but blows up with "partial record at end of file" - which is nonsense. It can read up to 3744 records, just below 1,048,320 bytes (1M bytes). 1 record over that, it blows up.
    Now, If I add READSIZE and set it to 1.5M, then it works. I found this extends further, for instance 280 recsize with READSIZE 1.5M will work for a while but blows up on 39M bytes in the file (I didn't bother figuring exactly where it stops working in this case). Increasing READSIZE to 5M works again, for 78M bytes in file. But change the definition to have 560 byte records and it blows up. Decrease the file size to 39M bytes and it still won't work with 560 byte records.
    Anyone have any explanation for this behavior? The docs say READSIZE is the read buffer, but only mentions that it is important to the largest record that can be processed - mine are only 280/560 bytes. My table definition is practically taken right out of the example in the docs for fixed length records (change the fields, sizes, names and it is identical - all clauses the same).
    We are going to be using these external tables a lot, and need them to be reliable, so increasing READSIZE to the largest value I can doesn't make me comfortable, since I can't be sure in production how large an input file may become.
    Should I report this as a bug to Oracle, or am I missing something?
    Thanks,
    Bob

    I have an External Table defined with fixed record size, using Oracle 10.2.0.2.0 on HP/UX. At 279 byte records (1 or more fields, doesn't seem to matter), it can read almost 5M bytes in the file (17,421 records to be exact). At 280 byte records, it can not, but blows up with "partial record at end of file" - which is nonsense. It can read up to 3744 records, just below 1,048,320 bytes (1M bytes). 1 record over that, it blows up.
    Now, If I add READSIZE and set it to 1.5M, then it works. I found this extends further, for instance 280 recsize with READSIZE 1.5M will work for a while but blows up on 39M bytes in the file (I didn't bother figuring exactly where it stops working in this case). Increasing READSIZE to 5M works again, for 78M bytes in file. But change the definition to have 560 byte records and it blows up. Decrease the file size to 39M bytes and it still won't work with 560 byte records.
    Anyone have any explanation for this behavior? The docs say READSIZE is the read buffer, but only mentions that it is important to the largest record that can be processed - mine are only 280/560 bytes. My table definition is practically taken right out of the example in the docs for fixed length records (change the fields, sizes, names and it is identical - all clauses the same).
    We are going to be using these external tables a lot, and need them to be reliable, so increasing READSIZE to the largest value I can doesn't make me comfortable, since I can't be sure in production how large an input file may become.
    Should I report this as a bug to Oracle, or am I missing something?
    Thanks,
    Bob

  • BUG: Saving Text with Layer Styles to PDF

    I was just able to take the CS6 beta for another test run, and it seems the following ancient, but high-priority bug (at least for me) hasn't been addressed:
    When saving large Photoshop documents (composites in resolutions like, say 7000x10000 pixels) to Photoshop PDF, certain layer styles are often not exported correctly when applied to text layers. The layer styles that are affected are those that render pixels that are then clipped inside the text, such as Gradient Overlay, Bevel & Emboss etc.
    When output, they usually don't span the entire text in the PDF, but are cut off with a straight line at some point (I can't supply an example image right now, my apologies). Inside of Photoshop, they render correctly at all zoom levels. My guess is that this is somehow related to the raster data being written as individual tiles and for some reason, some of these are then omitted for layer styles.
    The problem isn't new to the CS6 Beta, but has existed for many versions. I have run into it in both Mac and Windows versions. The current workaround is to always expand layer styles on the text layers that are affected into layers before exporting, which is tedious and error-prone since there is inevitably something that gets missed (EDIT: I was wrong there, that workaraound doesn't work, the problem persists even if the layer style is expanded into a layer that is then applied as a clipping group).

    Two possibilities: Pre-compose everything and fade the comp or use a second layer that has the layer styles, but in its Blending Options for the layer styles has set Fill opacity to zero, so only the styles are rendered, but not the source. Whjat you are seeing is normal behavior based on how styles are supposed to work. Whenever there is a non-zero (non-transparent) pixel, the get applied, where the pixels opacity acts as amultiplier for the style's intensity. Looks good for some, but often causes this popping appearance...
    Mylenium

Maybe you are looking for