Time stamp data write to file problem

Hello!
I'm just learning LabView, and have arrived at the stage of writing time-stamped data to text files.
This seems clear enough, however when I examine the file written to disk, I find 4 unexpected characters: 3 spaces and one seemingly random number or punctuation mark, preceding every line!
An example is:
   .2005-07-15 10:55:40.0 the value is 0.0000 cm
   .2005-07-15 10:55:40.5 the value is 1.0000 cm
The four characters "   ." are those whose origin I can't understand. I can't seem to get rid of them.
They seem to change with the input string, but not in a manner I can predict or understand.
Any hints or explanations would be greatly appreciated, as I'm at wit's end after 1/2 day of puzzling over this little problem!
Alex
Attachments:
time stamp data write VIs.zip ‏24 KB

Alex,
You found one of the subtle little things that can be frustrating to old-timers and newcomers alike. I did not recognize it until I read the help file (and I have been using LV since version 1.2).
First, the three characters before the commas are nulls (\00).
The reason they are there is in the help file for the Write File.vi. By wiring an array to the data input, you caused the VI to write a header telling what data format was used.
I modified your VI to simply concatenate the strings and then write a simple string to the file. I think this may be what you were after.
Lynn
Attachments:
write timestamp text line to file v3.vi ‏47 KB

Similar Messages

  • I used "Get Waveform Components" to separate waveform data. I need to get the time stamp and write it on file as an header.

    I am not able to solve the problem because I can't find an I/O vi that writes on file time stamp data. An error occurs, because of connecting different data types. How can I convert time stamp data so that I can use it as input in a write on file vi? Please, help me!

    The problem with the selection seems to be that you are using two different indexing tunnels on the for loop. One of them loops over every value of the first incoming waveform, the other one over all waveforms in the incoming array. The value you wire to the N terminal will be ignored, the number of loop executions will be the minimum of your indexes. Anyway, the loop doesn't seem to do what you wanted:
    - If you want to store the complete waveform: loop over all waveforms, check for the maximum of each of them and write it just like you do now.
    - If you want to store only the values of each waveform that actually exceeded the threshold: You can either use 2 nested for loops to iterate over each value of each waveform. Use shift registers t
    o create new arrays of timestamps / values for the values you want to store. You need to either convert the waveform to x-y-pairs (VI on analog waveform palette) or calculate your own timestamps. You might as well want to check out the "Search waveform" VI. Configure it so that value+-tolerance covers the band between your expected minimum value and your threshold value. The VI will give you the indices and timestamps of all fits.

  • Help with saving time stamps to "write to measurement file" excel format.

    I am having problems saving the timestamps from my data to the write to measurement express vi for excel.  My incoming data is converted from dynamic data to a 1d array for processing, which I understand you lose the time stamp data. I added a new array for time stamps but this array then cannot be converted back to the dynamic data that is requested to go into the write to measurement file express vi.  I would prefer to leave the data in an array to be saved rather than converting it to a waveform so is there any way to add the time stamps from my 1d array back into the write to measurement file? 

    I set it up to build a waveform now but I am still having issues with it saving the correct timestamp.  The time just incriments for every second (as it did before converting the dynamic data to the waveform). I attached a screenshot.  
    Attachments:
    waveform.png ‏36 KB

  • Include time stamp in Write to Measurement file

    Dear Experts,
    I would like to include the time stamp in the data sheet I saved using a Write to Measurement file. Currently only 1 column of data was saved without the time stamp. Is there anyway I can save the data together with its time stamp in a single file (side by side column)? 
    Thank you.
    Regards,
    CYTeoh

    Did you configure the Express VI to create a time channel:
    Christian

  • Date and Time Stamp - Data Code

    I am trying to import HD video from a Sony video camera to iMovie, but require date and time stamp data code to display on the video.  The computer imports the video in HD without problem, but does not display the data code information.  Options allow for adjusting the date and time within the video clips, which proves the code is in there somewhere, but there are no options to display the date and time stamps. 
    I have previously accomplished this by running the camera in real time through a Pinnacle movie box, but this is time consuming, and hinders video quality, rendering in standard definition. 
    Can anyone please assist? 
    Thanks

    Date stamp data is not something read by FCP ... try iMovie,
    Alternatively, check the camera's output options, it may be possible to output the data burnt-in on the s-video or some such ... if you have the requisite i/o hardware you could then digitize from that signal path

  • Adding time stamp while archiving the file in b2b

    Hi
    I want to add the time stamp when archiving the file when I am using file/ftp channel. can anybody tell me how can I do that. otherwise it is overwriting the exising file in archive directory.
    Thanks
    Sri

    Hi Sri,
    otherwise it is overwriting the exising file in archive directory.It might be happening because inbound files are not having unique name. You have two options -
    1. Make sure that inbound files have unique name (you may add timestamp in inbound filename format)
    2. Do not use the archive feature of Oracle B2B. Instead use a transport callout to write a copy of incoming document into desired directory with desired filename. To know more about callout offering of Oracle B2B, please refer -
    http://docs.oracle.com/cd/E28280_01/user.1111/e10229/callouts.htm#CHDEFBDG
    Regards,
    Anuj

  • Time stamp data load

    Hi Gurus
    How can we upload time stamp data in BW
    ex: 15/06/08 12:50pm,  TO SINGLE INFOOBJECT,
    need it now,
    Thanks & regards
    Ogeti

    Hi,
       You could use a routine in the transformation.
    The routine would look something like this.
    DATA: v_timestamp(14).
    CONCATENATE sy-datum sy-uzeit INTO v_timestamp.
    Result = v_timestamp.
    You need not map any field. Just write the routine.
    Assign points if helpful
    Regards

  • Config Data Write To File.VI missing in LV 2009

    In the Pre LV 2009 version of the Config File files (vi.lib\utility\config.llb) it was possible to invoke a write to disk using "Config Data Write TO File.vi" that was found in the above llb.
    In LV 2009 the Config file functions have been updated and the above VI was omitted.
    I logged SR# 1437437 with NI support and they are looking into a work-around.
    Q
    Anyone else out there using config file function NOT on the palette?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Solved!
    Go to Solution.

    This is a trend which started with the report generation toolkit in 8.6 (which I assume you remember) and will probably continue as NI refactors utility VIs into libraries.
    You should read this thread which discusses the issue in general and refers specifically to the config VIs as well. Not having played with the insides of those VIs I don't have any specific insights.
    Try to take over the world!

  • Formatting the time stamp in "Write LabVIEW Measurement File"

    When I use the "Write LabVIEW Measurement File" vi to write data
    the files first column contains the number of seconds since the staart of the file
    How can I get the computer date and time or at least the time HH:MMS???
    Tom
    PS, And how can I put some sensible label on each columns in the file?

    Tom,
    The vi I'm attaching demonstrates how to use the computer system time for the timestamp on your LVM file. It takes a reading from the DAQ Assistant and applies a system time stamp. It's in version 7.1, but let me know if you need it in version 7.0.
    As for inserting meaningful column headers, you won't be able to do that with the express vi, but you could use the regular file i/o vis to create a file like that is similar to a LVM file, but is a little more customizeable and can be formatted however you like. The express vi is meant to be a quick solution, but does not offer all the versatility of the vis on the palette. I hope this helps you out. Have a good one, Tom!
    Tyler S
    Attachments:
    LVM_timestamp_7_1[1].vi ‏265 KB

  • Date and time stamp on dump & log file using EXPDP in HP-UX

    Hi All,
    Can someone help me with the below issue
    O.S Version     HP-UX B.11.31 U ia64
    Oracle DB Version     11.2.0.3.0 , Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    #!/usr/local/bin/bash
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_2; export ORACLE_HOME
    PATH=/u01/app/oracle/product/11.2.0/dbhome_2/bin; export PATH
    mydate=`date +%Y_%m_%d_%H_%M_%S`; export mydate
    ORACLE_SID=PD; export ORACLE_SID
    expdp system/0@PD DIRECTORY=prod_exports DUMPFILE=FULL_EXP_PD_${mydate}.
    dmp LOGFILE=FULL_EXP_PD_${mydate}.log compression=all schemas=SYSADM

    991805 wrote:
    Hi
    Thank you very much for your reply. The problem is the time stamp is not coming on my dumpfile
    So what are you getting?
    Works for me:
    #!/bin/bash
    export ORAENV_ASK=NO
    export ORACLE_SID=orcl
    . oraenv
    mydate=`date +%Y_%m_%d_%H_%M_%S`; export mydate
    echo mydate is $mydate
    expdp system/halftrack directory=data_pump_dir dumpfile=full_exp_${mydate}.dmp logfile=full_exp_${mydate}.log schemas=scott
    ls -l /u01/app/oracle/admin/orcl/dpdump
    2014-01-03 15:28:36
    oracle:orcl$ ll
    total 260
    -rwx------ 1 oracle oinstall    300 Jan  3 15:27 doit
    -rw-r----- 1 oracle asmadmin    116 Jan 31  2013 dp.log
    -rw-r----- 1 oracle asmadmin 249856 Jan  3 15:28 full_exp_2014_01_03_15_27_34.dmp
    -rw-r--r-- 1 oracle asmadmin   1974 Jan  3 15:28 full_exp_2014_01_03_15_27_34.log

  • 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.

  • Write the time stamp to a excel file

    Dear all superusers,
    The title imply my question that is how to store every time stamp obtained to an excel file.  But when open the file, it contains nothing. Could someone help on this matter.
    Regards,
    Lee Joon Teow
    Electronic Test Engineer

    Hi LJ,
    here's an example for writing timestamp to Excel-compatible csv file...
    The details of the calculation are given here!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    TimestampToCSV_LV80.vi ‏11 KB

  • 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.

  • Changing time stamp format in the file receiver adapter file name

    Hi all,
    How can we change the standard date time stamp from
    filename_yyyymmdd-hhmmss-mil
    to
    filename_yymmdd_hhmmss
    i.e.,  I want "underscores" instead of "hyphens" and also I do not want the MilliSeconds.
    I read in the forums that I have to use the combination of variable substitution and mapping functions to do this, but not sure how exactly.
    Can the experts help me with this please?
    Many thanks.

    Hello Ramesh,
         You can make this possible using runtime filename creation using UDF.
    Please go though the below steps.
    Message mapping:  
    Create an UDF and include the piece of code that captures the Filename and Timestamp from source side via ASMA.
    Modify them according to our requirement by adding the <Timestamp> at the end of <filename> with _.
    Map the UDF to any of the top level node so that the modified filename will be available for the target communication channel
    UDF Code is:
    try {
    String filename    = "";
    String timestamp = "";
    DynamicConfiguration conf1 = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","SourceFileTimestamp");
    filename = conf1.get(key1);
    timestamp = conf1.get(key2);
    filename = filenametimestamp".xml";
    filename = filename.replaceAll( "-" ,"_" );
    conf1.put(key1,filename);
    return filename;
    catch(Exception e)
         String exception = e.toString();
          return exception;
    Click on Advanced tab and check the Option u201CSetAdapterSpecificMessageAttributesu201D in addition to that check the attribute that are required to be captured during run time. In our case File Name and Source File Time Stamp are required to be checked
    In the receiver communication channel Mention u2018 * u2018as File Name Scheme.
    Click on Advanced tab and check the Option u201CSetAdapterSpecificMessageAttributesu201D in addition to that check the attribute u201CFile Nameu201D which will carry the modified value in the UDF .
    i hope this will help you.
    Monica

  • Time Stamp on MAXL Export File

    I use MAXL to export data from our Essbase cube. Is there a way to add a time stamp to the filename?

    I've never been able to do this directly through MaxL. If someone out there knows a way, please share.<BR><BR>The way I do this is by using DOS to rename the file after MaxL has exported it.<BR><BR>So assume you have a MaxL script 'test.mxl' with the following code in it:<BR><BR>login user password on 'localhost';<BR>export database zTest.PandL all data to data_file 'zTestX.txt';<BR>exit;<BR><BR>Then you have your .bat file that calls your MaxL script and in the .bat file you have the following code:<BR><BR>essmsh D:\\MaxL\Test\Test.mxl<BR>ren D:\Hyperion\Essbase\App\zTestX.txt zTest%date:~4,2%-%date:~7,2%-%date:~10%.txt<BR><BR><BR>''The first line calls the MaxL script and upon completion runs the second line which renames the file and adds the date stamp to it.<BR><BR>Don't ask me how to change the date format, I picked up the rename code from someone else. Although, by playing around with it, You can probably get it to look the way you want.<BR><BR>Of course all of this assumes you are using Windows 2000 server. It should work the same in 2003, not sure about NT. You're on your own if it's UNIX, but the same principles should apply, you just need to figure out the code for a Unix command line to do a file rename.<BR><BR><BR>Best of luck.

Maybe you are looking for