Save a waveform in a txt file

Hello,
I just want to save a waveform in a txt file in the simple format : Time (s)[tabulation]Current (A) instead of the labview preformatted spredsheat format time[tabulation] Y
1904-01-01  01:00:00.000000 0.000335  0  

Please keep to your original thread, otherwise the information gets scattered and the forum poluted.
Regards,
André
Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

Similar Messages

  • Automatically save logging in the "flashlog.txt" file

    Is there a way to automatically save logging in the "flashlog.txt" file?

    hi Atish
    i am using
    loop at gt_sagadr_outtab into wa_sagadr_outtab
    move wa_sagadr_outtab-country to wa_sagadr_text+223(226).
    endloop
    in this last field ie country i need to display the last 226 as blank as only country key is two char in database so the last space is not shown
    i am not unsing the fM as tolb by  you
    and afterwards
    i am usning
    Concatenate 'Sagadr_' sy-datum sy-uzeit '.dat' into gv_filename_sagadr.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        LOGICAL_FILENAME              = gc_lfile
        OPERATING_SYSTEM              = SY-OPSYS
        PARAMETER_1                   = gc_param1
        PARAMETER_2                   = gc_send
        PARAMETER_3                   = gv_filename_sagadr
      USE_PRESENTATION_SERVER       = ' '
      WITH_FILE_EXTENSION           = ' '
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
      IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
        FILE_NAME                     =  gv_filepath_sagadr
    EXCEPTIONS
      FILE_NOT_FOUND                = 1
      OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and lastly
    open dataset gv_filepath_sagadr for output in text mode encoding default.
        if sy-subrc eq 0.
         loop at gt_sagadr_text into wa_sagadr_text.
         transfer wa_sagadr_text to gv_filepath_sagadr.
         endloop.
        endif.
       close dataset gv_filepath_sagadr.
        if sy-subrc = 0.
        message S002 with gv_filepath_sagadr. "Files & created on Application server
        endif.
    SO NOT SURE WHERE TO USE THE CODE AND HOW

  • How to save the time to a .txt file and retrive it back as time?

    I have to save the time [hour:minute:second] and the date [date:month:year] to a .txt file. I am using the Calendar API to set the time and date as below
    FileOutputStream fileStream = new FileOutputStream ("what.txt");
    PrintWriter pw=new PrintWriter(fileStream, true);
    Calendar curDate = Calendar.getInstance();
    System.out.print(curDate.get(Calendar.DATE)+":");
    System.out.print(months[curDate.get(Calendar.MONTH)]+":");
    System.out.print(curDate.get(Calendar.YEAR));
    pw.println(curDate);
    I'll have to retrive these data back to use it to set timer
    timer = new Timer();
    timer.schedule(new RemindTask(), time);
    I try to retrive the data and use the Calendar API to that data by using the below program.
    I get the error as :
    C:\t\Retrivedate.java:41: int cannot be dereferenced
    System.out.print(t.get(Calendar.DATE)+":");
    How can I solve this so that I can use Calendar API on my retrived data?
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    class Test {
    public static void main(String args[]) {
    try {
    File inputFile = new File("what.txt");
    FileReader in = new FileReader("what.txt");
    int t;
    char[] tmp = new char[100];
    int cnt = in.read(tmp);
    String tm="";
    for (int j=0;j<cnt;j++)
    { tm+=tmp[j];
    try {
    t=Integer.parseInt(tm,10);
    catch (NumberFormatException exception) {}
    System.out.println("jika "+tm);
    Calendar curDate = Calendar.getInstance();
    String months[]={
    "Jan","Feb","Mar","Apr",
    "May","June","July","Aug",
    "Sept","Oct","Nov","Dec"};
    Date time1 = curDate.getTime();
    System.out.print(" \n"+time1.getHours());
    System.out.print(":"+time1.getMinutes());
    System.out.println(":"+time1.getSeconds());
    System.out.print(t.get(Calendar.DATE)+":");
    System.out.print(months[t.get(Calendar.MONTH)]+":");
    System.out.print(t.get(Calendar.YEAR));
    in.close(); }
    catch (IOException ex) {
    System.out.println("IOException:"+ex.toString()); }

    These lines do not make sense:
    System.out.print(t.get(Calendar.DATE)+":");
    System.out.print(months[t.get(Calendar.MONTH)]+":");
    System.out.print(t.get(Calendar.YEAR));
    1. t is an integer, it does not have any methods.
    2. It's a bad idea to use char[] to retrive the date. You should use readLine() method to retrieve the whole date string, say "10/23/2001" (certainly you can have hours, minutes, seconds, etc.). Then you need to use SimpleDateFormat class to parse this string. SimpleDateFormat gives you everything to parse a date string in any format you want.
    PC

  • Running OCR on Combined document saves no text to .txt file

    I am scanning in a large 500 page document, running OCR on it and saving the data to a text file for my program to process.
    My network printer/copier/scanner can only read in about 70 pages at a time, so I scanned in as several PDF documents, which I saved to disk.
    I   Recognize Text in Multiple Files using OCR...   on all of the PDF documents, Saving-As Text (Accessable) and it all works fine. I can then combine the text files in a text processor.
    Then, I saw the Combine button, so I combined all of the PDF documents into a separate PDF file and ran OCR on it, but the resulting .txt file is blank!  If I run the OCR manually, I can highlight the extract text, but when I try to save as Text (Accessable), it still fails to save any data to the .txt file.
    Is this a known problem?
    I am running Adobe Acrobat 9 Pro - Version 9.4.5.
    Thanks.

    gilgad2000,
    It depends on your VI. If you are using the "Path Control" tool, you can open its "Browse Options" and write .txt at the Pattern box.
    If you are not using it, you can also concatenate a ".txt" string at the end of the file path (use "Strip Path", "Concatenate Strings" and "Build Path" functions) just before using it on the saving function.
    Message Edited by Danigno on 07-17-2009 03:18 AM
    Attachments:
    Snap1.png ‏3 KB

  • How to save a value in a .txt n retrive back the exact value from the file?

    Well I have a number. Let's say 600. I need to save this value in a .txt file so that I can retrive this value. I tried using the below source code. It can be executed but I'll get num 49 everytime I execute it even though the value in my .txt is 600.
    try {
                   File inputFile = new File("Lt.txt");
                   File outputFile = new File("outagain.txt");
    FileReader in = new FileReader("Lt.txt");
    FileWriter out = new FileWriter(outputFile);
    int c;
              c = in.read();
              in.close();
    System.out.print("\nggggggggg"+c);
    in.close();
                   } catch (IOException ex) {
                   System.out.println("IOException:"+ex.toString());

    Thank you. I execute the program below. I can now retrive the data from the Lt.txt. But the value is limited to 3 digits. For example, the content of my file is 777888.
    When I run the program, I only get 777. How can I retrive the whole exact number?               
    import java.io.*;
                   class Test {     
                   public static void main(String args[]) {          
                   try {               
                   File inputFile = new File("Lt.txt");               
                   File outputFile = new File("outagain.txt");                    
                   FileReader in = new FileReader("Lt.txt");               
                   FileWriter out = new FileWriter(outputFile);               
                   char[] tmp = new char[3];               
                   int cnt = in.read(tmp);                              
                   System.out.print("\nRead: ");               
                   for (int i = 0; i < cnt; i++) {                    
                   System.out.print(tmp);               }               
                   System.out.println(" ");               
                   in.close();          }
                   catch (IOException ex) {               
                   System.out.println("IOException:"+ex.toString());          }     }}

  • Save digitizer and DIO waveforms into one spreadsheet file

    I am using attached mixedsignalscopeusingtclk.vi for data acquisition and would like to acquire 4-channel of data. My PXI-1042 system has PXI-5122 and PXI-6552, and I am using 2 channels of digitizer and 2 channels of digital I/O. I am using Labview 2010 SP1. The VI generated 1-D array of cluster for analog waveform and 1-D array of digital waveform. How do I save both waveforms to one spreadsheet file?
    Solved!
    Go to Solution.
    Attachments:
    mixedsignalscopeusingtclk.vi ‏258 KB

    Hi,
    You can use a Write to Measurement File express VI. Note that this is the easiest way however not the most efficient way to write to a file.
    Since you have the fetch VIs inside for loops, your output is a 1D array of waveforms. You will need to obtain the waveform element and convert it into a type that the express VI can read. If you unbundle the waveform and grab only the data and connect it straight to the express VI, LabVIEW will automatically place a "Convert to Dynamic Data" block in line to make it compatible. Same applies when you connect the boolean array to the Signals input of the express VI. And if you connect more than one signal to this input, LabVIEW will automatically place a "Merge Signals" block.
    If you reproduce the below code, you should be able to write the two channels to the same measurement file. If you have more than one channel of each type, you can grab multiple elements using the same Index Array block and take them through the same process shown below.
    Hope this helps.
    Tarek B
    Applications Engineer
    National Instruments

  • Unwanted txt files in dektop

    Please Help.
    Every time I save a file in the desktop folder (for example a MS Word file), the system automatically saves an infinte number of TXT files in the same desktop. The amount of TXT files goes in direct proportion to the size of the files saved... this means that with large files, the computer gets beach balls saving all those TXT files....
    This happens with any file type
    any ideas?

    >
    Why do you need to? You can read an InputStream or use it to create an InputStreamReader.
    I don't know if it will work, but you can try to convert the URL to a URI and File has a constructor that takes an URI.I have found no method to convert URL 2 URI. Is there such a thing?
    I need to use a File-object since I am using this method in my project:
    public String txt2String(File file) {
            String output;
            StringBuffer contents = new StringBuffer();
            BufferedReader reader = null;
            try {
                reader = new BufferedReader(new FileReader(file));
                String text = null;
                // repeat until all lines is read
                while ((text = reader.readLine()) != null) {
                    contents.append(text).append(System.getProperty(
                            "line.separator"));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try {
                    if (reader != null) {
                        reader.close();
                } catch (IOException e) {
                    e.printStackTrace();
            output = contents.toString();
            return output;
        }so... How to create a File-object from the *.jar? or is there a way to make this method use InputStream instead of File?
    Thanks

  • How to store the data typed in flash to .txt file?

    Hi all,
    I have a query to all, I have created a notepad in flash, if I typed something in that and save that file as .txt format in my local drive. So, any help on the same....
    Thanks in advance
    Santhosh Kumar M

    i don't think this is complicated enough for anyone to write a tutorial.  but i could be wrong about that.
    you have 2 steps:
    1.  use the urlloader class to send data to a server-side php script that saves your data to a .txt file
    2.  use the filereference class to download that file.
    they're both pretty easy if you use the flash help files to start you off.

  • Save a waveform chart

    Hello!
    I am trying to save a Waveform chart into a file usin the Save waveform to a file.
    I have been doing test with ramdom numbers in little programs and I was able to save then in waveforms, but I can not do the same in the program that recieves the serial data.
    I have attachet my program.
    I well be be gratefull if someone could help me. I am sure is a little thing what is wrong but I can not find it.
    Thank you for your help.
    Angel
    Attachments:
    cliente_grava.vi ‏112 KB

    And unless you only want only the very last acquisition recorded, you're going to have to change your VI. When the while loop stops, all it passes to the write waveform is the very last 1D array captured. If you want all data saved, put the write inside the while so that with every iteration you append to the same file. Or, turn on indixing where the 1D array exits the while loop. This will create a 2D array of all data acquired. Also, using Write Waveforms to file is probably not the best function unless you are actually creating a waveform datatype with timing info. Write to Spreadsheet will write a 2D array of DBLs or create a waveform datatype inside the while loop

  • Saveindg a String in a .txt-File

    Hello,
    I want to save a String to a .txt-File, that is placed in a certain directory.
    How can I Do that?
    Tank you very much!
    Greeting from cologne!
    Marcel

          * Write text to a file.
         * @param text Text to write.
          * @param fileName Name of file to write to.
          * @throws IOException on error.
         static public void writeText(String text, String fileName) throws IOException {
            if (fileName != null && text != null) {
                BufferedWriter bw = null;
                try {
                    bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fileName), "ISO-8859-1"));
                    bw.write(text, 0, text.length());
                } finally {
                    if (bw != null) { try { bw.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); }}
            }//else: input unavailable
        }//writeText()Please read D:\docs\JavaTutorial\essential\io\index.html

  • Editing .txt files inside flash

    Right now, I have it set up so that each button on my flash will open up a .txt file. I want to have it set up so that the user can not only read the txt file but edit it and save it to the original .txt file. My current code looks like this:
    dMemo.addEventListener(MouseEvent.CLICK,displayD);
    lMemo.addEventListener(MouseEvent.CLICK,displayL);
    function displayD(e:Event):void{
    txtloader.load(new URLRequest("design_vocab.txt"));
    function displayL(e:Event):void{
    txtloader.load(new URLRequest("logo_design_tips.txt"));
    var file:URLRequest = new URLRequest("instructions.txt");
    var txtloader:URLLoader = new URLLoader();
    txtloader.addEventListener(Event.COMPLETE, loadtxt);
    txtloader.load(file);
    function loadtxt(event:Event):void{
    memotext.text = txtloader.data;

    you should use the filereference class to load and save text files that you want to edit:
    var s:String;
    var fref_load:FileReference = new FileReference();
    var fref_save:FileReference = new FileReference();
    fref_load.addEventListener(Event.COMPLETE, loadcompleteF);
    fref_load.addEventListener(Event.SELECT, selectF);
    fref_load.browse([new FileFilter("Text", "*.txt")]);
    function selectF(e:Event):void {
        fref_load.load();
    function loadcompleteF(e:Event):void {
        s = e.target.data;
        // now edit the string s and when you want to save the updated text, call saveF();
    function saveF():void {
        fref_save.save(s,fref_load.name);

  • Save waveform data to .TXT

    Hi all,
    I'm acquiring data from one machine. I show all data from each channel on graph, which works OK, for different sample rate. What I want is to save this data to .TXT file.
    Please take a look at my picture. What I need into .TXT file is value for each channel at each iteration. I tried to save  "value" Y from each "build waveform", but what I get is data on picture. It's always saving previous data(see picture at bottom), but I need just:
    17:49:16
    28,192885
    17:49:16
    28,193563
    17:49:16
    28,193902
    PICTURE:
    Rookie; LV 2011 on WIN 7

    I'm saving like this (I know I must put "open and close" block outside of while loop, but this is not my problem right now). How can I index then to save just value of each itteration...
    Rookie; LV 2011 on WIN 7

  • Thousands of individual .txt files being created while using "next available file name" option in Save to ASCII step

    I'm using Signal Express to record Load vs Displacement data and export it to a format our engineers can work with (in this case ASCII is okay). It would seem that by selecting the Next Available File Name from the drop down arrow it would do just that. For instance a typical save path for me would look like C:\....Desktop\Project Number and Description\Run_1.txt within that Run1.txt file would be all the data points for that run. When I hit record again Signal Express would (SHOULD) create a Run_2 since it's the Next Available File Name.
    But instead what it does is creates a single txt file for every single sample point being read. Needless to say, If I'm recording 6 second of data at 1khz I end up with thousands of txt files!
    The first thing that comes to mind is, why would anyone want this?
    Second is how can I record multiple individal runs for the same project and have the file name increment?
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise

    ...and more attachments of the ASCII save path, before and after acquiring 4 seconds of data along with one of the files from that folder.
    Again, this is 4 seconds of two-channel spring  plot data at 100 Samples to Read @ 1k Rate (Start Run.... wait 4 seconds or two full test sample cycles... Stop Run).
    ~EDIT~
    The .txt file would not attach (I think it's too small). Here's what it looks like if you were to open it:
    Load vs Displ - Displ (inches)    Load vs Displ - Load (lbs)
    3.736323                              273.751906
    Also, for some reason it won't let me attach my project file. It's a .seproj extension but the forum thinks it's 1k in size and "empty"
    Message Edited by OKors on 06-05-2009 05:57 PM
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise
    Attachments:
    FolderBeforeSave.JPG ‏39 KB
    FolderAfterSave.JPG ‏239 KB

  • Corruption in cshelp.txt file on save

    When I add a topic ID to the cshelp.txt file using the
    Context Sensitive Text-Only Topics editor and click Save, I get an
    error message about an invalid file. When I open the file in
    notepad it looks like this:
    . t o p i c H I D C _ B U T T O N _ C H A N G E _ S E T T I N
    G S _ S E C U R I T Y _ P R O P S _ P R O P P A G E
    T e s t t e x t
    The editor has added a space between each character (and
    removed one after topic). I think it is related to Unicode
    enhancements in RH7, but it means I cannot create a help file (CHM)
    that has working CS help.
    Has anyone got a workaround for this?
    Thanks

    I started this thread and have since developed a workaround
    (similar to jc@salient) which I have detailed in a two-page Word
    document. The document also explains several RoboHelp defects
    related to this problem (hint to any Adobe people who monitor this
    forum).
    This interface doesn't seem to allow attachments; so, if
    anyone needs a copy, email me at [email protected] and
    ask for it. Please put Robohelp on the subject line.
    If anyone adds refinements later, please share.
    Regards

  • How do I save a file as an unformatted txt file instead of html or rtf?

    How do I save a file as an unformatted txt file instead of html or rtf?

    Use menu Image>Image Size in the image size dialog uncheck Resample and enter 300 in the resolution field and click OK.  Note no Pixels are changed only the resolution setting get changed.  The use Menu Fils>Save As in the save as dialog use the file type pull down and select Tiff then click Save
    In the Tiff Option Dialog in the Image Compression  section set None The click OK.

Maybe you are looking for

  • Sharepoint 2013 master/detail

    In a sharepoint 2013 web part, I am planning to have a master/detail association. The master will contain data that does not change where the detail will be data that is entered on a weekly basis. My questions include the following: 1. My fist questi

  • Can I reduce the execution time for a step in a TestStand ?

    Hi, I calculated the a single step execution time for TestStand Ver 2.0. It comes to around 20 milliseconds/step. Can I reduce this excution time ? Are there any settings available for configuring execution time parameters except result logging and e

  • No Power Nap option Late 2011 MacBook Pro

    Here is what the specs for Power Nap say: Power Nap Supports MacBook Air (Mid 2011 or newer), MacBook Pro with Retina display. Does that mean that Power Nap is not supported with my Late 2011 MacBook Pro?

  • Printing Woes Adobe Reader 10.1.1

    I'm having trouble printing from the new version of Adobe Reader 10.1.1.  I was previously using Version 8 but a website I was printing patterns from sent me a pdf which required me to upgrade to Version 10.1.1 to access it and now I can't print my p

  • Lost serial number for microsoft office and can't reinstall on new hard drive

    I recentlyt had to replace the hard drive on MacBook Pro and can't reinstall Microsoft Office because I don't have the required  serial #. I think it was originally installed when I bought the computeer at an Apple store. Any ideas about how to solve