Write to measurement file Express VI - TDMS file has separate "channels" for each data point

Im trying to write a VI to measure and record thermocouple data from an Advantech T/C DAQ. Using the "DAQNavi" express VI provided by them, connected to the Write to Measurement File express VI, I have managed to read in the data and create a TDMS file. However, when I open the TDMS file, each time step of temperature data is entered as a separate channel, instead of all of the channel data going into one tab. Obviously this is a huge problem as it creates hundreds of tabs after just a few seconds. Any thoughts as to what causes this?

Hi glibby,
How did you configure the Write to Measurement Express VI? Please select "one header only".
If you have your own timestamps to write, please merge your timestamp channel and measurement channels with "Merge Signals" before passing them to the Write to Measurement.
Best Regards,
Mavis

Similar Messages

  • Hello, I closed unintentionally 10 files and I can't retrieve the history for each file.Is there a solution ?

    Hello, I closed unintentionally 10 files and I can't retrieve the history for each file.Is there a solution ?

    Hello, do you mean 10 tabs ? check in [http://kb.mozillazine.org/Viewing_the_browsing_history_-_Firefox#Library Library] menu to view the browsing history (except if you [https://support.mozilla.org/en-US/kb/Clear%20Recent%20History Clear Recent History] ).
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • "Write to measurement file" express VI (TDMS foormat) keeps file opened

    Hello!
    I am trying to use "Write to measurement file" express VI to write TDMS data obtained from DAQmx in LV2011. Each run of the same write function creates new file.
    It seems that last written file remains to be opened until program stops or next file written. It has 0 size and it is not possible to access it from other programs.
    Is it possible to save file immediately and close it?
    Solved!
    Go to Solution.

    It seems, that wiring "DAQmx task" (for AI task) to "Write to measurement file" express VI does not works in my case (only in exe).
    The error is the same as file not found (error code 7), but file is created. Something gets wrong inside express VI. I am unable to debug exe, so I have just disconnected DAQmx task from express VI (really don't specially need it anyway).
    For sure, the same LabVIEW version and drivers are installed on target and VI is working in it as well as at dev machine.
    Debug error which I had encounter is already published in the forums elsewhere. It seems that the problem is in VI without block diagram inside hierarchy. Maybe with Express VI.
    PS test app writing tdms files the same way is working like a charm (without DAQmx task wired).
    So, thank you for yor advices, the problem seems to be solved. Maybe I will have a look in more details about the reason of such error, but can't do it now.

  • Signal Express Large TDMS File Recording Error

    Hello,
    I have the following application and I am looking for some tips on the best way to approach the problem with Signal Express:
    I am attempting to using Signal Express 2009 (Sound and Vibration Assistant) to collect random vibration data on three channels over an extended period of time -- about 20 hours total.  My sample rate is 2kHz.  Sampling at that rate over that period of time invovles the creation of a very large TDMS file, which is intended for various types of analysis in signal express later or some other application later on.  One of the analysis functions to be done is a PSD (Power Spectral Density) plot to determine the vibration levels distributed over a band of frequencies during the log. 
    My original solution was to collect a single large TDMS file.  I did this with Signal Express recording options configured to save and restart "in current log" after 1 hour worth of data is collected.  I configured it this way because if there is a crash/sudden loss of power during data collection, I wanted to ensure that only up to an hours worth of data would be lost.  I tested this option and the integrity of the file after a crash by killing the SignalExpress process in the middle of recording the large TDMS file (after a few save log file conditions had been met).  Unfortunately, when I restart signal express and try to load the log file data in playback mode an error indicating "TDMS Data Corrupt" (or similiar) is displayed.  My TDMS file is large, so it obviously contains some data; however, Signal Express does not index its time and I can not view the data within the file.  The .tdms_index file is also present but the meta data.txt file is not generated.  Is there any way to insure that I will have at least partially valid data that can be processed from a single TDMS file in the event of a crash during mid-logging?   I don't have too much experience dealing with random vibration data, so are there any tips for generating vibration level PSD curves for large files over such a long time length?
    My solution to this problem thusfar has been to log the data to seperate .TDMS files, about an hour in length each.  This should result in about 20 files in my final application.  Since I want to take a PSD, which ends up being a statistical average over the whole time period. I plan on generating a curve for each of these files and averaging all 20 of them together to get the overall vibration PSD curve for the 20 hour time period.

    JMat,
    Based on the description of your application, I would recommend writing the data to a "new log" every hour (or more often). Based on some of my testing, if you use "current log" and S&V Assistant crashes, the entire TDMS file will be corrupted. This seems consistent with what you're seeing.
    It would be good if you could clarify why you're hoping to use "current log" instead of "new log". I'll assume an answer so I can provide a few more details in this response. I assume it's because you want to be able to perform the PSD over the entire logged file (all 20 hours). And the easiest way to do that is if all 20 hours are recorded in a continuous file. If this is the case, then we can still help you accomplish the desired outcome, but also ensure that you don't lose data if the system crashes at some point during the monitoring.
    If you use "new log" for your logging configuration, you'll end up having 20 TDMS files when the run is complete. If the system crashes, any files that are already done writing will not be corrupted (I tested this). All you need to do is concatenate the files to make a single one. If this would work for you, we can talk about various solutions we can provide to accomplish this task. Let me know.
    Now there is one thing I want to bring to your attention about logging multiple files from SignalExpress, whether you use "current log' or "new log". The Windows OS is not deterministic. Meaning that it cannot guarantee how long it takes for an operation to complete. For your particular application, this basically means that between log files there will be some short gap in time that the data is not being saved to disk. Based on my testing, it looks like this time could be between 1-3 seconds. This time depends heavily on how many other applications Windows has running at the same time.
    So when you concatenate the signals, you can choose to concatenate them "absolutely", meaning there will be a 1-3 second gap between the different waveforms recorded. Or you can concatenate them to assume there is no time gap between logs, resulting in a pseudo-continuous waveform (it looks continuous to you and the analysis routine).
    If neither of these options are suitable, let me know.
    Thanks, Jared 

  • Use labview to read an Excel file to some control and add a checkbox for each row

      As the subject say,I need to use labview to read an excel file,and show it in some control,such as mclb;then ,I should add an checkbox for each row,enable me to choose the row i want.What should I do ? Many Thanks.
    Solved!
    Go to Solution.

    Hi,
    to answer your question:
    - read an excel file
    - show it in some control, such as a MCLB
    - add an checkbox for each row
    - choose the row you want
    Hint to make it easier: I wouldn't use checkboxes, as the MCLB already allows to select rows by mouseclick…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • .tmp file is created by NI Report generation toolkit for logging data to MS Excel

    Hi,
    I am getting ".tmp" file while logging data to MS Excel by NI Report generation toolkit. Instead of assigned file name, toolkit is generating a junk value with .tmp extension, but I can able to open this .tmp file with MS Excel.
    Can anyone help to solve this issue?
    Thanks,
    Thirumala

    Hi Thirumala,
    You may experience issues when you try to save a Microsoft Excel file if one or more of the following conditions are true:
    1. You save an Excel file to a network drive where you have restricted permissions.
    2. You save an Excel file to a location that does not have sufficient drive space.
    3. The connection to the Excel file has been lost.
    4. There is a conflict with an antivirus software program.
    5. You save an Excel file that is shared.
    6. The 218-character path limitation has been exceeded when you save an Excel file.
    7. The Transition Formula Evaluation feature is turned on in Excel.
    8. The file was created from a template that contains embedded objects.
    Hope this will help to solve your problem.
    Thanks,
    Sanad MM

  • Measuring Instrument Needs to be added in inspection plan for each part

    Hi
    How to assign the Measuring Instrument in the quality inspection plan for all the materials.
    Whether i need to assign as material assignment or as PRT.
    how to use prt to assign to the operation in the quality plan (task list)
    Thanks
    VRAJ

    Hi,
    when i try to assign the Equipment for first Inspection Characteristics.
    the system thru the ERROR as,
    Production resource/tool is not intended for this type of task list
    Message no. CF230
    Diagnosis
    You want to use the production resource/tool in a task list or work order with task list type Q. However, according to usage 004 of the PRT, this task list type does not exist.
    Procedure
    Change the usage of the PRT in the master record or select a PRT which can be used in this task list type.
    How to resolve this issue.

  • Write to measurement file loses timestamp data in tdms format

    Hello all, I'm using the Write to Measurement File expressVI and I have created a loop in order to be able to individually label the column headers for each data signal that I'm writing. However, while the loop is successful in doing this the resulting TDMS file that the expressVI creates ends up losing the timestamp data that is used to record the time for each row and just writes a '0' instead. The timestamp data is present before the loop that adds column headers, which I have verified by adding an expressVI just before the loop. Please see the attached code for clarification. 
    How do I regain the timestamp info after the for loop executes and adds column header info? Thank you. 
    Attachments:
    Write to measurement file specify column name.vi ‏106 KB

    The problem with Express VIs and with the Dynamic Data wire is that they (almost) complete obscure what is being done "under the covers".  They manipulate data in ways that are unseen and often unexpected.  While they allow beginners to do extremely simple tasks quickly, they can easily lead to situations such as you are discovering.
    If what you want to do is to write a TDMS data file, you should probably investigate the TDMS functions on the File I/O palette.  I've not used TDMS myself, but I know there are examples and documentation in the LabVIEW Help.  I suspect that if you do go with straight TDMS, you will probably save yourself further problems by not bundling your four inputs into a Dynamic Wire, but making them a 1D Array (or possibly a Cluster).
    Bob Schor

  • 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

  • Best way how to write FPGA data in rt cRIO system in tdms file

    Hej,
    I am struggling to write measured data from an analog input (NI 9215) sampled at up to 20 kHz to a tdms file in the rt system (crio-9022). I just need to save several periods of 4 arbitrary analog signals at frequencies between 5 Hz and 1KHz. So storing up to 50k values should already be enough.
    I use a high priority and a low priority loop. First I tried to adapt the example from the "Getting Started with CompactRIO - Logging Data to Disk" (http://zone.ni.com/devzone/cda/tut/p/id/11198). But when I used this in my high priority loop (running at 1ms), the loop runs out of time and the rt system becomes unresponsible. If I change the number of elements to write (the number of elements to wait for in the fifo read block) it becomes better, but still data is lost because the loop finishes late.
    So I was thinking to create a RT fifo and to store all the values from the measurement first in this memory inside the high priority loop and then write the values to the tdms file in the low priority loop. This time I used the read/write fpga block instead of the FPGA fifo block. It was already working better but writing the files to the tdms file took a lot of time since each value was read and written to the tdms file individually. Unfortunately I could not find a possibility how to write the whole rt fifo to the tdms file at once. Is there a block available or is it possible to create a big array first and then write the data to the tdms file at once? My code I tried is in this second picture.
    I hope someone can give me some tips which method should be better for my project and a hint what I did wrong or what I can optimize. I stucked for days now on how to save my measurements on the cRIO system.
    Thank you very much in advance. Have a nice weekend.
    Best regards
    Andy
    Solved!
    Go to Solution.

    HiXiebo and Christian,
    thank you very much for your answers. Actually, my high priority loop is much slower. I run it with a maximum loop time of 50us = 20kHz or slower, depending on my Signal I want to measure. So my data producing rate is maximum 4*8*20k=640 KB/s. My low priority loop runs at 2ms to 5 ms (much slower then the high priority loop), since I am doing just some simple math calculation there and control the front panel in this loop.
    I understand that it is much more efficient to write blocks of data (e.g. 1024*32KB instead of just 32KB) to a file with TDMS. But is it also the same for a queue or RT FIFO, i.e. does the block size of the data chunks also matter for the queue and RT FIFO?
    @Xiebo: I understand that caching the read data from the FPGA in the high priority loop first will improve my code. But I do not know how I can cache the data I read? I was thinking to do it with the FPGA FIFO, but the FPGA read/write blocks seem to be faster for me and I do not know why? Can you tell me a block/vi to cache the data I read from the FPGA or maybe even an example?
    @Christian: This NI_MinimumBufferSize property looks exactly what I was looking for. But my question is now if I should put the tdms write VI's in my high priority loop and read directly from the FPGA FIFO buffer to the file as it is done in the Disk logging example at http://zone.ni.com/devzone/cda/tut/p/id/11198? Or is it better to read the data from the FPGA via the FPGA read/write function, write the data to a RT FIFO in the high priority loop and then write the data with the  NI_MinimumBufferSize property option to the tdms file from the RT FIFO in the low priority loop?
    In summary, I am still unsure if the FPGA FIFO or the FPGA read/write function with a queue or RT FIFO is better for me and how I can create a cache to build chunks of data blocks to write.
    Thank you very much in advance for your help.
    Best regards
    Andy

  • Write to measurement file note: x values only guaranteed for one data signal?

    Hi everyone,
    Attached is a vi I have developed... When I save the data my .lvm file has a note in the header than says" X values only guaranteed for Power (Filtered)".... Power is one of 9 signals... I am not sure what this note means, but I assume that there is a problem synching these signals to a common timebase...
    Would someone be able to explain this note and how I can fix it? Any comments/advice would be greatly appreciated.
    Regards,
    Jack
    Solved!
    Go to Solution.
    Attachments:
    HRJack1.vi ‏361 KB
    Lode_Test_14.xlsx ‏973 KB

    Hi Dennis,
    Thanks for your reply... How can I change the scalars to dynamic data?... I want this single value to be written as the same rates of the other values (4kHz).... So the current heart rate value should be written each iteration as with the other data until the value updates...? That is to say, I want a heart rate value for every data point/row in the .lvm file?
    Any suggestions would be appreciated... I have been working on this for some time and am getting no where..
    Regards,
    Jack

  • Concatenat​ing TDMS Files

    Hello,
    I'm writing a script in DIAdem 2011 which combines data from multiple sources into a single TDMS-File. Exporting into multiple TDMS files works fine( I can open them in DIAdem) but I'm having trouble combining all files to one TDMS-File. Speed is important, so I tried to avoid loading all data into the dataportal and saving again (this works though).
    If I understood correctly it is possibly to directly concatenate the binary contents of the files into a single file. Is this correct? Because using the MS-Dos copy command or using a VBS-Script in DIAdem with Stream-Objects both results in TDMS-Files that I can't open anymore.
    The error message says:
    "TDS Exception in Intialize: Tds Error: TdsErrNotSupported(53):"
    It seems only one of the files produces these problems. When I load this one file and save it again as TDMS I can sucessfully combine them and load the resulting TDMS without errors.
    Perhaps the file is fragmented and this leads to the error (the offending file is measurement data)? Is this expected behaviour for fragmented files?
    How can i efficiently combine these files? I have to be able to combine multiple hundreds of files ( in pairs. e.g. combine 400 TDMS in pairs to 200 TDMS files) fast and i guess opening 200 files, saving again and combining is rather slow.
    Is there an efficient way to solve this task?
    As the offending file is actually TDMS-Data from a BLOB-Datafield in a SQL-database another solution might be loading the TDMS directly from the database into the dataportal and saving from DIAdem, instead of dumping the BLOB-data into a TDMS-File on the HDD( i guess this results in a defragmented file as opening and saving resolves the problems).
    But I'm not sure how to achieve this. I'm using ADO to interface with the SQL-DB. The code looks approximately like this:
    Set recordSet = CreateObject("ADODB.Recordset")
    recordSet.Source = 'QUERY
    recordSet.open
    Set fso = CreateObject("Scripting.FileSystemObject")
    'Create Stream object
    Set BinaryStream = CreateObject("ADODB.Stream")
    do
    chunkSize=100
    lngOffset=0
    lngFileSize=recordSet.Fields.Item("Field").ActualS​ize
    'Open the stream And write binary data To the object
    BinaryStream.Open
    do while lngOffset<lngFileSize
    varChunk=RecordSet.Fields.Item("TDMS_DataInBLOB").​GetChunk(chunkSize)
    Call BinaryStream.Write(varChunk)
    lngOffset=lngOffset+chunkSize
    loop
    'Save binary data To disk
    Call BinaryStream.SaveToFile("path", adSaveCreateOverWrite)
    BinaryStream.Close
    Call RecordSet.MoveNext
    loop until RecordSet.EOF
     How can I change this code to write the data into the dataportal?
    Thanks in adavance.
    Best regards,
    grmume

    Hi Brad Turpin,
    I have already tried concatenating the files with the copy command. I don't have a hex-editor at work but by looking at the filesizes and checking the contents with a texteditor the script seems to work but I can't open the created file.
    The script I used looks like this:
    private Sub mergeFiles(filePath1,filePath2,outFilePath,bDelete​Input)
    if bDeleteInput then
    Call ExtProgram("cmd.exe","/Q /c copy /b """&filePath1&""" + """&filePath2&""" /b """&outFilePath&""" &del """&filePath1&"""&del """&filePath2&"""")
    else
    Call ExtProgram("cmd.exe","/Q /c copy /b """&filePath1&""" + """&filePath2&""" /b """&outFilePath&"""")
    end if
    End Sub
     To test your script I defined the following variables:
    NewFileName="C:\Documents and Settings\username\Desktop\new folder\combined.TDMS"
    ChanNames(0)="file1"
    ChanNames(1)="file2"
    Folder="C:\Documents and Settings\username\Desktop\new folder"
    DosDrv="C:\Documents and Settings\username\Desktop\BatchFile"
     It completed sucessfully but the result is the same. I can open the two seperate files(file1.tdms and file2.tdms) but I cannot open the combined.tdms.
    Sadly I can't share the original files and I can't use DIAdem to fill the files with dummydata because opening in DIAdem and saving resolves the problems.
    Do you have an idea what causes these problems? The possibility to combine tdms-files like that was a big bonus for me...
    Can I somehow fill the files with dummydata without opening them in DIAdem? Or tell DIAdem to keep the original file structure but change the values?
    Best regards,
    grmume

  • Out of memory error while opening 1GB TDMS file, no splitting possible

    Hi all,
    the file in question contains about 1,4 Million channels, each has 295 integer points. The channel name is the time stamp where its measurement has been taken. 
    Diadem cannot load them completely and only displays the first 65.000 channels.
    Labview (TDMS read) cannot even read small chunks of data. I've tried separating the file using Split TDMS File Memory Independent LV2009.vi (https://decibel.ni.com/content/docs/DOC-20054) but to no avail - the error I get is Code 2 (Memory is full).
    I use Win7 and Labview 2012 SP1 32Bit.
    Thanks in advance for any help.
    Best regards, Markus
    Solved!
    Go to Solution.

    Markus,
    the term "channel" refers commonly to data coming from a single transducer. So if you have e.g. 50 transducers in your system, you should have 50 channels.
    Acquiring data continuously generates chunks of data per time unit (e.g. 1kHz acquisition rate will generate 1000 samples per second). The chunks should be saved in the file to its appropriate channel. TDMS Write gives you the option to save data repeatedly to the same channels (again, group/channel name the important parameter!).
    Nevertheless, the overall amount of data will not be less, even if you distribute them over channels in a better way. Still, loading ALL data at once will not be possible in a 32bit process.
    BUT: If channels have all data as recommended, loading a singel channel at once will give you all data from the transducer for the complete measurement time. Then you can display/modify the data as requested, maybe store back to another file (or the same as new channel).
    Having less channels could also improve loading times, but maybe there is no difference at all.... i don't have specific benchmarks on this.
    Depending on the algorithms you are using, data reduction can improve overall times.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Read time of tdm file increases

    Hello,
    I recently recorded a lot of data in tdm format. I originally saved it in an excessively organised and complex way which resulted in large header files and was very slow. I changed it and most of the data is fine, except 6 files in the old format. Just trying to read them to get the data out and then convert it into an easier format is taking far too long. Each file has ~15000 channel groups, each with 3 channels (I won't do this again...). I have witten a small vi to test the reading speed. Excluding opening and closing of the file, if I just find a channel group by name, reading one channel from that group takes about 1 second. This would still take days to read it all but would be acceptable. The strange thing is, is that if I do this in a loop for successive channel groups which is clearly necessary, it takes longer and longer each iteration. This is behaviour that I have always seen when reading tdm files, but it hasn't caused a serious problem before. I can't find any information about why though, so I hope I'm just doing something stupid. I have attached the speed testing vi (Labview 2010). Running it for 5 iterations, the time taken to read the channels is
    0.82304 s
    1.58809 s
    2.42514 s
    3.56820 s
    5.60632 s
    The channels it is reading all have the same number of values, and it makes no difference if I start at a different channel group (by adding a number to i in the loop).
    Does anyone have any explanation for this behaviour?
    Thank you very much for your help, and I'm sorry if it's something tht has been asked before,
    James 
    Solved!
    Go to Solution.
    Attachments:
    ReadBadTDMSpeedTest.vi ‏44 KB

    TDMS is an all binary format whereas TDM posses an XML header, otherwise they are very similar. Being a binary format you would expect it to read faster especially as you mentioned that the header was complex.
    There are a number of un-closed references in your code and I wonder if this was partly the issue, although this wouldn't explain why converting to TDMS fixed the problem?
    Beyond that, it would be nice to try this without using the express VIs to see if the problem still occurs. 
    Also, where you able to see if this was a memory issue? And if the read time continued to increase beyond what you posted?
    Anyway, I am glad we found a solution to your problem.
    Nick C.
    Cardiff University

  • How to read a part of a TDMS file?

    Hi,
    I'm having problems loading back a part of a TDMS file.
    Im currently trying to use the offset and count input on TDMS read.
    But the offset value doesn't seem to make any difference: If I set offset to 5 and count to 10 it still puts out 10 data points.
    By the way:
    Im using labview 8.5, and I multiply the offset and count with the sample rate (100000samples/s) so that offset and count settings input will correspond to seconds of measurement to load.
    I would be very grateful for any help
    Regards
    Carl Zandén 
    Attachments:
    Load part of TDMS file.jpg ‏165 KB

    I am new to TDMS as well so take what I say with a grain (block) of salt.  But as no one else has answered, I'll give it a shot.  First of all, at 100000 S/s and an input for COUNT of 10 X 100000, you will always get 10 seconds worth of data.  Your graph is not showing you 10 data points, it is showing you 10 seconds OF data.  This is expected behavior.  By varying the OFFSET input as you have it you will step through your data 5 seconds (5 X 100000 points) at a time.  So, for IN offset =0 you will see data from 0 to 10 seconds, for IN offset =1 you will see data from 5 to 15 seconds, for IN offset =2 you will see data from 10 to 20 seconds, etc.  You also will probably NOT see the X scale change accordingly as it has no way to know what the initial time of your data set is, unless you tell it.  All it knows is that it has a set of 1M data points with a 1e-6 second delta t.
    Hope this helps.
    Roy

Maybe you are looking for

  • Can there Be More Than One I-Tunes Account on One Computer?

    I don't know where to post this question and can't find it anywhere in the Faqs. If there are a couple of people using I-Tunes, can they use the same computer but with their own accounts? If so, how can they set up their own account? The reason I am

  • Help! Iphoto backup fail

    My Macbook Pro recently shut down, I got a new HD. I had a backup on an external hd, made with time machine. Now my problem is that I can't open Iphoto from my backup where I have thousands of pictures. Is all lost or is there a way to get to them? P

  • How to remove a third party item added to System Preferences

    I downloaded and installed a third party program which placed and icon for it on System Preferences.  I would like to remove the program from my MBPro and remove the icon for it from System Preferences. I would appreciate your help and suggestions to

  • Is Profit Center required when using Transfer Pricing?

    Hi Expert, If we are going to use transfer pricing in SAP, what are the requirement in order to keep it running? Does it require activation of profit center accounting? Thanks for support. regards, cpf

  • After deleting of itunes

    after deleting itunes and all components,can't download itunes again. press "download itunes",receive message "thank you for dowloading..." and nothing happens