Time Stamp Offset Issue when Reading TDMS

I am having an issue when reading a TDMS file and displaying it on a waveform chart in LabVIEW.  My waveform chart will always display the time stamp with a negative offset of 18,000 samples.
To make that easy, let's say I am sampling at 1000 samples per second and I log my data to TDMS. When I read that TDMS and display my waveform chart data, the chart displays the data read from the TDMS 18 seconds earlier than the recorded wf_start_time stated within the TDMS.  If my wf_start_time is  08:00:20.000 AM 12/02/2014, then my waveform chart displays a start time of 08:00:02.000 AM 12/02/2014.  Likewise if I sample at 4000 samples per second, my start time is off by starting 4.5 seconds earlier.    
I am setting my Xscale.offset = wf_start_time and it reads back correctly, but the start time on the waveform chart is still wrong.  
Because I am dealing with larger TDMS files (500mb+), I sometimes decimate the data to view it due to memory issues. Here, this issue occurs again.  If I decimate the data to only display 1 out of every 10 data points, that offset is further shifting by a factor of 10x; going from 18 seconds to 180 seconds.   
Is this some kind of UTC/system clock time stamp discrepancy or something else? 
Solved!
Go to Solution.
Attachments:
VI edit tdms.png ‏41 KB

It's okay to mark your own post as a solution if it really is the solution, as it is in your case.  That way, people that have the same problem know it was solved and they can see what you did to solve it. 
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.

Similar Messages

  • Issue when reading values of Select-options for Dynamic F4

    Hi All,
    I have provided dynamic F4 help on class name (ESTCAT) and characteristic name (ATNAM). Both are select options with no intervals. The class name should be entered to get the F4 help for characteristic name, else an message would appear to select a class name first. My message is coming when i press F4 on characteristic name without giving any class name. This is correct but if i enter the class name after this message and do an F4 for characteristic name, it still shows the same message which is not correct. The reason is the class name entered is not captured in the FM RS_REFRESH_FROM_SELECTOPTIONS output table and it is captured only if i hit enter after entering the class name.
    Is it possible to get the class name in the FM output without hitting enter or any other way to resolve this issue?
    Thanks in advance,
    Srilakshmi.

    In Flow Logic
    PROCESS ON VALUE-REQUEST.
      FIELD itab-connid MODULE f4_get.
    In Program
    MODULE f4_get INPUT.
      DATA : fnam TYPE string,
             fval TYPE string.
    *         lin TYPE i.
      DATA : BEGIN OF f4_tab OCCURS 0,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
        END OF f4_tab.
       CLEAR lin.
      GET CURSOR FIELD fnam VALUE fval LINE lin. " This gives the Current Line in Table Control
      DATA : dynpread TYPE TABLE OF dynpread WITH HEADER LINE.
      REFRESH dynpread.
      CLEAR dynpread.
      dynpread-fieldname = 'ITAB-CARRID'.
      dynpread-stepl = lin.  " You need to pass this line Value here
      APPEND dynpread.
      CLEAR dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                               = sy-repid
          dynumb                               = sy-dynnr
        TABLES
          dynpfields                           = dynpread
       EXCEPTIONS
         invalid_abapworkarea                 = 1
         invalid_dynprofield                  = 2
         invalid_dynproname                   = 3
         invalid_dynpronummer                 = 4
         invalid_request                      = 5
         no_fielddescription                  = 6
         invalid_parameter                    = 7
         undefind_error                       = 8
         double_conversion                    = 9
         stepl_not_found                      = 10
         OTHERS                               = 11
      IF sy-subrc IS INITIAL.
        READ TABLE dynpread WITH KEY fieldname = 'ITAB-CARRID'.
        IF sy-subrc IS INITIAL.
          SELECT carrid connid FROM sflight
                INTO TABLE f4_tab
                 WHERE carrid = dynpread-fieldvalue.
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
              retfield               = 'CONNID'
             dynpprog               = sy-repid
             dynpnr                 = sy-dynnr
             dynprofield            = 'ITAB-CONNID'
             value_org              = 'S'
            TABLES
              value_tab              = f4_tab
        ENDIF.
      ENDIF.
    ENDMODULE.                 " f4_get  INPUT
    Regards
    Surendra P

  • Performance Issue When Read from Internal Table

    In my form, I have 6 windows which contain all the header information, which are kept in my gt_header internal table. Since all windows required data from the same internal table, reading the internal table at Initialization for once or, creating the LOOP at each window, which one will be a better choice in terms of performance?

    Hi,
    you cannot create 6 windows under loop.You can only have loop under a window only.
    So create a big window which covers whole area of 6 windows.Create templete under that and write only one loo with text in all those boxes of that templete.
    Regards,
    Rock.

  • Error when reading back a binary file

    Hello,
    I am writing out a binary file consisting of U32 arrays, packed strings, and clusters. I get error 116 when reading back. As long as I am synchronized on the correct data position why should LV care what I write to the file? In the example I write a simple 16 element array and a time stamp cluster. When reading back the array I get the error. What is the correct way to do mixed structures? Thanks.
    Attachments:
    file write.PNG ‏44 KB

    David,
    You can solve the problem in various ways. The easiest might be to modify the writer VI by wiring a True constant into the "header (F)" input of your first Write File node. That forces LabVIEW to include a four-byte header that specifies the length of the array you are writing.
    When you wire up the reader code the way you did, the length of the array you wire to the "byte stream type " input is irrelevant; by wiring nothing into the "count" input, you are implicitly telling LabVIEW to look for a header to determine the length of the array you are asking it to read. Because you didn't write any header, LabVIEW is interpreting the first four bytes of the array itself as a length. That length doesn't match the actual amount of data present in the datafile, so LabVIEW generates your error.
    An alternative solution would be to leave the writer unchanged and modify the reader VI: wire an I32 constant into "byte stream type" and wire a 16 into "count". The choice depends on what you prefer and whether or not these binary files need to be compatible with some other program or not.
    Another aside: you can dispense with your case that checks whether the datafile already exists. Just change the function input of the Open/Create/Replace to "create or replace" and wire a False constant into its "advisory dialog" input.
    Hope that's clear,
    John

  • Time Stamp in Write LVM

    How can the date/time stamp be reset when writing an LVM file.  The new_input starts a new file, but the date/time stamp is not reset (the first sample time of the new file is offset from the previous file).
    The date/time stamp is reset when the the program is stopped and restarted, but I would like to do this programmatically.
    Mike

    Let me add some details to the problem.... My observation is that the Write LVM Express VI on its first call writes the header which includes the date/time stamp.  If waveforms are present at that first call, it will write them along with their date/time stamp.  If the waveform date/time stamp is equal to the LVM header date/time stamp, the first "X" value will be 0.  The X values are the offset by: 
    (the waveform date/time stamp + sample*dt)- LVM header date/time stamp 
    On the second thru n call of the Write LVM VI, the waveforms are written with the X value following the equation above.  The process of writing the LVM file works great if the VI is currently stopped, run VI, VI writes data, and then Stop VI.  The next running of this sequence will correctly write the new file.
    My issue is that I can not execute the Start/Stop VI sequence.  My Write LVM VI is in a loop with the Write LVM VI loop selected by a case structure.  What I need is to be able to emulate a first call to the Write LVM VI which will  assign the new filename and write the header properly (i.e. assigning a new date/time stamp based on the first call).  I've tried combinations of the new_filename and reset inputs to the VI, but these do not reset the date/time stamp in the header.   Any ideas to make the Write LVM work in this manner?  I would prefer to modify the existing Express VI or put some shell around it to perform this function. 
    Thanks,
    Mike.

  • How to provide date and time stamp to the extracted file.

    I 'm downloading data from DB to Flat file using GUI_DOWLOAD. whenever it is executed it is creating with a file name.
    if i rerun the program the file is overwriting with the same name.
    now based on the requirement how many times i executed, that many times file should be individually created and should be added with date and time stamp.
    like
    if when i executed  at the very first time it should saved with filename, date and time.
    say "Address.txt 04/05/2007 07:55:10"
    When i executed it for second time it doesn't overwrite the file.
    it should create a new file.
    like "Address.txt 04/05/2007 07:59:20".
    Please guide me the way if possible code.
    Thanks in advance.

    Hi Vamsi,
                   Use FM 'F4_PROGRAM' to take file from the user .
    In this case user will enter the file name. u can append date & time to that file path.
    Refer this code.
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SY-REPID
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = P_P_FILE.
    concatenate P_FILE '04/05/2007 07:59:20' into V_FILE.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_file
         filetype                        = 'ASC'
          write_field_separator           = 'X'
        TABLES
          data_tab                        = i_tab
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc = 0.
        MESSAGE i002.
      ENDIF.
    Reward points if helpful.
    Regards,
    Hemant.

  • Windows 8 Last Access Time Stamps not working

     Hi I have been trying to fix a issue with last access time stamps not working when I open a file
    so will have time on created modified and accessed from when created but some are wrong like one file
    saying
    created ‎Sunday, ‎September ‎14, ‎2014, ‏‎5:19:32 AM
    modified  ‎Sunday, ‎September ‎14, ‎2014, ‏‎5:19:32 AM
    accessed Sunday, ‎September ‎14, ‎2014, ‏‎5:19:32 AM
    I'm not sure what can cause this please help thank you

    Hi whowhatwere,
    Are you only confused about the last access time not change when you open a file?
    If you want to know more details about modified and created time, we can refer to the following KB.
    http://support.microsoft.com/kb/299648/en-us
    About the accessed time, please refer to the following blog.
    How do I access a file without updating its last-access time?
    http://blogs.msdn.com/b/oldnewthing/archive/2011/10/10/10222560.aspx
    The blog mentioned that: In fact, the intuitive definition of access is more specific: It's "the last time I opened, modified, printed, or otherwise performed some sort of purposeful action on the file."
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Time Stamp Error while extracting data from R/3

    Hi,
        We are getting time stamp error while extracting data from R/3.
    To solve this problem we did replication and run RS_TRANSTRU_ACTIVATE_ALL program. still we are facing same problem.
    Please suggest me to solve.
    Thanks
    Subba Rao

    Hi,
    Time stamp error arises when the time stamp of the data source in source  system and target system are different.
    For we have again activate data source in R/3 system using transaction RSA5 or RSA6 and in BI system goto transaction RSDS and replicate the data source.
    You can also find time stamp details for a data source in tables ROOSGEN and ROOSOURCE tables in BI and R/3 system respectively.
    Here are some useful links.
    [R3 016 Time stamp error where is it in BI?;
    [time stamp error in bi7;
    [Timestamp error in BI7;
    Thanks,
    Venu

  • Time-stamp 'button'

    is there a way to create a time-stamp button that, when pressed, populates a cell with the current time from the cpu's clock?
    currently, i manually input the time in a 'start' and 'end' field for the purposes of generating total hours for a project. i'm just wondering if there was a way to simply push a button when i start a project, then push another button (or–better yet–the same one) and have it populate another cell.
    ideally, this 'button' would be able to both start and end time and put the total elapsed time in a whole number format so i can then use this figure in an equation for my timesheets.

    As far as I know, the response is NO.
    We may use an AppleScript to insert the current time in a cell.
    I already posted such a script several times.
    It is available on my iDisk :
    <http://public.me.com/koenigyvan>
    Download :
    For_iWork:iWork '09:for_Numbers09:insertDateTime.zip
    Select the cell 'start' and run the script.
    Select the cell 'end' and run the script.
    Yvan KOENIG (VALLAURIS, France) jeudi 21 janvier 2010 22:29:27

  • 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

  • Date/time stamp issue when transferring vids/pics to computer. Help please.

    Hi, i am having an issue when transferring my vids/pics from my Z2 to my PC.
    On all my previous phones when transferring media to my PC it would be copied and labelled with a date stamp followed by a picture number- an example being 2014-01-13- 0123. This has always made organising and finding my pics/vids in there relavent folders an eay task.
    The problem i am now faced with is when i transfer pics/vids from my Z2.  The pictures are stamped with DSC_0001 for example and the videos with MOV_0001. This means when on my PC i have to examine each file individually to find out its date and time of origin.
    Even more of an headache is everytime i have transferred files from my Z2 and then take more pics/vids and then try to transfer them to my PC the computer will not allow transfer as the stamp on the file i am transferring from my Z2 eg - DSC_0001 is already present on the PC from a previous transfer. This means i have to rename all the PC files first.
    I hope this makes sense and hopefully there is an easy fix.
    I am new to Android and overall i am very happy with the operating system, being a massive improvement generally over my previous phones. Fingers crossed this is down to my lack of knowledge and just involves a settings change somewhere.
    Thanks in advance for any help.

    Hi.
    The case you described is right. But it´s not a bug.
    Why don´t you organise your pics/vids on your desktop with picasa for example. There you have many tools, also to rename your files, so that the filename contains the creation date.
    Or you use a cloud solution like dropbox, google+ or amazon clouddrive to sync pics/vids from your phone automatically.
    But never use the built-in sony playmemories. It´s really slow, pics are down-scaled to 1280x720 and vids are not synced. It´s the worst cloud-service for pics I´ve seen.
    Best
    arni

  • Time stamp to name a TDMS file

    Hi:
    I am using data from excel files to create a time stamp, after that,my VI creates TDMS files with this data in files with 5000 samples, also I am using time stamp to named the TDMS files, but my problem is that my first file takes the name 180000.000, How can I modify this? because I need my file´s name will be the first data from excel.
    I attached my VI and two excel files, the idea is that the first file will be 84327.500 and the second will be 84740.950
    Attachments:
    test1.xlsx ‏150 KB
    test2.xlsx ‏151 KB
    testfile.vi ‏56 KB

    First, let me congratulate you on taking your first steps to learning LabVIEW. If you have not already done it, I highly recommend you go through the online tutorials. You have an actual project to work on, so application of what you learn will be fairly immediate.
    For your actual program issue, you need to read the data from the Excel file and convert it to a timestamp before you set your filename. The order of operation of your program is to set the TDMS file name while simulataneously reading from the Excel file. After you have already created the TDMS file, you convert the data to a timestamp and write this to your timestamp front panel control. Note that the first point you write to the TDMS file may or may not be what you think it is. It could easily be the same 180000.000 value you are using to name the TDMS file. You have what is known as a race condition. The order of operation between the read and write of the timestamp control is not known and can be variable. It is one of the reasons that you should NEVER use local variables to pass data around. Use wires. In LabVIEW, wires are the data and take the place of variables in a text base language. Front panel controls should be used only for user interace reasons. In your loop, you should wire the timestamp from its current conversion (wired into the timestamp on the front panel) directly to the TDMS write (currently wired from a local variable of timestamp).
    A couple of other things. You do not need to convert your data arrays to matrices to index them. This can be done directly with Index Array from the array palette. This single primitive will replace the Array Subset, convert to matrix, and index matrix primitives.
    You do not need to go through a string conversion to produce a timestamp. The Date/Time to Seconds primitive in the timing palette will do it directly. You will need to populate the cluster input.
    When you posted your code, you did not include your subVIs. In the future, include all your VIs, either separately or in a ZIP file.
    Finally, to solve your intial problem, use Index Array to pull the first row of data from the Excel file, then convert this to a timestamp using Date/Time to Seconds. Use this to create your TDMS file.
    You may have noticed, if you do all this, you do not need your timestamp front panel control, other than as a simple monitor.
    Good luck! Welcome to LabVIEW.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • TDMS viewer not showing data with time stamp

    Need help with time stamping data in a TDMS file generated by DAQ Assistant.
    When I use the TDMS Viewer, with the x-scale set to absolute time, the date starts at 1903. If I use Excel to look at the file the start time is correct (i.e. 2013).
    Solved!
    Go to Solution.

    Bo_Xie, I have simplifed my VI and now able to display the correct time stamp. Thank for your time!

  • FileMonitor issue for date time stamp change.

    Hi I have an app that runs with a minor issue and I am looking for some insight for a workaround or code change.
    I have a File Monitor that checks a specific directory every second.
    Users send a batch run to this directory throughout the day. There are two types of files, .ZIPs and .DONEs.
    So for each .ZIP a .DONE is sent to notify the app it can begin to process the file.
    Here is what I receive
    /elements/process/File1.ZIP     Oct 15 08:19
    /elements/process/File1.DONE     Oct 15 08:19
    The problem I am encountering is sometimes the .DONE and. ZIP are sent and the date time stamp of both files are the same so when the monitor reads the directory it looks like there is no change so both files sit in the directory and do not process. To make this work, I usually go in and touch a file to change the date time stamp.
    This is a java app that runs on an AIX box.
    Here is my code, is there anything any once can suggest to help me out. Thanks in advance.
       * Subclass of FileMonitor, Handles the timer event
       * @param none
      private class FileMonitorNotifier extends TimerTask
        public void run()
          // Loop over the registered files and see which have changed.
          // Uses the Modifed DateTimeStamp to determine if there was a change.
          // Use a copy of the list in case listener wants to alter the
          // list within its fileChanged method.
            try
                Collection files = new ArrayList (hmFiles.keySet());
                for (Iterator i = files.iterator(); i.hasNext(); )
                    File file = (File) i.next();
                    long lastModifiedTime = ((Long) hmFiles.get (file)).longValue();
                    long newModifiedTime  = file.exists() ? file.lastModified() : -1;
                    //      Check if file has changed
                    if (newModifiedTime != lastModifiedTime)
                        //      Register new modified time
                        hmFiles.put(file, new Long (newModifiedTime));
                        // Notify listeners
                        for (Iterator j = colListeners.iterator(); j.hasNext(); )
                            WeakReference reference = (WeakReference) j.next();
                            FileListener listener = (FileListener) reference.get();
                            // Remove from list if the back-end object has been GC'd
                            if (listener == null)
                                j.remove();
                            else
                                listener.fileChanged (file);
            catch(Exception ex)
                 m_odLaunch.logError(OdIntegrationConstants.ERROR_LEVEL_MIDLEVEL, ex);
         }

    Yes, I guess you are right, I don't care what time each file came, as long as I have both I can being to unzip and process and delete the .DONE.
    The code itself was based on if a filechanged then do work.... I could just take this out. Thanks!
    * This is the main entry point when there is a change to the modified date/time
    *  of the monitor directory
    * @param file directory we are monitoring
         public void fileChanged (File file)
              StringBuffer sbMessage;
              try
                   sbMessage = new StringBuffer();
                   //Make sure this is a Directory
                   if(file.isDirectory())
                        //Return list of files with extension we are looking for
                        File[] arFiles = file.listFiles((FilenameFilter)new FileSuffixMonitor(m_odLauncher));
                        for(int i=0;i < arFiles.length;i++)
                             sbMessage.append("Found file association to move-" );
                             sbMessage.append(arFiles.toString());
                             m_odLauncher.logInstance(sbMessage.toString());
                             processMoveFile(arFiles[i]);
              catch(Exception ex)
              sbMessage = null;

  • File time stamp issue

    First, I'm not sure where this post would go.
    We have several Mac users and they are noticing a problem with file time stamps on our NetWare servers. They are an hour ahead. When looked at from the server's console or from a Windows box, the file time stamp is correct. This is causing some problems with our production software.

    On 09/11/2011 22:26, isutton wrote:
    > NW 6.5 with latest SP. Mac OS X (Leopard and Snow Leopard). AFP is the
    > standard connection and yes this has only happened since DST change. I
    > did reboot one of the servers and the issue was fixed. I would like to
    > know what causes this though so that I can avoid rebooting servers.
    We've seen this to and it seems AFPTCP.NLM doesn't notice the DST
    change. The only fix I'm aware of it to unload and then reload
    AFPTCP.NLM (or restart the server, which whilst brutal can sometimes be
    cleaner).
    HTH.
    Simon
    Novell Knowledge Partner (NKP)
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

Maybe you are looking for

  • Transparency problem with animated gif within AJAX overlay

    Hello all, I have designed and animated a loading spinner in Photoshop CS3, which needs to sit within an Ajax overlay, with transparency set to 75. I tried exporting the spinner as an animated gif with a transparent background (using Save for Web), b

  • Windows XP OEM Disk and 10.5 Leopard

    I just bought an OEM copy of Windows XP Home with SP2 with the intention of installing it on my MBP using the BootCamp Beta... Forgive me cause I dont know too much about what OEM even means... Anyway, when Leopard comes out and I upgrade to 10.5, I'

  • How do I enable "long press" keyboard functionality on a Mac keyboard?

    I'm running FF 13 and Mac OS 10.7.4. When using other apps, I can press and hold certain keys, e.g., the letter O and a character palette appears providing me with accented/alternative characters. As I am using an American English keyboard in Germany

  • Flexible custom control

    Hi all, I am developing ALV using OO concept in which custom container is placed on custom control, i have kept that custom control of full screen size but my requirement is to make custom control flexible dynamically while we are adjusting the size

  • Linksys WRT54GL not saving settings

    Hello all just got a WRT54GL today and the wired part works as well as the config from the webui ... the proble is my router wont save any wireless settings ... for example ill change my SSID and hit save changes ... it will say it is successful ...