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.

Similar Messages

  • 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

  • Time stamp information in default trace file

    How to check the time stamp in defaulttrace.trc or application.trc files for logs in XI server.
    I have seen following timestamp in above mentioned trace  files. But seem to me, during the shutdown time of server, system put the timestamp in trace file.
    ERROR       gateway shutdown
    TIME        Fri Jun 20 11:01:08 2008
    Except for shutdown time, how the system put the timestamp for other activity of system in the default trace and application trace file??
    Sometime, i need to check the timestamp to get some specific information in default trace file for some system activities.
    is timestamp mentioned in coded form as per following log:
    #1.#36CC34C00F02009B000001B400001FF40004510B33EAB6D3#1215008464352#com.sap.engine.services.rfcengine##com.sap.engine.services.rfcengine.RFCDefaultRequestHand
    ler.handleRequest()#J2EE_GUEST#0##XQA#SAPSYS                          #4869A1FC78690A8DE10000000A2C0AC7#SAPEngine_Application_Thread[impl:3]_51##0#0#Error##P
    lain###java.lang.reflect.InvocationTargetException#
    #1.#36CC34C00F02009B000001B500001FF40004510B33EAB76C#1215008464352#com.sap.engine.services.rfcengine##com.sap.engine.services.rfcengine.RFCDefaultRequestHand
    ler.handleRequest()#J2EE_GUEST#0##XQA#SAPSYS                          #4869A1FC78690A8DE10000000A2C0AC7#SAPEngine_Application_Thread[impl:3]_51##0#0#Error##P
    lain###java.lang.reflect.InvocationTargetException
    Thanks
    Amar

    Hi Amarjit
    The timestamp is noted in unix epoch time (java does use this as well). It is this field:
    #1.#36CC34C00F02009B000001B400001FF40004510B33EAB6D3# 1215008464352 #com.sap.engine.services.rfcengine##com.sap.engine.services.rfcengine.RFCDefaultRequestHand
    ler.handleRequest()#J2EE_GUEST#0##XQA#SAPSYS
    The first 10 digits are seconds since epoch. The last 3 digits are milisecondes. Converted in human readable format: 07/02/2008 16:21:04.352
    [Unix Time|http://en.wikipedia.org/wiki/Unix_time]
    Damn, i remeber having answered this already here in the forums, but i cannot find the thread anymore myself :-(((
    Best regards
    Michael

  • No update time stamp in the saved data file

    In NI Example Finder, there is a file called "Fieldpoint Datalogger.vi". I flip the "Time Format" switch to "HH:MMS" and the "File Type" switch to "Spreadsheet". The data saved into a file have time stamp at each line. However, the time stamp in each line of the data file saved as the same time without any update to the most current time. I put sampling frequency for 100 ms and saved as 50K bytes file size, but all the time stamps in the file show one same time (I believe it is the time to start to save into file and keep repeat it). How can I get the update time stamp for every 100ms or 500ms and save that time stamp into the data file from this "Fieldpoint Datalogger.vi"? Should I change anything on the subVI called
    "embedded FPLog.vi"?

    Hello,
    Fieldpoint systems usually base the timestamp on the National Instruments Time Server, which is installed on any computer using the Fieldpoint driver. This means that you can configure the Time Server on a Fieldpoint system to continuously check the system time of any computer on the network that has the Fieldpoint Driver installed by referencing its IP address.
    If the timestamp is not updating, then we should first verify that it has been configured properly.
    Take a look at the following Knowledge Base and let us know if using the listed steps takes care of this issue.
    http://digital.ni.com/public.nsf/websearch/C4E56AD6450FC5FD86256DFF0007FF01?OpenDocument
    Best regards,
    Justin Tipton
    National Instruments

  • 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

  • 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

  • Write time stamp and Voltage to text file

    I am a novice 2011 LabVIEW user and am trying to build a program that will write TIME in one column and VOLTAGE in another to a text file for later interpretation with MATLAB. I started to add elements to an existing code, which I downloaded from the examples forum, because it works well for my purposes of sending a finite square signal. The code that I started modifying is attached to this thread. If somebody wants to take the time to provide me with an example of how I can do this with my existing code, it would be greatly appreciated. I learn better from example.
    Regards,
    Sean. 
    Attachments:
    Voltage - Generate and Write.vi ‏99 KB

    This is a pretty simple set of code that every 5 seconds writes to a csv file that is stored in the location shown in the code. In order to apply something similar to your code simply run the data that you wish to store into the concatenate strings in the form of a string and it should be fine. 
    Although after looking over your code a second time you should probably take a look at the convert "Array to Spreadsheet string" function, all you would have to feed it is an array of times and measurements at the completion of your program and feed it into a file and it should do everything for you.
    Attachments:
    Write to File.vi ‏20 KB

  • Changing Time Stamp in Receiver Adapter's File Naming Schema.

    Hi All,
    I am working on a ABAP Proxy to File(FTP with FCC) scenario.
    I have a requirement to place the file at FTP with naming schema XSP_SUPPLIER_CC_DD_MM_YYYY.csv.
    I have checked many blogs which talks about Dynamic Configuration, but here the naming schema we fetch is from sender file adapter's ASMA(Adapeter Specific Message Attributes).
    But in my case sender side is ABAP proxy.
    How can I achieve this??
    Please suggest.
    Regards,
    Sachi

    Hi,
    >> but here the naming schema we fetch is from sender file adapter's ASMA(Adapeter Specific Message Attributes).But in my case sender side is ABAP proxy.
    You can use dynamic configuration to not only fetch values from message header you can use it to put values to message heade also.....you can write  UDF (code will look like below) and in the UDF you can create string with required filename and concatinate it with the timestamp...
    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");
    filename = "XSP_SUPPLIER_CC_"sourceFiledValue(Supplier)addtimestamphere+".csv";
    conf1.put(key1,filename);
    return filename;
    catch(Exception e)
         String exception = e.toString();
          return exception;
    Supplier>UDF>TargetMessage
    In the file receiver communication channel check the ASMA property target filename.
    Regards,
    Priyanka

  • 4062-TIME-STAMP OF NAME HAS BEEN CHANGED

    USING FORMS 6i CLIENT/SERVER
    Oracle9i Enterprise Edition Release 9.2.0.2.0
    When I recompile a procedure called in a form I receive the above error message. I then recompile the form and the problem is resolved.
    I understand the principle behind what is going wrong but I do not recall getting this error in Forms 4.5!!
    Is it my failing memory or is there something slightly more sinister involved??!!

    Your memory is correct. However, Dev. 6i is not certified for an Oracle 9i Rel. 2 database. That may very well be the cause of this error. You can try the old trick of setting REMOTE_DEPENDENCIES_MODE = SIGNATURE in the init.ora file of the database. I don't know if that works on a 9i rel. 2 database though.

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

  • File name with Dateand time stamp.

    Hi All,
    I want to generate a file with a date and time stamp.
    For that in File Receiver adaptor i am using option "Add Time Stamp" in File Construction mode. however it is generationg file name as: FileName_20082104_121211_645.txt . In this I don't know what these last three characters "_645" are? And In the File name i only want a file name with datetime stamp . I don't require underscore in between. for eg: FileName_20082104121211.txt (FileName_dateTime.txt)
    Can anybody suggest me the way to achive this?
    Thanks,
    Atul

    @FileName_20082104_121211_645
    The date time stamp in XI's file adapter will be in that format. This is to avoid over writing of files created simultaneously at the same time. So the last 3 digits is a form of an unique id to distinguish between the same.
    In case you want the format as FileName_20082104_121211, use the dynamic configuration and create the file name inside the mapping itself and pass it across.
    To get an idea about the same, ref:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - an usage of the same.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

  • Need to add date/time stamp to file name without time change creating new files

    We have setup our application to save data once a trigger event occurs. We also need the date/time stamp as part of the file name. We used Format Date/Time String and concatenated it into the file name. It all works good, but as the time changes (seconds, minutes, etc.) it causes the Write to File to create a new file with the new filename. Is there a way to create the file and save/latch/buffer the time in the file name so that it doesn't create a new file for every second?
    I've attached a shot of the relevant part of our VI. It's all in a big while loop. The data save is in a case/switch so that when it is triggered it starts saving. (The for loop is to split the data up
    into 4 different files). Like I said, it all works except new files are created every second as the time changes instead of just putting it all in one file with the initial time in the file name.
    Attachments:
    TimeInFileNameQuestion.jpg ‏46 KB

    I need a loop in order to use a shift register. I cannot stop the outer while loop (because it would stop the hardware from collecting data), and I cannot add loops inside which bogs down the processor to where the app stops. I've attached a simpler version of my VI which illustrates the problem. While the button is pressed (the trigger) it should save the data (in this case just cycle numbers) into one file with the initial date/time. But, you can see that it creates 1 file/second. I tried using shift registers, but without adding extra loops I can't see how to do it. Thanks
    Attachments:
    FileNameTest.vi ‏29 KB

  • File name for append processing mode with time stamp

    Hi Experts
    we are doing file to file scenario using the processing mode as Append.
    the requirement for us to append the files and we need to have new file name with time stamp added to the appended file.but in the processing mode of the file adapter either we can append or add time stamp. thatz the problem I am facing now.
    we are doing file based processing not message based ,micheal blog regarding the dynamic file name is for message based not for file based.
    Please provide your valuable comments.
    Thanks
    Faheem

    Hi mohamed,
                      I suggest you to map the target source structure to the required filename u want, like for example ur filename is input26062008.txt means to the target structure u perform the following mapping
    constant (input) concat with currentdate function --> concat with constant .txt --> map this concat to target. So u will get the filename u expected with the time.
    Then in the communication channel u select the mode as append. Now ur requirement will get solve i think so. plz try.
    Regards,
    Murugavel

  • Add the time stamp ater file name (suffix)

    Hi friends,
    i need help for below requierment.
    I want to add the time stamp for my file name.
    like *filename YYYY-MM-DD-HH-MM-SS.txt*
    i don't know how to wirte the UDF for this. please any help me on this.
    thanks
    Srini..

    Hi,
    You have to Use Add Time Stamp Option in the Receiver File Adapter--Under File Construction Mode
    Check this
    http://help.sap.com/saphelp_nw70/helpdata/EN/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    REgards
    Seshagiri
    Edited by: N V Seshagiri on Oct 14, 2008 2:02 PM

Maybe you are looking for

  • OID SSO Logout issue from the partner application

    As per the below link I am trying the logout functionality from the partner application, http://download.oracle.com/docs/cd/B14099_19/idmanage.1012/b14078/tpsso.htm#i1011555 The article talks about a logout url pattern, I am trying to execute the bel

  • Custom IKM Knowledge Modules are not working with Group By Clause

    Hi All,    I am facing an issue with custom IKM knowledge modules. Those are IKM Sql Incremental Update and IKM Sql Control Append. My Scenario is 1. Created an interface with table on source and temporary datastore with some columns in target. 2. In

  • ACE design issue

    Hi, my question is about design. At the left side, the server and the ACE vlan interfaces are directly  connected to the same vlan. VIP traffic flow is green, server  management is brown. The problem is, that with this design i'm restricted to one se

  • When is existing BW3.5 content being converted to BI 7.0 content by SAP

    Hello , We have a fresh installation of BI 2004S at our client. I was hoping to request if there is any information regarding conversion of the existing SAP BW 3.5 content by SAP , to migrated data sources, transformations in place of existing commun

  • Expdp and impdp  doubt

    hello frnds , I have a expdp dumpfile of a schema from linux ES4 server ,oracle 10 g can I use above server dumpfile and impdp in solaris 10 ,oracle 10 g database ..is it possible ? thanks