Use scan rate to establish a time stamp

I am collecting data and saving it to a csv file without a time stamp.  I would like to add a time stamp to each measurement and was wondering if it is appropriate to use the sample rate and data capture start time to add a time stamp.  For example I have 4 channels sampling at 100 hz.  I can use the file creation date/time as the time I begin my measurements and increment 0.001 seconds from that point on.  I think this is accurate for a small number of samples but I am concerned that over several hours of data collection and several hundred thousand points if the timing will drift causing an error that will be compounded with such a high number of samples.
Any thoughts?

If your sample rate is 100 Hz, you need to increment your times by 10 ms, not 0.001 s.
The hardware clock in the DAQ board, the tick counter clock, the computer's time of day clock, and your wrist watch will all have slightly different frequencies.  Timekeeping by by any of these sources will be fairly stable and consistent with itself, but will drift with respect to any of the others.  As Flash said above, jitter will be negligible with the hardware clock.
You need to decide how much error an what kinds of errors are allowable in your system.  That will then determine the type of timekeeping required.  Unless you have very stringent timing requirements, what you are proposing to do should work fine. 
Lynn

Similar Messages

  • Use files based on a date/time stamp in order

    I have a PL/SQL procedure that is using BFILE to pick-up and read a file. The file will have the same starting characters for every file followed by a date/time stamp: AAAA_09232009
    I need my procedure to use the file with the oldest date first and then rename the file after the procedure has run through it. Can anyone assist me in this? Below is the beginning of the procedure --Thanx in Advance:
    create or replace PROCEDURE XML_READ_FILE
    as
    v_bfile BFILE := BFILENAME('XML_DIR', 'AAAA_09232009.xml');
    v_clob CLOB;
    BEGIN
    DBMS_LOB.createtemporary(v_clob, TRUE);
    DBMS_LOB.OPEN(v_bfile, DBMS_LOB.lob_readonly);
    DBMS_LOB.loadfromfile(v_clob, v_bfile, DBMS_LOB.lobmaxsize);

    See if this helps:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584

  • Time stamps not linear

    Hi,
    I have a DAQ USB-6251 driven by labview.
    The time stamps on the text file have backward and forward jumps in them.  See attached for picture.
    They increase linearly for about 12000 samples, then jump backwards
    about a 3 sec, linearly increase for about 1000, then jump forward
    about 6 seconds.  This cycle then repeats ie increasing nice and
    linearly for about 12000 samples, jumping back etc.
    I suspect there is a buffer somewhere which fills up and then acts strangly when trying to reset.
    Any explanations?  Any solutions?
    Here's some further info about my setup:
    Producer loop:
    I generate a continuous analog output signal which I feed back into one of analog input pins which I also continuously acquire.
    The generation and acquisition both have sample rates of 4096
    samples/sec and 1024 samples are set to acquire/generate per loop.
    The recorded input is enqueued.
    Consumer loop:
    Dequeues data and write to text file.
    Regards,
    Jamie
    Using Labview version 8.0
    Attachments:
    time stamps not linear.jpg ‏17 KB

    Ben,
    Maybe this is a good chance for me to learn (be convinced of) something then.  I'd try this out for myself on hw, but I've got tests running now.
    Let's suppose I have both an AI and an AO task, both set up to start off the same sample clock.  However, the AO outputs on the leading edge of a clock while the AI samples on the trailing edge of the clock.  Let's further stipulate that the clock is generated by an on-board counter at 5 kHz with 90% duty cycle.  So the AO update occurs 180 microseconds before the AI.  How do waveforms handle this offset in t0?  Will t0 simply be set to 0 because of the use of an "external" sampling clock?  Or will the two t0 values be equal and non-zero?  Or will they be sometimes equal and sometimes different, depending on the "phase" of the system clock -- either the 1 msec one or the 16 msec one used for system timestamps?
    Now, concerning triggering:  Does t0 represent the time of the trigger?  Or of the first sample / output *after* the trigger?  Or is it the time you call DAQmx Start prior to receiving a trigger signal?
    Other concern: even when not *strictly* necessary, I try to make a habit of making code that runs pretty efficiently, unless that puts an undue burden on development / maintenance effort.  My experience with processing large arrays vs. processing clusters containing large arrays has suggested that pure arrays are typically significantly more efficient to manage.  (I'm sure it depends on sizes and kinds of processing too.)  Aren't waveforms essentially cluster-like?
    Well, enough of the blah, blah, blah.  I really *am* interested.  I know many of the analysis functions prefer (if not require) waveform inputs rather than raw arrays these days, so there are some clear code simplicity advantages to waveforms IF I can be convinced that I'm fully informed of the downsides and gotchas.  (Another example of worry: when integrating a waveform, how does the floating point roundoff accumulate from the 'dt' value?  Will results late in a long array contain more cumulative roundoff error?)
    -Kevin P.

  • How to Convert a 'Time Stamp' field to Date......?

    Hello Gurus:
    I am using a Generic Extractor to pull some stats data.  One of the field is a Time Stamp field, which tells me the date and time of Transaction run.  I only need "Date".  I tried mapping the stamp field to Date info-object hoping for a automatic determination of the Date.... (like the Week, Month happens).   Well, I was wrong! 
    I only need the Date part.  How can I do this in BI?  is teher a specific SAP info-object for this that could be used..?  If not, what would be the routine.  The Date field that comes in is a SAP format... "u201C20,070,505.0000000u201D meaning the Transaction was run
    on 05/05/2007.  How can I get this convertion in BI transaformation??  is there a special Routine...?
    Also, we are trying to use "Time Stamp" based DELTA from a generic extraction.  The field used is a System date with time stamp.  Value looks like u201C20100,505,170,113.2918470u201D, u201C20100,505,170,113.4748820u201D  Every record pulled has a different value... probably giving me the time at which the record was created or generated.  Now, with DELTA specifid on this type of field, what will be the 'Current Status" value in Delta queue?  Is it based on the last record created and will that be the highest value?  For next Delta extraction, does it compare the extraction time stamp to this value and bring in those records that are greater than the 'Current Status" value?  I guess with that we can have as many deltas as we want..... right??  is there any particular setting I should be doing or worried/ careful about setting etc....?
    Thanks for the response in advance....
    Best..... SMaa

    Thanks Akshay,
    Your suggestion worked right away and was probably the easiest of all.  I tried the Function Module that Pravender suggested,
    but it did not return me the date back.... may be because it does not need the Micro Seconds in it....?  Routine as suggested by
    Satyam might work too, but did not go there....! 
    Thanks to all of you.
    Best..... SMaa

  • Time Stamp a Voice Memo to the Second

    I need to make a voice memo that's date and time-stamped to the second. It looks like Voice Memo doesn't do this (but if there's a way to, please advise!). Does anyone know an app that would do this? The greatest thing would be to be able to make the file name related to the date/time again to the second.
    Thanks for any advice. This is to replace a system on an old Palm Pilot using Audacity Audio with the date/time stamp option for naming capable to the second as well....

    I have the same problem.  I noticed it for the first time after the recent IOS 7 update.  The audio file I recorded using "Voice Memos" was trimmed down to 2 seconds, but iTunes reads it at full length (1:13) so I can't add it as an alert to my phone.  Oddly enough, the playback only lasts 2 seconds in iTunes, so it seems like there is an issue with how iTunes is calculating the time for trimmed Voice Memo files.

  • In range and coerce on time stamps

    Is there any reason why I shouldn't be able to use in range and coerce on time stamps?  In this VI the value is not being coerced, but the output for in-range is false.  With values out of range, it DOES coerce the output. 
    Jim
    LV 2013
    Solved!
    Go to Solution.

    lmtis wrote:
    What a NOOB mistake!
    Thank you nathand
    LOL The next noob minstake is forgetting to mark the person's post that solved the issue for you as the solution. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Time Stamp Implementation

    Hi all ,
    In my program I am sending a file via FTP . At the receiving end I am receiving the file using DataInputStream and writing it character by character to a file with the same name (this name is also send initially ) using a FIileOutputStream. But the time stamp of the file changes after the reception. This may be because I am writing the file again at the receiving end. Can anybody tell me how do I receive the file with FTP without changing the timestamp?
    Thanks in advance ,
    Cochu.

    I know this question has been answered, just wanted to offer my 2 cents in.
    How long you take to implement would depend on a few factors:
    1. How much time and effort did the Sales/Pre-sales team put into the prospect before the client signed on to SAP B1?
    2. How much of a fit is the client's business processes to SAP B1?
    3. How did you structure your project roll out? Did you promise them everything (all the modules) at one go, or did you say lets do it in stages?
    4. Data migration. Does your client understand what you can and can not do when migrating data?
    All in all, I've seen projects finish in 60 days, and I've also had projects that grew up to 120 days (project scope creep). Just document it as best as you can, put down in writing what you plan to do and agree beforehand with the client and you should be ok.

  • Business Message Report shows INBOUND Send Time Stamp=01/01/1970: wrong

    Configuration :
    Servers -
    Oracle B2B <-> Apache Proxy Server <-> Shared Network <->Apache Proxy Server <-> WebMethods B2B
    Protocol -
    AS2
    All INBOUND to Oracle B2B AS2 messages from the WebMethods B2B have a "Send Time Stamp" = "     January 1, 1970 12:00:00 AM"
    However, all AS2 MDN's from the WebMethods B2B have the correct "Send Time Stamp".
    And when we test between 2 Oracle B2B's in development, without using a proxy server, the "Send Time Stamp" is correct for AS2 messages and AS2 MDN's.
    My question is where is the "Send Time Stamp" being set ?
    Is it the trading partner, e.g. WebMethods ?
    Is it a proxy server?
    How can we ensure that the "Send Time Stamp" correctly reflects when the trading partner sent the AS2 message ?

    Can you check your infra db timing please? Anyways sending timestamp should not be affected due to this but no harm in verifying.
    Regards,
    Anuj

  • Why does Time Stamp Control not produce a Absolute Time output?

    I have used the the Time Stamp Control for manual input of measurement information. However, this control produce a time stamp in relative time which is unwanted. I thought that Time Stamps always are in Absolute Time. Is this not true? The control is very handy for time and date inputs. Is there a way of changing the output to relative time?

    I will try to be more specific:
    There is a Time Stamp Control available in the controls palette for use on the front panel. This can be used to set a variable called Time Stamp with values of time and date. It has a time and date browser which is very convenient to use and I like to use it. The time format I prefer in this case is Absolute Time which is time-zone-independent and it is the number of seconds elapsed since 12:00 a. m., Friday 1, 1904, Universal time according to LabVIEW help. However, the output from the Time Stamp Control is in Relative Time which I think is the Absolute Time compensated with Dayligth Saving Time and the local Time zone setting in your system.
    Time Stamps are always in Absolute Time I think but not in this case.
    My problem may be solved with a VI similar to "Format Date/Time String Function" but with a time stamp input and output, since this VI converts from Absolute time to Relative time. Even better is of course having a Time Stamp Control where you can select between absolute and relative time.

  • HOW DO I ACHIEVE A TIME STAMP, IN THE FIRST COLUMN OF MY SPREADSHEET IN EXCEL,SHOWING THE TIME INTERVAL, INCREASED BY THE SCAN RATE ?

    FROM AI START VI TO FORMAT AND APPEND VI TO CONCATENATE STRINGS,SECOND INPUT IS TAB,THEN EVEY OTHER ONE IS TAB. THIRD AND FIFTH INPUT IS ATTACHED TO GET DATE/ TIME VI, THEN END OF LINE, THEN CHANNEL 0; TAB; CHANNEL 1;TAB, AND SO ON THROUGH CHANNEL 7. THEN THE LAST INPUT IS END OF LINE. ON THE SPREADSHEET I RECIEVE THE SCAN RATE, THEN THE DATE ,THEN THE TIME; ALL ON THE FIRST ROW. THE NEXT ROW HAS THE COLUMN LABLES, AND DATA GOES TO THE CORRECT COLUMN. BUT NO TIME STAMP COLUMN. I WOULD LIKE IT TO BE IN COLUMN "A" EVEN WITH THE FIRST ROW OF DATA. EX." 10:01:01 200 300 400
    10:01:03 200 300 400
    THANK YOU
    FOR YOUR HELP, JOE BOB CRAIN

    I think the best way is to generate an array of time values to send to your spreadsheet BEFORE channel 0 data.
    To generate the array you can use Ramp Pattern.vi from 0 to 'Actual Scan Rate' (from AI Start) * number of scans performed.
    That way in your spreadsheet you will have the first line same as now, next the columns with time(secs), channel 0, channel 1... channel 7.
    If you need the time column with date and time string, you can use Get Date/Time in Seconds.vi when you begin acquisition, then sum the seconds obtained to the array calculated as above and next use Format Date/Time String.vi to obtain the time stamp you need, next build array of time stamps and sent to your spreadsheet.
    Hope this helps
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Time stamp request does not work using Internet Explorer

    Hi fellows
    I get the following error information when signing a document only when I am using Adobe Acrobat 9 Pro in the Internet Browser:
    Creation of this signature could not be completed. 
    Error encountered while signing: 
    Timestamp signature property generation error: 
    Transport connection timed out.
    This error only  occurs if a request to the time stamp server should be established. By using only the local computer time, the signature is placed and marked as valid in the browser. By using Adobe Acrobat Pro 9 without Internet Explorer, the connection with the time stamp server works without exceptions, the legal time is used to sign the document. I tested various browsers, but have still the same error information.
    Does somebody have an idea what I can do to fix this problem?
    Thanks in advance!
    Leonard

    Hi Leonard,
    It should work (or to put it another way, it works for me). My guess is there is a proxy server issue. If I'm right it's likely that the browser is not configured to use the proxy server.
    Steve

  • Non-time based scan rate

    How do I acquire analog data with a scan rate based on a digital trigger and not based on time. I have two signals one analog and one digital. I want to acquire an analog data point every time the digital signal goes from high to low and from low to high.
    Thank you.

    I don't think LabVIEW DAQ hardware supports triggering on both edges. It appears you have to trigger on one or the other.
    The only thing that I can think of to try is to take your analog signal and split it into two different analog inputs. Use the example "Acq&Graph Voltage-Int Clk-Dig Start.vi". Insert it in a new vi twice. You will have to open it and modify the connector so the Physical Channel and Trigger Edge are inputs and the graph is the output. Then wire each one with a different analog input and trigger edge and run them sequentially. Hopefully it will run fast enough for you.
    Randall Pursley

  • Adjusting time stamp of AI waveform when using pause triggering

    Hi Everybody,
    I've written a VI that acquires data (AI) at specified time intervals
    by using pause triggering and a counter signal, but the resulting time
    stamps associated with the data points in the AI waveform are NOT the
    actual time relative to the start of the initial acquisition. I was
    thinking of modifying the time stamps (post-acquisition) for each set
    of data points per interval by adding the "off" time as set by the
    counter signal, thereby adjusting the time stamps of the data to real
    time. I then have a subVI that will convert the time stamps to elapsed
    time. I also have an AO waveform being generated at the same time, and
    was wondering if I could somehow use those time stamps values if they
    were synced to the AI somehow, although this seems more difficult. The
    adjustment does not need to be extremely accurate, and can vary on the
    order of seconds (e.g., the last data point could be at 9990 seconds
    for an acquisition that actually ended after 10000 seconds). Any
    suggestions?
    As an aside, the important point of this part of my program is to
    reduce the amount of data being collected. I need a high sampling rate
    to acquire waveforms with pulse widths on the order of milliseconds,
    but typically run the experiment overnight (+12 hrs.) so the files get
    really big (e.g., 3 GB!). I could try writing to binary files, but I
    haven't figured out how to read the file and then split the data into
    smaller files of user-defined size that can then be converted to
    text/.xls files. If you have any ideas on how I might do this as well,
    I'd greatly appreciate the help! Thanks!
    Unagi

    Unagi,
    I am not exactly sure what you are trying to do, but I can
    take a guess.  When performing analog input measurements the waveform is
    composed of t0, dt and Y.  You can manipulate any of these values after
    the data has been acquired.  If you set up the task the waveform should
    contain an absolute time, not relative.  If relative is required, as you
    suggested, this can be done post acquisition with the build waveform components
    vi. 
    I do not understand exactly what you want do with the
    timestamps for the analog output.  Do you
    want to use the relative time computed from the analog input data for the
    analog output waveform?  If so, you could
    build a waveform and use the t0, dt from the analog input processed/relative
    time waveform.  Again this would be done with the build waveform components
    vi.
    Finally, a binary file would reduce the amount of memory
    required when saving your data.  A binary file is fairly simple to save
    and open in LabVIEW.  There are a couple examples in NI Example Finder (i.e.
    Write Binary File and Read Binary File) that show you how to write and read
    binary files.  If you write the data to a binary file during acquisition,
    and modify/split it later you could open the binary file, retrieve the data in
    LabVIEW, and write a small subset to a text file.  Alternatively, you could
    perform some analysis of the data during acquisition and only save the set of
    data that you require post acquisition.
    Regards,
    Jesse O.
    Application Engineering
    National Instruments
    Jesse O. | National Instruments R&D

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How to use time stamps en how to make time stamps in Adobe Reader

    How to use time stamps en how to make time stamps in Adobe Reader

    Did you find a solution? I am having the same problem.
    PDF compatibility level is too high. Supported PDF versions are PDF 1.3 and PDF 1.4 (Acrobat 4, 5 and 6). If you are using Acrobat 7 or higher you will need to save your file at a lower PDF compatibility level.

Maybe you are looking for