01-15-2014 11:15 AM
Hi
Could anyone offer some help as to how to save data as a vertical.Following in my attachment all of my datas saved az a ahorizontal!
And also I will be happy if you told me can I add some text in front of my data as a explain outamaticlly?
Any suggestions would be greatly appreciated!! Thanks so much!
Sincerely,
Solved! Go to Solution.
01-15-2014 11:24 AM - edited 01-15-2014 11:31 AM
It would be nice if you could at least post your code.... Also your english and/or typing ability is a little unclear but I believe you just want to save each datapoint on a new line instead of being seperated by a tab:
For example:
17000000.000 1000.000 6.000 0.000 0.000 81.000 91.000 559.000 434.000
becomes:
17000000.000
1000.000
6.000
0.000
0.000
81.000
91.000
559.000
434.000
If this is true, try using:
You are concerned with the bottom field "delimiter (\t)":
delimiter is the character or string of characters to use to separate fields in the spreadsheet file. For example, a value of , (comma) specifies a single comma as the delimiter. The default is \t, which specifies a single tab character as the delimiter.
Try wiring the End of Line String Constant to that input.
It would look like this:
*Note: This is a Code Snippet and can be dragged into a LabVIEW window to make the code appear (if you save the file to your local machine first).
01-15-2014 11:47 AM
Thanks for your reply.
yes you correct.
I want to save each data on a new line with some english name besides this data. But unfortunately I have not this icon because I work eith 7.1 version of LabVIEW!
01-15-2014 12:13 PM
I add delimiter and I get the datapoint on a new line, thanks
but how can I add some text with my data?
for eample I like it shows me :
Exposure=1000
intensity=17000
and ....
01-15-2014 12:29 PM
First convert your numbers to a String type using Number to Decimal String. Once your numbers have the appearance of a string, you can put text with them. So lastly you can use Concatenate Strings to concatenate (add strings together) your number in String format with other text:
This code would create the following string:
Then you can save all your strings on a line using the same method as above.
01-15-2014 01:58 PM
I made this code exactly like you but I saw another problem that I attached it.
I use Fract/Exp String To Number for solving the problem but the datas are not appear in my file.
sorry about asking question alot!
01-15-2014 03:24 PM - edited 01-15-2014 03:25 PM
Ask as many questions as you need 🙂 Thats what the forums are for!
Your newest problem is that you are trying to build an array with different data types. Arrays can only hold the SAME data type. For example, an array of strings. Or an array of doubles. Etc. You can read more about it here: http://www.ni.com/gettingstarted/labviewbasics/datastructures.htm#Arrays
Your Builld Array function is causing the issue because you are trying to make an array with Strings and Ints and Doubles. This is NOT allowed.
Try converting all your data into strings before trying to save them to file! It should look something like this:
Each of the Blue and Orange lines that represent Integer or Floating point numbers should also be converted into a string with the same VI (notice how I copied it for each line). Then you can concatenate onto those like we did for "Exposure=" to get more text with your data.
Ultimately youll want something like this before you save to file:
Note: Your "parameters of trap" currently accepts a Double array. If thats where you do your printing, make it accept a String array
01-15-2014 04:36 PM
I did all of your recommends but az you see in my new attachment the Concatenate Strings or Build Array can not transfer my datas correctly and I saw all of the datas equal zero!
thanks
01-15-2014 05:36 PM
01-15-2014 06:15 PM
no it is not wrong and complicates. maybe the Write To Spreadsheet File can not save correctly!