Save 2D array in write to spreadsheet file

Hello,
I want to save 2 signals coming from 2 channels in  1 file ( as a 2D file:
column 1 for signal coming from channel 1, and column 2 for signal coming from channel 2).
How I can do it?
See my example please. I can save these 2 signals on 2 different files.  I
can not find a way to put them in on file.
Thank you so much.
Pascal
Attachments:
2 signal save.vi ‏80 KB

Since the output of AI Read is a 1D array of waveforms you have to extract the data of each waveform and create a 2D array in order to feed that to the Write to Spreadhsheet File VI:
You'll need to check on the transpose. Note that doing this will lose the timing information. You may want to use the Write LabVIEW Measurement File Express VI instead.
Also, any reason why you have a loop set to run just once?
Message Edited by smercurio_fc on 03-19-2008 03:16 PM
Attachments:
save 2D.png ‏3 KB

Similar Messages

  • Write to spreadsheet file.vi is storing data in one row only.

    The 8 points of data is going into one column in the spreadsheet. In the "Write to spreadsheet file string.vi" how do I write the 8 points to one row for each cycle?
    I got this VI from NI's web a couple of years ago and forgot how to modify this part. I usume it is within the write file.vi.
    Thank you in advance
    Skip

    I just reread your original post and the way the "Write to Spreadsheet File.vi" that ships with LV works by default is to put 1D arrays into rows. I read your post backwards and told you how to put the data in a column. Sorry.
    In any case, perhaps you need to make sure the Transpose input ISN'T true, and that the delimiter IS a tab.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)

    main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)
    The path(Grundpfad)for the excel file should be inserted in the main.vi.

    1. There's a shipping example called Write Table To XL.vi (Help>Find Examples>Communicating with External Applications>ActiveX>Excel) that you can use as a starting point.
    2. Buy the LabVIEW Report Generation Toolkit. Info can be found here.
    3. Search this forum for other examples of writing to Excel.

  • Help on fonction Write to spreadsheet file

    Hello,
    I come on this forum to find a solution for my issue.
    I have made a VI which acquires an input voltage and where the user can modify some parameters.
    For each iteration of my while loop, I want to save the data in a csv file that's why I'm using the fonction Write to spreadsheet file.
    But when I want to use this saved datas in csv format with Excel, the data were saved in string format so not a numeric. My purpose is to have some numerical datas and not strings because I can't do graphics or calculs.
    As you can see on the csv saved file, only the iterations of the while loop (column C) are in a numerical format.
    Here is my problem, thank you in advance for your help
    Attachments:
    VI.png ‏22 KB
    Excel_saved_file.png ‏11 KB

    Looks like you're using regional decimal signs, try "%.;.3f" as format
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Some Doubts in write into spreadsheet file function

    hi,
    i have some problem with writing the values into excel file...if \ found then the values after will write the values in next rows...
    for eg. if i give 78/58\46/86 then i will write as in picture i hav attached..
    Attachments:
    Mod 1.vi ‏23 KB
    Untitled.png ‏135 KB

    The Write to Spreadsheet File is not the same as writing to Excel -- for that, you should use the Report Generation Toolkit (and there have been a number of posts here, as well as examples that ship with LabVIEW).
    That being said, it is not clear (a) what you are trying to do, and (b) what is (or is not) happening.  The image you attached looks OK ...

  • Hi am trying to save Data into a write to measurement file vi using a NI PXI 1042Q with a real time mode but it is not working but when i run it with uploading it into the PXI it save in to the file

    Hi am trying to save Data into a write to measurement file vi using a NI PXI 1042Q and DAQ NI PXI-6229 with a real time mode but it is not working but when i run it without uploading it into the PXI it save in to the file please find attached my vi
    Attachments:
    PWMs.vi ‏130 KB

     other problem is that the channel DAQmx only works at real time mode not on stand alone vi using Labview 8.2 and Real time 8.2

  • 求助: 如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi, 并且如何定义它们的路径???

    请问如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi,我知道spreadsheet file.vi只支持.txt文件,但我应该在哪里设置它们的路径呢,请各位帮忙指点,能不能具体说明下,谢谢...

    write to spreadsheet file.vi 和 read from spreadsheet file.vi,支持.xls文件.
    可以在path处设置它们的路径.

  • 求助: 还是一个如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi, 并且如何定义它们的路径的问题???

    在定义路径时有两个路径框,一个是FILE PATH,另一个是NEW FILE PATH,请问我应该定义哪个呢???定义好后就可以直接往spreadsheet file.vi中存储和读取记录了吗???还需要再做任何其它的工作吗???谢谢...

    定义file path就可以了,new file path 是这个VI的输出

  • Error 6 occurred at Open/Create/Replace File in Write Spreadsheet String.vi- Write To Spreadsheet File (string).vi- Untitled 1

    Hi I'm getting the above error when attempting to get a file path control to write to a spreadsheet vi?
    The spreadsheet is opened in open office but saved as a .xls in the documents folder.
    The spreadsheet only contains one row and three columns each with text contained but when I run the VI and then open and view the actual speadsheet all three headers appear together in the A1 cell before the title error message appears.
    Is Labview not compatible with open office? Perhaps someone can confirm if this is indeed the case?
    Thanks in advance...

    Solved. One just needs to click seperate by tab in the import dialog than opens in OO calc.

  • Bug in writing Integer Data in Hex in Write Spreadsheet File

    It appears that Write to Spreadsheet File forces all data to I64. Try writing an I16 or I32 array with a negative number. Format specification to 4x, 8x or whatever is ignored and you get a full completent of 16 bytes with a lot of FF's at the beginning making it I64 
    Chief Scientific Officer & Ex-Head
    Advanced Centre for Materials Science
    Indian Institute of Technology
    Kanpur 208016
    Phones: +91-512-2597830, 3927830(Off), 2574628 (Res), 9336117477 (Mob)
    Fax: +91-512-2597459
    E-mail: [email protected], [email protected], http://home.iitk.ac.in/~sg

    Hi;
    it's not a bug it's a feature :-)
    Whenever you want to format numbers the formatting routine will try to leave as much digits as needed/possible. When you format I8 then 2 digits are ok, I16 needs 4 digits and so on.
    You can easily test this behaviour when using the 'Array to spreadsheet string' function (it's also used inside 'Write spreadsheet file'). When saving negative integers as Hex formatted ALL digits are needed to describe the number and so you get all of them in your text file!
    The only problem is: 'Write to spreadsheet file' only knows about I64. Whenever you want to save negative numbers you get 16 digits regardless of format string.
    Solution:
    Change the 'write to spreadsheet file' as described before or do the formatting on your own by using 'array to spreadsheet string'!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Write comment and headers to spreadsheet file

    Hi, 
    I am using Labview 2010 to run IV measurement. After getting IV data (2D array), I am using "write to spreadsheet file.vi" to save my data. However, I want to add some comments and time&date into that file. How can I do that?
    Thanks,
    Joyce

    See the attachment.  What do you get at the output of the concat string?  Is it 0.00 at that point?  Post your code if you are able.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home
    Attachments:
    Joycezh.png ‏12 KB

  • How do I automatically save array data to a spreadsheet?

    I am setting up a 24 hour test where I would like the gathered array data to automatically save to a spreadsheet every 4 hours. Is there a way to set this up with the Write to Spreadsheet file.vi?
    Solved!
    Go to Solution.

    Sure, you just need a timer that will  tell you when the 4 hours are up.  Take a look at the attached timer, I picked it up on these forums a while ago but I cant remeber who to give credit to for it*.  Just use this timer to trigger a case structure holding the write to spreadsheet function.
    *It is from Bloomy controls
    Message Edited by jmcbee on 03-17-2009 09:39 AM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Interval Timer.vi ‏21 KB
    Delta Time.vi ‏22 KB

  • Writing 2-D array to spreadsheet file changes value of time column when saved

    I have a program that creates a new row in a table each time the loop performs.  Each time the loop performs and a row is added to the table, the program uses the "write to spreadsheet file.vi" to save this new table over the previous table.  The array is also visible on the front panel of the vi.  The program works in such a way that you can stop adding data to the array, start adding data to a new array, then come back to the original by using the "read from spreadsheet file.vi".  My problem comes after opening the spreadsheet file.  The first column of the array, which corresponds to the time when the data in that row was taken, has different values than those that were seen when the array was originally displayed on the front panel.  In fact, all of the rows that were created the last time the program was run with that array have the same value in the time column, while all of the other columns keep their correct values.  Here is an example of what is happening...
    When I start the program, and run it for 5 iterations, I get a table like this displayed on the front panel:
    3241713920
    85.88012
    93.88012
    1.735015...
    3241713930
    85.97603
    93.97603
    1.747003...
    3241713940
    84.58855
    92.58855
    1.573568...
    3241713950
    84.48096
    92.48096
    1.560119...
    3241713960
    84.93667
    92.93667
    1.617084...
    This array is saved to the spreadsheet file with each added row.  If I initialize and build another array, then come back to this first array using "read from spreadsheet file.vi," I will receive the following table:
    3241713920
    85.88012
    93.88012
    1.735015...
    3241713920
    85.97603
    93.97603
    1.747003...
    3241713920
    84.58855
    92.58855
    1.573568...
    3241713920
    84.48096
    92.48096
    1.560119...
    3241713920
    84.93667
    92.93667
    1.617084...
    If anyone could tell me why this is happening and/or how to fix it, that would be greatly appreciated.  One option I have contemplated is just having each individual row appended to the file instead of resaving the entire array with each iteration.  However, I would prefer to do it the way I am currently doing it, so I can pass the array through each time and perform different tasks on it, such as averaging the values in columns over different time periods.  Thank you in advance to anyone who can help. 

    DWDerr wrote:
    If anyone could tell me why this is happening and/or how to fix it, that would be greatly appreciated.  ...
    This KnowledgeBase article may help.  I think things changed in LV8.20, but I could be wrong.
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."

  • How can i combine a string array with a waveform array and write this to a file.

    I am trying to set my VI up so that I can enter test information (notes to myself) and combine that with the time and date then write this as well as the waveform data from the daq to a spreadsheet file.  I am sure this is a simple task but I am new to LabView so any help would be very appreciated.

    An XML file is not a spreadsheet-formatted file, so that's not likely to help...
    Simply call the Write To Spreadsheet File twice. The first time you wire in a 1D array of strings
    which is your test information. Then, you call it when you're writing out
    your data. Make sure you wire a True constant to the "append" input for
    that function.

  • Adding 2 arrays to a Spreadsheet file Help!!

    I'm trying to write to a spreadsheet file and I want the date and time in one column and the data from my channels in another. I'm running the problem that my time is in a string format and my channels are in a number format. Attached is what my program currently looks like.
    Any help would be great..
    Thanks,
    Pier
    Attachments:
    Array Problem.jpg ‏121 KB

    Paulo,
    I dont understand what you mean about putting the write to spreadsheet in. Do you mean putting it in twice would solve this or not? I'm looking for a top header to be as follows:
    Time/Date | Channel 1 name | Channel 2 name | etc....
    Could you possibly show me what you mean with the previous example I sent you.
    Thanks,
    Piero
    Hello,
    You have your file wrong formatted, because, the first time you write to it, you write as a normal text file, and that will be how excel will interpret it. You have to replace the "Write characters to file.vi" by the "Write to Spreadsheet file string" that I sent you.
    If you allow me, I would like to make some extra comments on your code:
    1 - When you connect an array to a for loop, there is a property of the tunnel (the point where the array goes in the loop) that is auto-indexing. Right click it and select it. This replace all those index array that you have inside your for loops and the array size wired to the N input of the loop. This will automatically index the array and the loop will automatically run n times where n is the number of elements of the array.
    2 - I'm not sure about this, because I didn't run your program, because I don't have a DAQ board installed in this PC, but I think that the secont For loops that you have (the little one) is doing nothing there.
    3- try to keep your code more clean, you have it spread for a very big area with a lot of empty spaces and apparentl~y there is no flow from left to right in your code that makes it more difficult to understant it.
    Hope this helps,
    Paulo

Maybe you are looking for

  • Fed up trying to get this sorted over the phone

    My parents are both pensioners and understand nothing about broadband. They joined BT ADSL broadband in the summer of 2011. I recently moved into the property and noticed the state of their broadband. It is terrible. I took it upon myself to try and

  • DTP Error at Write step

    Hi ,    Could any one of you please explain the reason for the following error while loading a DTP? <b><i>Dump: ABAP/4 processor: OBJECTS_OBJREF_NOT_ASSIGNED Exceptions in Substep: Load and Generation (Where Necessary) of Write Program</i></b> We use

  • Printer setting to print in background ?

    Hello, Im using F110 to print cheque and advice . I have set in a way to print the advice on the default PC printer (LOCL) and the cheque on a dotmatrix printer that i have created on SPAD. When i test this advice and cheque using TEST TRANSACTION ,

  • Lost incoming emails?

    I have recently added a second email account (gmail) to my mail box as I have been having major problems with orange ( who have admitted that they have a problem currently sending emails) ; since then, "mail activity" shows incoming email which does

  • I cannot find the serial number on my phone!

    I reset my daughter's phone, and now I can't connect it back to the account.  everything is asking for the serial number, but I can't find it!!  I think I have a old 4, because I can't even find where a SIM card "pops" out. I unscrewed the screws at