How to search a .csv file for data using its timestamp, then import to labview

Hi, I'm currently obtaining density, viscosity and temperature data from an instrument, adding a timestamp and writing it to a .csv file which I can view in Excel. This works fine (see attached code) but what I need to do now is to search that csv file for data which was obtained at a certain time, import the temperature, density & viscosity values at this time back into Labview to do some calculations with them, while the data acquisition process is still ongoing.
I've found various examples on how to import an entire csv file into labview, but none on how to extract data at a specific time. Also, whenever I try to do anything with the .csv file while my data acquistion VI is running, I receive error messages (presumably because I'm trying to write to and import data from the .csv file simultaneously). Is there some way around this, maybe using case structures?
If you need to know my skill level, I've been using Labview for a few weeks and prior to that have basically no experience of writing code, so any help would be great. Thanks!
Solved!
Go to Solution.
Attachments:
Lemis VDC-30 read registers MODBUS v5.vi ‏56 KB

It sounds as if you are going about this a little backwards writing to a data file and then extracting from the file but its the weekend so I can't think of an improved way to do it at the moment. 
Searching for a specific time with those specific values is quite easy, or if you wanted to select any time then you could interpolate the values to find any value that you want (This is where the contiguous measurement comes in, as you have readings at discrete times you will have to interpolate the values if you want to get the 'measured value' at a time point that is not exactly one of your measured points).
If you can extract the TDMS time column and the T, D & V then simply thresholding and interpolating each of your array/data sets should allow readings at your desired times.
Attachments:
Interpolate.png ‏301 KB

Similar Messages

  • Create csv file for data in tables

    Hi All,
    I need to "export" data for about 60 tables in one of my databases to a csv file format using a "|" as a separator.
    I know I can do this using a query like:
    select col1 || '|' || col2 || '|' || col3 from table;
    Some of my tables have more than 50 columns so I'm guessing there is an easier way to do this than to construct select SQL statements for each table?
    Thanks in advance.

    I would point out that the OP did not identify the target for the files so it could be an non-Oracle database or Excel in which case external tables would not work since Oracle only writes to external tables in datapump format.  If the target is another Oracle database then external tables would be an option.  If external tables are an option then insert/select over a database link would be a potential alternate approach to using csv files.
    I use a SQL script to generate the Select statement to create my csv files.
    set echo off
    rem
    rem SQL*Plus script to create comma delimited output file from table
    rem
    rem 20000614  Mark D Powell   Automate commonly done task
    rem
    set pagesize  0
    set verify    off
    set feedback  off
    set linesize  999
    set trimspool on
    accept owner    prompt 'Enter table owner => '
    accept tblname  prompt 'Enter table name => '
    spool csv2.sql
    select 'select ' from sys.dual;
    select decode(column_id,1,column_name,
                 '||''|''||'||column_name)
    from   sys.dba_tab_columns
    where  table_name = upper('&&tblname')
    and    owner      = upper('&&owner')
    order by column_id;
    select 'from &&owner..&&tblname;'
    from   sys.dual;
    spool off
    undefine owner
    undefine tblname
    HTH -- Mark D Powell --

  • "dtutil", how to tell which configuration file for packages using after deployment?

    Hello All, 
    Trying to achieve this feature, 
    Using DOS command to automatic my deployment process--glad I found dtutil. However, it doesnt give you any chance to identify which configuration file to be used by SSIS packages after deployment.
    Deployment Method: file deployment
    Configuration sued: XML file and SQL Table. IN XML file, it tells which DB connection for packages to look up the configuration table.
    Who can share some thoughts on this?
    Derek

    It is NOT about sequence.
    It is about how to point which configuration file to be used by deployed packages as during the "dtutil.exe"
    deployment, you dont have chance to identify which physical location confg files to be used.
    Derek
    That you do only at the time of execution of packages. By default it uses configuration settings created at design time within the package. If you want to override it, you can use \Configfile switch of dtexec for that. You can also set explicit values for
    properties using /SET switch
    http://technet.microsoft.com/en-us/library/ms162810(v=sql.105).aspx
    See this to understand how configs are applied in runtime
    http://technet.microsoft.com/en-us/library/ms141682(v=sql.105).aspx
    and this to understand behaviour difference in ssis 2008 
    http://technet.microsoft.com/en-us/library/bb500430(v=sql.105).aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Can I use Office 2007 csv file for data load?

    Hi all,
    I see some special characters while looking at data after load.
    I am using the latest version of microsoft office.
    Does SAP BW support the csv files saved in 2007 version?
    Thanks and Regards,
    Ravi.

    Hi Ravi,
    This is another error.
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
    Error Message:
    Error 1 when loading external data
    Error when opening the data file
    Errors in source system.
    Step By step analysis:
    Data Request sent off?
    Data Selection sucessfully started?
    Data se;ection sucessfully finished?
    Processing error in source system reported?
    Processing error in warehouse reported?
    Could you please guide me houw to overcome these. Thanks.

  • How to read a .csv file(excel format) using Java.

    Hi Everybody,
    I need to read a .csv file(excel) and store all the columns and rows in 2d arrays. Then I can do the rest of the coding myself. I would like it if somebody could post their code to read .csv files over here. The .csv file can have different number of columns and different number of rows every time it is ran. The .csv file is in excel format, so I don't know if that affects the code or not. I would also appreciate it if the classes imported are posted too. I would also like to know if there is a way I can recognize how many rows and columns the .csv file has. I need this urgently so I would be very grateful to anybody who has the solution. Thanks.
    Sincerely Taufiq.

    I used this
    BufferedReader in = new BufferedReader (new FileReader ("test.csv"));
    // and                
    StringTokenizer parser = new StringTokenizer (str, ", ");
                    while (parser.hasMoreTokens () == true)
                    { //crap }works like a charm!

  • Add JPEG files for data use?

    Hello all:
    I'm looking for a solution to a simple question. After I have created a slideshow in iMovie '09 and moved it to iDVD '09, can I add another "chapter" that has all of the photo JPEG's in it that will allow the user to upload them to their computer or print them somewhere? Essentially, I have created a project for a memorial of a loved one that has died - it came out beautiful. But now I want to also include her family's ability to copy the now scanned photos and do with them as they wish. I'm basically looking to avoid making a second data disk to include with the DVD I've created.
    Any direction or assistance on this is greatly appreciated!

    John,
    Thank you so much for your fast and accurate response. I did as you said (Advanced > Edit DVD-ROM Contents) and it worked great! I'm very excited to give this gift away and now it can include their scanned photos in JPEG format.
    Happy Thanksgiving to you and yours!

  • HT2486 how can I export the contact book data to a csv file for editing?

    how can I export the contact book data to a csv file for editing?

    You can edit a card right in Contacts. No need to export and re-import.
    Select a name and on the right side, click the Edit button:

  • How can i get sample CSV files for Demo BI Content

    Hello Experts. Documentation say that there is sample CSV files for modules that come with delivered BI content. I am planning to work with the demo content which i have already installed. I then need to populate the objects with the relevant demo data that is said to be in the CSV files that come with the demo content. Please let me know from where i can get these CSV files. Good day.

    Hi Huggins,
    There are sample csv data in AL11 in the work directory.  You may want to look through here to see if the csv files you require are there.
    Thanks,
    Nick.

  • How to read .db file for Data services in Linux Environment

    Hi all,
    Can anyone tell me how to read a .db file for SAP BODS 4.0 which got installed in Linux?
    This is Urgent...

    If we are talking about MS Access, AFAIK there is no native support of that format in SAP Data Services. You may try to find ODBC driver fot that.
    Thank you,
    Viacheslav.

  • 2.5 GB CSV file as data source for Crystal report

    Hi Experts,
        I  was asked to create a crystal report using crystal report as datasource(CSV file that is pretty huge (2.4Gb)). Could you help with me any doc that expalins the steps mainly with data connectivity.
    Objective is to create Crystal Report using that csv file as data source, save the report as .rpt with the data and send the results to customer to be read with Crystal Reports Viewer or save the results to PDF.
    Please help and suggest me steps as I am new to crystal reports and CSV as source.
    BR, Nanda Kishore

    Nanda,
    The issue of having some records with comma and some with a semi colon will need to be resolved before you can do an import. Assuming that there are no semi colons in any of the text values of the report, you could do a "Find & Replace" to convert the semi colons to commas.
    If find & replace isn't an option, you'll need to get the files separately.
    I've never used the Import Export Wizzard myself. I've always used the BULK INSERT command
    It would look something like this...
    BULK INSERT SQLServerTableName
    FROM 'c:\My_CSV_File.csv'
    WITH (FIELDTERMINATOR = ',')
    This of course implies that your table has the same columns, in the same order as the csv files and that each column is the correct data type to accept the incoming data.
    If you continue to have issues getting your data into SQL Server Express, please post in one of these two forums
    [Transact-SQL|http://social.msdn.microsoft.com/Forums/en-US/transactsql/threads]
    [SQL Server Express|http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/threads]
    The Transact-SQL forum has some VERY knowledgeable people (including MVPs and book authors) posing answers.
    I've never posed to the SQL Server Express but I'm sure they can trouble shoot your issues with the Import Export Wizard.
    If you post in one of them, please copy the post link back to this thread you I can continue to to help.
    Jason

  • Performance issue with big CSV files as data source

    Hi,
    We are creating crystal reports for a large banking corporation with CSV files as data source. For some reports, we need join 2 csv files. The problem we met now is that when the 2 csv files are very large (both >200M), the performance is very bad and it takes an hour or so to refresh the data in Crystal Reports designer. The same case for either CR 11.5 or CR 2008.
    And my question is, is there any way to improve performance in such situations? For example, can we create index on the csv files? If you have ever created reports connecting to CSV, your suggestions will be highly appreciated.
    Thanks,
    Ray

    Certainly a reasonable concern...
    The question at this point is, How are the reports going to be used and deployed once they are in production?
    I'd look at it from that direction.
    For example... They may be able to dump the data directly to another database on a separate server that would insulate the main enterprise server. This would allow the main server to run the necessary queries during off peak hours and would isolate any reporting activity to a "reporting database".
    This would also keep the data secure and encrypted (it would continue to enjoy the security provided by an RDBMS). Text & csv files can be copied, emailed, altered & deleted by anyone who sees them. Placing them in encrypted .zip folders prevents them from being read by external applications.
    <Hope you liked the sales pitch I wrote for you to give to the client... =^)
    If all else fails and you're stuck using the csv files, at least see if they can get it all on one file. Joining the 2 files is killing you performance wise... More so than using 1 massive file.
    Jason

  • How to install knowledge base file for oracle text

    how to install knowledge base file for oracle text?
    there are couple of files droldUS.dat,.. which are required to generate gists and themes, where can i find them or install them.
    please help!

    I checked the download page and it says:
    "All Release 2 download pages contain Oracle Companion, Client, Clusterware, Gateways, and Application Express standalone downloads"
    so you should already have it. Try searching for the filename that was in your error message.

  • Urgent + Search a delimited file for more then one string

    Hi All
    Urgent please help I am trying to search a file for 2 different strings.
    This is how the command prompt will look like
    java match "-t|" -4 -f Harvey -10 -f Atlanta callbook.txtPlease help me with identifying how many search criterias have been entered on command prompt.
    "-t|" - denotes a delimiter
    -4 - denotes the field number
    -f - case sensitive
    Thanks

    Hi
    Thanks for your quick response and I apologise I will never put urgent on my posting again.
    C:\>java match "-t|" -4 -f Harvey -10 -f Atlanta callbook.txt
    This example lists records for Atlanta with first name Harvey.
    I am able to get one search criteria but when I have 2 as above (Harvey and Atlanta) I get lost I do not know how to get these arguments from the commandline and still do a search correctly. My code at the moment is doint a hard coded search so I was trying to extract the arguments that's where I got stuck.
    The main aim of my app is to search a delimited file for a search criteria passed through a command prompt.
    This is what I have done so far.
    import  java.io.*;
    import java.util.*;
    public class assess1
        static public void main(String args[])
            int[] totals = new int[10];
            try
                BufferedReader inFile = new BufferedReader(new FileReader(args[0]) );
                try
                    String line;
              String StrSearch = "HARVEY";
              int counter = 0;
                    boolean foundIt = false;
                    while((line = inFile.readLine()) != null)
                     // search for the string
                      String[] values = line.split("\\|");
                       for (String str : values) {
                   if (str.equals("HARVEY")) {
                               System.out.println(line);
                             System.out.println();
                        counter++;
              if (counter == 0) {
                   System.out.println("String not found");
              inFile.close();
                catch(IOException e)
                    System.err.println("IO exception");
                    System.exit(1);
                catch(NumberFormatException e)
                    System.err.println("Value " + e.getMessage() + "not numeric");
            catch(FileNotFoundException e)
                System.err.println( "Couldn't open " + e.getMessage() );
                System.exit(1);
    }

  • How to create the exe file for java project.

    How to create the exe file for java project.
    am done the project in java swing , i like to create the project in exe format, so any one help for me,
    send the procedure for that.
    thanking u.

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • How to write a CSV file in OSB

    Hi All,
    can any one tell me How to write a CSV file in OSB?
    Thanks.

    Hey, I couldnot find any xsl usage inside pipeline pair in the links given by you. Do you have any links that gives a sample example.I could not find any links with examples. I will send you a simple config jar demonstrating the use of XSLT resources/transformations.
    secondly should MFL doc replicate the name(s)of the nodes of the source xsd:I'm not sure If I understood your question.Can you please explain?
    Ex: My database schema looks like:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/AssetsPoll" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/AssetsPoll" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="CountriesCollection" type="CountriesCollection"/>
    <xs:complexType name="CountriesCollection">
    <xs:sequence>
    <xs:element name="Countries" type="Countries" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Countries">
    <xs:sequence>
    <xs:element name="countryId">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="countryName" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="40"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="regionId" type="xs:decimal" minOccurs="0" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    and the corresponding MFL that I have created gives this output
    <?xml version="1.0" encoding="windows-1252"?>
    <countriesCollection1>
    <Countries>
    <counrtyId>counrtyId</counrtyId>
    <country_name>country_name</country_name>
    <regionId>regionId</regionId>
    </Countries>
    <Countries>
    <counrtyId>counrtyId</counrtyId>
    <country_name>country_name</country_name>
    <regionId>regionId</regionId>
    </Countries>
    </countriesCollection1>
    Why I am asking this beacuse there is an error that i am getting:
    Jun 19, 2009 5:50:50 PM IST> <Error> <JCATransport> <BEA-381951> <JCA inbound r
    quest only invocation failed, exception: java.security.PrivilegedActionExceptio
    : com.bea.wli.sb.transports.TransportException: Binary to XML mfl transformatio
    failed for the MFL Resource Database-Jms-File/Database-File/MFLSample : null
    ava.security.PrivilegedActionException: com.bea.wli.sb.transports.TransportExce
    tion: Binary to XML mfl transformation failed for the MFL Resource Database-Jms
    File/Database-File/MFLSample : null..................................................
    Any help?
    Regards
    PS

Maybe you are looking for