02-27-2017 01:43 PM
Howdy Y'all,
I am puzzled and hope someone can help.
I take a 1D array of dbl, length 8. use the array to spreadsheet string to change to a string using a comma as a delimiter and %.3f for formatting. Size of this string is 8. I bundle this with similar length 8 strings. Unbundle this to concatenate a few labels into the string. And then use the "write to text file". When i open this text file and look at these "length 8 strings" they are thousands of strings long. Example
1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,0,0,0,0,0,0,0,0,0,0,0,0,0...
These zeros really mess up what i am trying to do when i put this text file into an excel spread sheet.
Anyone have an idea why these zeros are being added to the end of the strings?
Brandon
02-27-2017 01:52 PM
No idea at all.
But if you attached a VI that showed us what you are actually doing, rather than a verbal description of what you think you are trying to do, it may be a lot easier to have an idea.
02-27-2017 02:33 PM
see attached. it is a subset of the entire vi and shows all the information that i think is needed. I cannot provide the entire VI
02-27-2017 03:03 PM - edited 02-27-2017 03:03 PM
Your use of local variables point to possible race conditions (ie your data is not there yet and therefore show up as zeros). And your array manipulation is horrendous. Prime candidate for the Rube Goldberg thread. It can be simplified to this:
02-27-2017 03:07 PM
I knew there had to be a better way. That's what i get for being completely taught by google.
As far as the local variables go, is there another way to pass data from one location to another without using wires or local variables (i'm sure there is, if you could point me in the correct direction.)?
02-27-2017 03:25 PM
brandon.laumer wrote:
As far as the local variables go, is there another way to pass data from one location to another without using wires or local variables (i'm sure there is, if you could point me in the correct direction.)?
Depends on your requirements. Use wires whenever possible. If going to another loop, I use Queued and User Events for most things.
02-27-2017 03:25 PM - edited 02-27-2017 03:28 PM
So I took the unbundled string of the spec 1 values and sent one of them to a text file. When i did this, the extra zeros were not there.
And now i replaced it to its original version and the zeros are also not there....... ugh