Weird data reached in text files

Hi all,
I am seeking for some opinions about a problem I encouter in an
experiment. I would very much appreciate your thoughts. There are the
well-known programs in the Example Finder:
1. Write binary file - which takes inputs from a sinus wave generator.
2. Cont Acq& Graph Voltage - which in my case takes the input from a channel of a DAQ NI 6255
So with these two I get two binary files from which I want to extract the information by means of a conversion to a text file.
When I convert the bin files to text, I use the same VI program (which
I attached) to do that. The conversion for the 1st VI looks as
expected, but for the 2nd is really weird!.
For the data in the 1st text file see textFile.txt file attached.(One would get the same result if it runs the VI):
For the data in the second text file, see textmydaq2.txt file
attached.(The data should normally record values ranging from 4.XX to
8.XX):
Should I constraint the data with some data format to avoid such strange values? Or is it something else I should do?
Thank you very much for any kind of support.
Dana
Attachments:
myRead Binary File8.vi ‏28 KB

I can see there is a problem for the server to upload maybe other files(like txt files) different than VIs.
As I cannot attach the txt files, I will provide you with samples:
Here is a sample for the 1st text file(One would get the same result if it runs the VI):
0.00    376.74    752.00    1124.29    1492.14    1854.10    2208.75    2554.68    2890.52    3214.96    3526.71    3824.54    4107.28    4373.81    4623.08    4854.10    5065.97    5257.84    5428.96    5578.66    5706.34    5811.50    5893.72    5952.69    5988.16    6000.00    5988.16  
Here is the result in the second text file(The data should normally record values ranging from 4.XX to 8.XX):
0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    73333305348950320900000000000000000000000000000000000000000000000000000000000000000000000000.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    633318785695744.00    0.00    0.00    0.00    9663677760.25    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  
Best!
Dana

Similar Messages

  • How to load Test data from a Text file in ECATT

    Hi,
    I have created a test configuration with a test script, system data container, and test data container.
    I have done the recording of a transaction and created the script. Parameterization is done for the script and have imported those parameters from script in to the data container.
    I am trying to load a the data from a text file on the local work-station. The data is not being read.
    Please explain this in detail (step by step) as I am very new to ECATT.
    I am trying this on SAP ECC 6.0 IDES server.
    Thanks in Advance
    Vikas Patil

    Please explain this in detail (step by step) as I am very new to ECATT.
    Thanks in Advance
    Vikas Patil

  • How do you read data from a text file into a JTextArea?

    I'm working on a blogging program and I need to add data from a text file named messages.txt into a JTextArea named messages. How do I go about doing this?

    Student_Coder wrote:
    1) Read the file messages.txt into a String
    2) Initialize messages with the String as the textSwing text components are designed to use Unix-style linefeeds (\n) as line separators. If the text file happens to use a different style, like DOS's carriage-return+linefeed (\r\n), it needs to be converted. The read() method does that, and it saves the info about the line separator style in the Document so the write() method can re-convert it.
    lethalwire wrote:
    They have 2 different ways of importing documents in this link:
    http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
    Neither of those methods applies to JTextAreas.

  • How can I plott data from a text file in the same way as a media player using the pointer slide to go back and fort in my file?

    I would like to plott data from a text file in the same way as a media player does from a video file. I’m not sure how to create the pointer slide function. The vi could look something like the attached jpg.
    Please, can some one help me?
    Martin
    Attachments:
    Plotting from a text file like a media player example.jpg ‏61 KB

    HI Martin,
    i am not realy sure what you want!?!?
    i think you want to display only a part of the values you read from XYZ
    so what you can do:
    write all the values in an array.
    the size of the array is the max. value of the slide bar
    now you can select a part of the array (e.g. values from 100 to 200) and display this with a graph
    the other option is to use the history function of the graphes
    regards
    timo

  • How to extract  different date format in text file

    well, iam new for using regex api(regular expression), In my project i want to extract the different format of date from the text file... date format will be 3rd june 2004, 03-06-2004, june 3rd and so on....
    can any body give me regular expression to extract the date from the text file...
    i will be very grateful..
    kareem

    date format will be 3rd june 2004, 03-06-2004, june 3rd and so on....The only way to do this (without implementing a "mind reader") is to determine in advance all the possible date formats that are possible in your input, and try to interpret each date using each of those formats until one of them passes.
    It's easy enough to handle june 3rd vs 3 june vs 3rd june, but 6/3 vs 3/6, of course, is ambiguous.

  • How to automate loading data from a text file ?

    Hi,
    I need to load a data form a text file automatically. (for example: every day at 6.p.m) .
    It is possible to use DBMS_SCHEDULER with SQL LOADER ? or maybe u have others idea ?
    regards,

    assuming that the text file resides at the machine where the database is installed at you can create a procedure that use the built-in UTL_FILE package to read and load the data to the oracle tables. then create a job that use the DBMS_JOB or DBMS_SCHEDULER to create an automated schedule to run the job that calls the procedure you have created.
    or assuming that the text file resides or at the local/client machine (example c:\ drive) on a windows xp platform. create a batch file that do a ftp to transfer the text file to the oracle database server and create a schedule job using the windows scheduler. also create a procedure that use the built-in UTL_FILE package to read and load the data to the oracle tables. then create a job that use the DBMS_JOB or DBMS_SCHEDULER to create an automated schedule to run the job that calls the procedure you have created.

  • How to parse data from a text file with no convenient delimiters?

    I need to read data from a text file.  This file contains one line of data with the repeating pattern "time 00 ADVar2: ___ Height: ____ time 01 ADVar2: ___ Height: ___ ..."  I need LabView to parse out the "time" and "height" values, build an array with the values, and graph the correlation on an X&Y plot.  Does Labview have an automated way to read to the input data file and parse out the correct values, even without convenient delimiters?  Thank you.

    You actually do have a convenient delimiter: "time". Thus, you can make an array using that as the delimiter. Only caveat is that the first array element will be empty. Then you can conveniently use the Scan From String function in a for-loop. Something like this:
    Message Edited by smercurio_fc on 11-21-2008 03:13 PM
    Attachments:
    Example_VI.png ‏9 KB

  • Write data to multiple text files after specific size

    Hello,
    I wrote a code that contineously writes data to  a text file. The problem is I am running this VI for long time and therefore this text file is being bigger in size e.g. more than 10MB. I want to split writing data in this text file after max 1MB size. Can anyone help ????
    thanks in advance.

    CMW.. wrote:
    You could use the "File/Directory Info Function" in the Advanced File VIs and Function palette to check the size. If the file is too big. close it and create a new one.
    I would use the Get File Position since this won't cause Windows to have to do so much.  Assuming you are just writing and not setting the file position manually, this will return the size of the file in bytes (file position will always be at the end of the file).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Read data from a text file, one line at a time.

    I need to read data from a text file, and display each line in a String Indicator on Front Panel. It displays each line, but I get Error 4, End Of Line, unless I enter an extra line of data in the file that I don't need. I tried Read From Text File.vi, made by Nat Instr, and it gave the same error.

    The Read from Text File.vi reads data from a text file line by line until the user stops the VI manually with the Stop button on the front panel, or until an error (such as "Error 4, End of file") occurs. If an error occurs, the Simple Error Handler.vi pops up a dialog that tells you which error occurred.
    The Read from Text File.vi uses a while loop, but if you knew how many lines you wanted to read, you could replace the while loop with a for loop set to read that many lines from the file.
    If you need something more dynamic because the number of lines in your files vary, then you could change the code of the Read from Text File.vi to the expect "Error 4, End of file" and handle it appropriately. This would require unbundling the error cluster that comes fro
    m the Read File function with the Unbundle By Name function, so that you can expose the individual error "status" and error "code" values stored in the cluster. If the value of the error "code" is 4, then you can change the error "status" from true to false, and you can rebundle the cluster with the Bundle by Name function. Setting the error "status" to false instructs the Simple Error Handler to ignore the error. Otherwise, pass the original error cluster to the Simple Error Handler.vi, so that you can see what the error is.
    Of course, if you're not interested in what the errors are, you could just remove the Simple Error Handler.vi, but then you wouldn't see any error messages.
    Best of Luck,
    Dieter
    Dieter Schweiss
    Applications Engineer
    National Instruments

  • How can I use Automator to extract specific Data from a text file?

    I have several hundred text files that contain a bunch of information. I only need six values from each file and ideally I need them as columns in an excel file.
    How can I use Automator to extract specific Data from the text files and either create a new text file or excel file with the info? I have looked all over but can't find a solution. If anyone could please help I would be eternally grateful!!! If there is another, better solution than automator, please let me know!
    Example of File Contents:
    Link Time =
    DD/MMM/YYYY
    Random
    Text
    161 179
    bytes of CODE    memory (+                68 range fill )
    16 789
    bytes of DATA    memory (+    59 absolute )
    1 875
    bytes of XDATA   memory (+ 1 855 absolute )
    90 783
    bytes of FARCODE memory
    What I would like to have as a final file:
    EXCEL COLUMN1
    Column 2
    Column3
    Column4
    Column5
    Column6
    MM/DD/YYYY
    filename1
    161179
    16789
    1875
    90783
    MM/DD/YYYY
    filename2
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    MM/DD/YYYY
    filename3
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    Is this possible? I can't imagine having to go through each and every file one by one. Please help!!!

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How to do import data from the text file into the mathscript window?

    Could anyone tell me how to do import data from text file into mathscript window for labview 8?
    MathScript Window openned, File, Load Data - it has options: custom pattern (*.mlv) or all files. 
    Thanks

    Hi Milan,
    Prior to loading data in Mathscript Window , you have to save the data from the Mathscript window (the default extension of the file is .mlv but you can choose any extension). This means that you cannot load data from a text file  that was not created using the Mathscript window.
    Please let me know if you have any further questions regarding this issue.
    Regards,
    Ankita

  • Need to read data from a text file

    I need to read data from a text file and create my own hash table out of it. I'm not allowed to use the built in Java class, so how would I go implementing my own reading method and hash table class?

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error while loading data from a text file to a datastore

    Hi all,
    i am a starter in ODI. I am trying to load data from a text file into a datastore. I have put the file on a unix server whose location is defined in the topology manager. when i am trying to "view data" it is giving me error file does not exist at <location where i have put the file>. Please help me

    Hi,
    1. If your files are on a remote File System, you will need to copy one of your files to the machine ODI Designer is running on to allow ODI to retrieve the metadata information of the file.
    2. In Topology create a Physical Schema, the directory you enter for Data and Work Schema should point at this local file.
    3. Then define the File Datastore in ODI Designer. Enter a name, browse and select the file and fill in each filed of the Files tab.
    * If its a Fixed file, click on the grid icon on the Columns tab to enter the columns and have Automatic Adjustment checked.
    * If its a Delimited file, use the Reverse button on the Columns tab to reverse the columns.
    * Right click on the File Datastore select View Data, if you can view data, that means the File Datastore has been defined correctly.
    * If not, check each tab of the File Datastore to make sure everything is defined correctly and retry.
    4. Once View Data is successful, you now change the directories (Data and Work Schema in Topology) to point at the remote File System. These directories must be accessible to the ODI Agent that will be used to run the transformations. The directory can be an absolute path (m:/public/data/files) or relative to the ODI Agent startup directory (../demo/files). It is strongly advised to use a UNC (independent from the execution location) for the path. When running the transformations with "no agent", the directory is relative to the directory where Oracle Data Integrator has been installed.
    You need to have a agent process running at the system where your source file resides .
    Then while running the odi interface choose that agent .
    Thanks,
    Sutirtha

  • Saving data retrieved from text file to JDBC table

    Hi,
    I would like to save data, loaded from a text file to a dataset, into an existing JDBC table.
    The documentation I found on this subject is very brief, and no matter how I tried, I couldn't succeed.
    I would appreciate any help.
    Thank you in advance

    Hi there,
    Here is an example of reading a String and a date from a text file. Once you have what you need in the Strings (or whatever) it should be easy to insert them into and SQL statement. Let me know if you need an example of this as well and I'll post it in the morning. Right now I'm off to bed :o)
    Cheers
    Mark
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class WriteTest {
    public static void main(String [] arg) throws Exception {          
       Date today = new Date();          
       String name = "";          
       SimpleDateFormat formatter = new SimpleDateFormat("ddMMyyyy");          
       File myfile = new File("hello.txt");               
       // how to input     
       BufferedReader in = new BufferedReader(new FileReader(myfile));          
       String name="",
       date="";          
       boolean eof = false;          
       do {
          name = in.readLine();               
          date = in.readLine();               
          if(!(eof = (name==null || date==null)))                    
          System.out.println(name+" "+formatter.parse(date));
       while(!eof);     
    }

Maybe you are looking for