How can I write waveform data to a txt file or an excel sheet?

I want have a table that I can follow up in excel. In first column should be the timestamp (in ms or better in us), in the second column should be the value. I made an effort but it doesn´t work.
Attachments:
PWMReadWrite.vi ‏167 KB

Yes, you must change block (Get Date/Time String.vi).
You must write new subVI - this new VI convert date and time to the second [or ms or us].
First choice is: time column will be count of second [the better ms or best us] since 12:00 a.m., January 1, 1904, Universal time[function "Get Date/Time In Seconds.vi"].
Text file:
3216546154,000 0.000000
3216546154,050 0.062791
3216546154,100 0.125333
Second choice is: first record in TXT file will be time when test start and after will be table with time [ms or us] and value.
Text file:
Start time: Monday 30-th February 2005.
0,000 0.000000
0,050 0.062791
0,100 0.125333
Have a nice day.
JCC
P.S.: I recommend you creat header of result table to text file.
Text file:
time [ms] U [V]
3216546154,000 0.000000
3216546154,050 0.062791
3216546154,100 0.125333

Similar Messages

  • How can I write waveform data from a while loop?

    Alright, I have a NI-5122 high speed digitizer that I need to acquire 10,000 waveforms. I am currently using the NI example code "niScope EX Multi Record Fetch More Than Available Memory.vi" to do this and then onto that later. I set the Number of Records to 10,000, min record length to 8192, and the min sample rate to 100M (S/s). On the Fetch vi,  I set it to get a 1D Dbl array and then send it to the while loop edge for auto indexing. What I want is to take each waveform and write it to a file next to the previous waveform not append it to the bottom of the previous one. I can do 100 and sometimes 1000 waveforms with my current setup and then use "write measurement to file.vi" to save the data, but at 10,000 it says that the memory is full. I have 256 MB on the NI-5122 and 4G of memory on my host computer. My reasoning is that if the NI-5122 can hold all that data then why can't my host computer. I have tried to fetch using 2D Dbl and transpose that matrix and send the data to "write measurement to file.vi" inside the loop and append the data that way, but when I do this the card does not acquire any data. Which seems like a software problem. I know this is probabaly worded poorly, so just post a response if further explanation is needed.
    Thank you.

    Hello,
    It sound like you might have received a LabVIEW: Memory is full message.  Are you also graphing this data as it is being acquired?  Are you building an array inside the loop?  At the 100 MS/s rate, you are using a lot of memory to acquire, graph, build and transpose array data, and then write to file.  If you are saving to file and do not necessary need to see the data, I would suggest taking the graphical indicator out of the code.  Please review some of the KnowledgeBases linked below about the LabVIEW: Memory is full.
    KB 36QD14V3: Why Do I Receive a "Memory is Full, VI Stopped at Loop Tunnel 0xXXXX" Error?
    KB 3ZNDGRS9: LabVIEW "Memory is Full" Error
    Samantha
    National Instruments
    Applications Engineer

  • How can i write the data to PIC16F819 using labview?

    how can i write the data to PIC16F819 using labview?
    Need help!
    im using labview in gathering the datas that i need to right to the PIC, then after getting all the datas i am using another program which is ICD2 in order to write it to the PIC. Is it possible to do this task through LV? coz we are spending a lot of time transferring the data from LV to ICD2 manually and its prone to mistake as well.
    any suggestion?
    thanks,
    Pedz

    LabVIEW does not currently have a built-in method to communicate with
    i2c, but there are other vendors that sell devices to communicate in
    this manner with LabVIEW development kits.  One that I know of is
    from MCC... here is a link:  http://www.mcc-us.com
    They sell a device called iPort, and then you can buy LabVIEW VIs to go with it.  I hope this is helpful to you!
    john m

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

  • How can I mail the Job Log in the form of an excel sheet?

    Daily I have to monitor a Job and I have to retrieve the Job Log in an excel sheet, Format the excel sheet, and then mail the excel sheet and the Job Status(Finished/Cancelled) to Client/Person Incharge.
    I want to automate this entire process. Please guide me, how can I write a program that mails the Job Log, in the form of an excel sheet, to the Client?
    Edited by: Jiten Rajendra Barai on Nov 25, 2008 3:03 PM

    Hi,
    You can use this FM to mail the excel sheet.
    SO_NEW_DOCUMENT_ATT_SEND_API1
    Also have a look at the below thread, it might be very helpful.
    Sending Excel attachment in E-mail
    Cheers...

  • How can I write some informations in a text file ?

    Hello.
    I am a beginner in java in general and in Web Dynpro Java in particular.
    I have to work in an application written by a consultant wich works no more at my office.
    Due to performances problems (slowness of the application at unpredictable instants),
    I have to write in an external file all the actions which make the users in the application.
    The problem is I don't know how to proceed.
    Somebody can help me ?
    Edited by: Serge L. on Aug 10, 2009 2:21 PM

    Hi Serge,
    You can try this as well to generate a text file.
    Use Filedownload UI element. And try following code in Webdynpro.....
    IOUtil IOUtil=new IOUtil();
    File f = new File("skill_master.txt");
    FileWriter fw = new FileWriter(f);
    fw.write(formattedStr);
    fw.close();
    InputStream template  = new FileInputStream(f);
    ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
    IOUtil.write(template, templateSourceOutputStream);
    IWDCachedWebResource resource=WDWebResource.getWebResource(templateSourceOutputStream.toByteArray(), WDWebResourceType.getWebResourceType( "txt","text/html"));
    resource.setResourceName("User.txt");
    wdContext.currentContextElement().setVa_FileData(resource);
    Here formattedStr is the string which contain all the contents you want in the file. Here Va_FileData  attribute is of type com.sap.ide.webdynpro.uielementdefinitions.Resource.
    Map this Va_FileData attribute to the Filedownload UI. So that when u click on the FileDownload UI it will generate a txt file.
    Hope it helps you.
    Regards,
    Swati

  • How can we export table data to a CSV file??

    Hi,
    I have the following requirement. Initially business agreed upon, exporting the table data to Excel file. But now, they would like to export the table data to a CSV file, which is not being supported by af:exportCollectionActionListener component.
    Because, when i opened the exported CSV file, i can see the exported data sorrounded with HTML tags. Hence the issue.
    Does someone has any solution for this ... Like, how can we export the table data to csv format. And it should work similar to exporting the data to excel sheet.
    For youre reference here is the code which i have used to export the table data..
    ><f:facet name="menus">
    ><af:menu text="Menu" id="m1">
    ><af:commandMenuItem text="Print" id="cmi1">
    ><af:exportCollectionActionListener exportedId="t1"
    >title="CommunicationDistributionList"
    >filename="CommunicationDistributionList"
    >type="excelHTML"/> ---- I tried with removing value for this attribute. With no value, it did not worked at all.
    ></af:commandMenuItem>
    ></af:menu>
    ></f:facet>
    Thanks & Regards,
    Kiran Konjeti

    Hi Alex,
    I have already visited that POST and it works only in 10g. Not in 11g.
    I got the solution for this. The solution is :
    Use the following code in jsff
    ==================
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="text/csv; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    OR
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="application/vnd.ms-excel; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    And place this code in ManagedBean
    ======================
    > public void test(FacesContext facesContext, OutputStream outputStream) throws IOException {
    > DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    >DCIteratorBinding itrBinding = (DCIteratorBinding)dcBindings.get("fetchDataIterator");
    >tableRows = itrBinding.getAllRowsInRange();
    preparaing column headers
    >PrintWriter out = new PrintWriter(outputStream);
    >out.print(" ID");
    >out.print(",");
    >out.print("Name");
    >out.print(",");
    >out.print("Designation");
    >out.print(",");
    >out.print("Salary");
    >out.println();
    preparing column data
    > for(Row row : tableRows){
    >DCDataRow dataRow = (DCDataRow)row;
    > DataLoaderDTO dto = (DataLoaderDTO)dataRow.getDataProvider();
    >out.print(dto.getId());
    >out.print(",");
    >out.print(dto.getName());
    >out.print(",");
    >out.print(dto.getDesgntn());
    >out.print(",");
    >out.print(dto.getSalary());
    >out.println();
    >}
    >out.flush();
    >out.close();
    > }
    And do the following settings(*OPTIONAL*) for your browser - Only in case, if the file is being blocked by IE
    ==================================================================
    http://ais-ss.usc.edu/helpdoc/main/browser/bris004b.html
    This resolves implementation of exporting table data to CSV file in 11g.
    Thanks & Regards,
    Kiran Konjeti

  • How can i make my form open a .txt file????

    hi every body,
    i need some help with that..
    i want my form to open a txt file, or at least copy that file from a specific source (windows folder) to a specific destination (another windows folder).
    note that this all will work on the server and the client.
    i hope to find some help.
    thnxxxxxx.
    plzzz i need help, it's a GRADUATE PRODUCT issue.
    sorry i'm not that strong, it gives me error with host command.
    Message was edited by:
    bondo2

    declare
    in_file Text_IO.File_Type;
    out_file Text_IO.File_Type;
    begin
    in_file := Text_IO.Fopen('salary.txt', 'r'); -- open file in read mode
    out_file := Text_IO.Fopen('bonus.txt', 'w'); -- open file in write mode
    end;
    for copy of the file:
    host(copy c:\test.txt c:\new_folder\);
    Hope this helps !!

  • How can I write to data file only near to SW Trigger samples?

    Hi everyone
    I am working on a model based in this one:
    http://zone.ni.com/devzone/cda/epd/p/id/34#0requir​ements
    I would like to save the data once the trigger is reached, with some data near to the impact.
    Where should I place a "write to measurement file" block in order to may load and plot the data of an impact test?
    Regards.
    Solved!
    Go to Solution.

    Celuti,
    You are so close!
    I am glad to see you understood what I recommended!
    You need to ensure that you connect the same data type to the Queue as what is coming from the DAQ.
    Please see the modified version of the code you posted.
    Craig
    CLD | CTD
    LabVIEW 2011 SP1 | TestStand 4.5
    Attachments:
    daqmx_sw_trigger_example (modified).zip ‏93 KB

  • How can i save differnts data in the same file?

        Hi all,
    i need some help.  I'm working  on a project  for students an th university. We have to devellop  a programm for LEDs measurement so that all the measure data must be save in de same file.  We have develloped the programm, but we have  a big problem to save the measure in the same File.
    When we do the first  measure , the file must be created and the fisrt data gonna be save in this file that is correct
    When wie do the second measure, the third  ....  measure, the programm ask us to comfirm the file or where we want save our data
    We need some help, to know how we can change  or devellop this programm so that, for the first measure , the file must be created and the fisrt data gonna be save in this file,  the second measure the same file must be chose and from the third and more the measure data must be automatically save in this file without the programm ask to chose or to confirme a file? 
    I attach a part off this programmm
    Thanks
    Attachments:
    SR830DSP19.vi ‏212 KB

    Move the "File Dialog" where you open your new file out of the while loop. Only pass the refnum inside the loop.

  • How can I generate a data merge that includes a barcode from excel spreadsheet to InDesign?

    Can you please advise if the following process is possible within InDesign CS 5.5? (Mac OS 10.8.2).
    We need to create a data merge that includes a barcode. The data merge is for several thousand records.
    We have a customer-supplied Excel spreadsheet that contains seven fields, one of which is a number that ultimately needs to print as a barcode when we make the data merge in InDesign.
    As you would expect, the conventional six fields data merge perfectly - but we can't find a way to make the barcode print correctly within the data merge.
    We have investigated several possible solutions without success.
    Some solutions suggest a plug-in for Excel to convert the number into a barcode whilst still in the spreadsheet - but this doesn't come across correctly when we import the CSV file into the InDesign data merge.
    We have investigated certain third party software applications but none provide the full solution we require. Some, for example, appear to create the barcode within the Excel spreadsheet but don't produce the barcode correctly when we data merge in InDesign; and some will allow us to create a one-off barcode within InDesign but have no automated way of retrieving the thousands of Excel numbers and turning them into barcodes.
    We have also come across possible 'font' solutions but have had no success with these either.
    For a previous job we needed to produce we outsourced to a specialist mailing company, who assured us they produced the whole job (very quickly) within InDesign. They, understandably, won't tell us how they did it. But, given the speed with which they produced the job for us, we imagine - with the correct software - the whole process is easy to do.
    Can you please advise?

    See second posting atHow do I generate a data merge in InDesign from an excel spreadsheet which includes a barcode

  • How can i validate the data in the control file?

    Consider that the SQLLoader reads the Input data File from the path and it loads the data into the tables based up on the descrition specified in the control File.
    First, the table to be filled is created:
    create table sql_loader_1 ( load_time date, field_1 Numeric, field_2 varchar2(10)
    Sample Control File :
    load_1.ctl
    load data
    infile 'load_1.dat' "str '\r\n'"
    insert into table sql_loader_1
    load_time sysdate,
    field_2 position( 1:10),
    field_1 position(11:20)
    Note that the positions 11 through 20 are loaded into field_1 and positions 1 through 10 into field_2. The field load_time is filled with the current time (sysdate) of the load.
    Here's the data. The name of the file (load_1.dat) had been specified with the infile statement in the control file.
    load_1.dat
    0123456789abcdefghij
    foo bar
    here comes a very long line
    and the next is
    short
    Here i want to validate the field_1 (Numeric Datatype) since the data file contains the character value (i.e)abcdefghij

    Good question for this forum:
    Export/Import/SQL Loader & External Tables
    Werner

  • How can I add the date to a PDF file that always displays today's date?

    I am trying to convert a word document into a PDF file. The word document has a field code for the date, but when I convert it to PDF format, the field code is not preserved.

    Convert using what?  Acrobat?  PDF Pack?  Microsoft Office?

  • How can I Write a sine wave in an Access-fil​e?

    I measure a sine wave in LabView 6i. How can I write the datas automatically to an Acces-file, at the same time?
    In my program, I managed it with Execute SQL.vi, I change a number in a SQL statement(String) -> after this I push start and then it writes the statement in the Access-file.
    The problem is, it writes only one data per measurement in the file. How can I write all datas in the Access-file and measure the wave at the same time?
    Thanks for help!
    Attachments:
    getwave.vi ‏49 KB

    On the waveform palette, you will find a "to components" vi that you can break out the array of the waveform. You can then, using a for loop write all of the values from the waveform.
    Better yet, there are examples in the database toolkit manual on pages 3-13 to 3-15 that deal with reading arrays (and even has a waveform example).
    Good luck!

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

Maybe you are looking for

  • Deskjet 3050 Won't Print Wirelessly

    Hi there, My new all in one 3050 won't print for me. It is "Offline" in the network page. I feel I have explored every avenue and it will still not print. The wireless network configuration page I printed says everything passed. The home network disa

  • Data Ownership in Sales Analysis Report

    The company has sales employees around the world and the company is not interested that each of them can see the others sales, so when an employee runs a sales analysis report they should only see their own documents but it not happened despite the d

  • Is there a way I can upgrade my 4GB phone to an 8 GB?

    With Apple phasing out the 4GB models after only 2 months, my phone has become prematurely obsolete. And with Apple no longer making the 4GB models, I'm unsure what will happen if my model needs repairs. I was wondering if there is a way for me to se

  • Spotlight doesn't work

    Hi there, I have a problem with spotlight indexing. It fails on me in a number of different ways. Sometimes, when I try to reindex, it will never finish (Estimating indexing time... appears forever). Sometimes, when I try to reindex, it will never fi

  • Opening files in PSE from iPhoto - Saving issue

    I opened my files to edit in PSE10 directly from the flagged folder in iPhoto. I noticed it was saving them to a weird numbered file but kept going. I can't find the folder ANYWHERE! How can I recover my edited pictures?