Filter data in tdms file

I am needing to look at select data of a TDMS file in an analyze portion of a stat machine. The VI is to test both AC and DC motors. I am getting 18 different reading from a power analyzer. I am writting these to a TDMS file for ease of passing through the rest of the states. In the "Analyze" state I am wanting to look at  13 of readings an compare them to see is they are within tollerence. I will then use this check to highlight the reading green or red.
My questions are:
Should I even have an 'Analyze' state or should I do the analysis in the state that the reading is taken?
If I do use the 'Analyze' state is pulling the data from the TDMS file the best way to do this?
Also, if you see any other possible errors in the vi, please let me know. This is my first experience with LabView and it is steep learing curve.
Thanks, 
Attachments:
AC TEST PANEL.vi ‏524 KB

Since you are using a State machine approach, I would suggest to keep that idea and add the Analyze state to keep the code organized. Plus, you can add a shift register to pass around the acquired data which will be more efficient than reading from the TDMS file.
For future reference, when using the state machine while you analyze, log, etc...you are forcing sequential execution and loosing time that can be used for hardware I/O. When this becomes a concern you can implement the following structure. Keep up the good work
Alejandro | Academic Program Engineer | National Instruments

Similar Messages

  • How to store data (in tdm files)

    I'm looking for advice on how to store data in tdm/tdx files.
    The main challenge is like this: At regular time intervals there is new data available (say every 10 minutes there are 10 minutes of new data available). All data is time based. So every ten minutes I may create a new tdm/tdx file containing this data segment. However, when i want to analyze the data i dont necessarily want to view 10 minutes of data from all channels, but maybe 20 hours of data from one particular channel.
    The way I've achieved this so far is to manually load each 10 minute segment of this particular channel and then add these parts together. This is both time consuming and cumbersome. Is there a better way to do this that I've simply not discovered yet? Is there a better way to store data to simplify this process?
    One solution is of course to save data from several 10-minute frames in one file, but seeing as there is a never ending supply of data i cant simply save all data in one giant file, it has to be split up at some point, and the problem will still remain.
    One factor to have in mind here is that this is rather large amounts of data (maybe 10GB each day), so the option to simply load all the data into memory goes out the window rather quickly.
    Feel free to ask if I've not made myself very clear

    Hi salte,
    If your test ever ended, and if you had LabVIEW 8.20 or higher, I would recommend using a TDMS file, which handles data appeands flawlessly.  DIAdem 10.1 now also does data reduction and index windowing during file loading for TDM / TDMS / DataPlugin files, so that you could easily load out only the part of the file you wanted to look at.  But since you describe your data acquisition as never stopping and amassing 10 GB per day, I agree that it would be impractical to use only 1 data file.  So we are stuck with some number of files which each contain a part of your measurement.  This approach can have advantages, since you can save operational properties for each "buffer" such as average value, dominant frequency, ambient room temperature, etc., and later on you can use the DataFinder to query out only the data buffers which meet specific conditions based on these properties.  The problem remains to load and assemble data based on multiple files.  This is an old problem in DIAdem, and one for which I have an efficient and I hope satisfactory workaround application.  It does what you describe already doing in the minimum amount of time and with the minimum amount of user interaction, and it can be highly parametrized to suit your particular situation.  The ideal way to start the application would be as part of a ResultsList custom menu.  This would enable you to query out the buffers you wanted, highlight those rows in the ResultsList, right-click and choose your custom menu, and WHAM! the selected buffers for your queried channel(s) are automatically appended together in the DataPortal.  Launching from a ResultsList custom menu would mean that you could skip the file dialog and just read out the data sources directly from the ResultsList selection.
    Let me know what you think,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Importing Data from Multiple DataPlugin Files.zip ‏198 KB

  • Save multiple sample rate data to TDM file

    Hello, LV connoisseurs
    I use 2 Multifunction boards and LV 7.1 to gather slow and fast data simultaneously, 'slow' being 10 temperatures at 150 Hz, 'fast' being 12 pressures at 15 kHz, rate factor between slow and fast is constant 100. My acquisition is set to 'continuous' with blocks of 15 and 1500 resp., so each sample set takes 0.1 sec.
    Currently, I use 2 loops, one for each board. Slow data are written to .lvm, fast to .tdm, and this works fine.
    But I wonder if in this configuration it might be possible to
    - use one loop only (yes, trivial) with the main target being to
    - write data into two channel groups of one .tdm-file, one for the 'fast' the other for the 'slow' data?
    If at all possible, would this require the consumer/supplier scheme such as to allow the interspersing of data or can I do this directly?
    Thank You for your input.
    Michael

    Just to make the distinction, you should probably be using TDMS (the S stands for streaming) instead of TDM if you are continuously writing data. TDM is more for writing a snap-shot and doesn't work so well for continuous data (big memory leaks last time I used it back in '06).
    Also, as no time data is stored you probably also want separate timestamp channels then for your fast and slow data.
    As mentioned, it is no problem having multiple writing loops using the same TDMS reference.
    nrp
    CLA

  • Write waveform timestamps with data in TDMS file

    Hello,
    I am attempting to write data from an array of waveform data derived from a multi sample DAQmx acquisition, but I have found where I have used the get date / time function within my while loop passed to a TDMS Write in series with another being passed the waveform data, that I have many more data points than timestamps, as I am getting a timestamp then the list of sampled points.
    I am looking at using the timestamp data from the waveform, but I'm not sure how to make this work.  Attached is an example where I have attempted this, but just managed to obtain mismatched data types.
    Could anyone please offer some advice on how to get the following structure in my file:
    timestamp of sample | channel 1 sample | channel 2 sample | .... | channel N sample
    Thanks
    Dave 
    Solved!
    Go to Solution.
    Attachments:
    testMultiWaveformLogging.vi ‏24 KB

    I'm not quite clear about your use case in the attached VI. However, you should give input of channel names to the 2 "TDMS Write" nodes since they have different type of raw data.

  • Save wavefromgraph data of format [f0,df & magnitude)into TDMS file

    How to save Wavefrom Graph data into TDMS file including fo & df along with the magintude.
    I am able to save magnitude alone which is not correct ,coz i have f0 & df also needs to be saved in order to calculate some values
    pls see the below image which shows the i/p format to the wavefrom graph. Also pls do the needful help.  .
    Attachments:
    Waveform.png ‏11 KB

    Hi, check this link
    Simultaneously Write and Read TDMS Data.......
    https://decibel.ni.com/content/docs/DOC-7982

  • How to open some *.dat (tdm) files by script via sud?

    Hello,
    i want to make for a script a GUI (sud) were i can mark some dat- or tdm-files in a directory (press ctrl) and give the names with path back to the script.
    May be as vector or matrix.
    It is possible or is there any DIAdem-function which includes this?
    Regards

    Hi Traderhans,
    I think what you need is the command FileDlgShow. Please refer to the help for more information. If this command is not sufficient you can also use the command FileNameGet. But this command is much more complicated.
    Hope this helps.
    Winfried

  • Retrive data from binary file to xl file

    i want to retrieve the data from tdms file to xl file.

    Hi mayalayam,
    AFAIK there comes a filter with the TDMS package to read tdms files directly from Excel!?
    And after typing "TDMS Excel" in the search field in the upper right I found this link to get that "free Excel import filter"... (It's a German page, so maybe you do the search on your own too.)
    Message Edited by GerdW on 07-08-2009 01:29 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I incluce a hyperlink to TDMS file in the report?

    Hi,
    I am storing the measured data in TDMS file in each step. File name is written to the ResultText property so it is visible in the report.
    I would like to have hyperlink in the report that opens this TDMS file automatically either with DIADEM or with the TDMS VIEWER (LabVIEW application)
    Any help in creating hyperlink in the report (XML, HTML) would help.
    Thanks,
    Andras

    Hi Andras,
    you can also write the links within a new step to the report.
    As shown in the attached file.
    Regards
    DianaS
    Attachments:
    Sequence File 2.seq ‏5 KB
    hallo3.vi ‏12 KB

  • Cannot open tdms file

    Hi I'm using TDMS format to my project.
    I succedd to log the whole data into TDMS file by using the 
    DAQmxConfigureLogging(taskHandle, logFile.toAscii().constData() ,DAQmx_Val_LogAndRead,"GroupName",DAQmx_Val_OpenOrCreate)
    Now my problem is that when I'm trying to read the TDMS file I can't open it.
    My code of reading is (from the TDMStesing example):
    unsigned int
    length;
    int ddcError = 0;
    DDCFileHandle file = 0;
    char *property = 0;
    // Read file name
    ddcChk (DDC_OpenFileEx (FILE_PATH, "TDMS", 1, &file));
    ddcChk (DDC_GetFileStringPropertyLength (file, DDC_FILE_NAME, &length));
    nullChk (property = (char*)malloc (length + 1));
    ddcChk (DDC_GetFileProperty (file, DDC_FILE_NAME, property, length + 1));
    printf ("File name property: %s\n", property);
    free (property);
    property = 0;
    // Read file description, if present
    if (DDC_GetFileStringPropertyLength (file, DDC_FILE_DESCRIPTION, &length) >= 0)
    nullChk (property = (char*)malloc (length + 1));
    ddcChk (DDC_GetFileProperty (file, DDC_FILE_DESCRIPTION, property, length + 1));
    printf ("File description property: %s\n", property);
    free (property);
    property = 0;
    // Read the channel groups
    ddcChk (ReadGroups (file));
    Error:
    if (property)
    free (property);
    if (file)
    DDC_CloseFile (file);
    return ddcError;
    When I debug the code I got the error code of -6204 at the DDC_OpenFileEx  function
    Error details http://zone.ni.com/reference/en-XX/help/370051K-01/cvi/cvidiademlibraryerrors/
    -6204
    DDC_UnexpectedError
    An unexpected error occurred in the library.
    Need help...
    My setup:
    Hardware: NI 9234
    NI-Daqmx: device driver 9.4.0f5 
    Windows version: XP (sp3)
    Language: Qt (C++)
    Solved!
    Go to Solution.

    Hi all,
    I added the DataModels libs to the project and I succedd to read TDMS file.
    BUT, now I'm trying to read TDMS 2.0 file and I got the next message:
    ERROR: TDS Exception in Initialize: Tds Error: TdsErrFileVersionTooNew(-2510)
    err id : -6210
    Need help
    Atteched the TDMS file
    Attachments:
    tset_tdms.zip ‏781 KB

  • How can I read in a TDMS file into Sound and Vibration Assistant

    I have recorded a signal from 2 channels from a PXI 4496 DAQ card. I recorded this signal with the TDMS file format from a VI in Labview. I would like to import these signals into the Sound and Vibration Assistant for freq. analysis. In sound and vibration assistant there is an import logged tdms from signal express but I can not seem to import my original signal?  How can I import this data? 

    Hello All,
    I am trying to read TDMS file using LABVIEW. The TDMS file is created by me for reading data from one wire devices.
    I have created simple vi. attached below which read data from TDMS file. I am able to read other tdms files, I have with this program but not which one created by me. I am not able to attach file with .tdms exentiont. So I have attached it with .xlsx extention. Can anyone please guide me where is the problem in TDMS file? Am I missing anything while creating it?
    Thanks
    Attachments:
    EditTDMS (1).vi ‏14 KB
    data.xlsx ‏17 KB

  • Strange behavior when getting data and storing it into a tdms file

    Hi
    I am getting data from a VISA device(10bytes every 20ms) in a string buffer and then using indexing array get each element which is 2 bytes , filtering the data in real time using a butterworth filter and then storing the data to a TDMS.
    The problem is that the data goes haywire after a brief the the different elemetns just switch. So for example x becomes resistance, GSR becomes  etc
    I have uploaded the VI and the TDMS file converted to excel format

    You really should be writing to the TDMS file while you acquire the data.  By using the Autoindexing Tunnels to build the arrays, you are causing A LOT of memory allocations, which causes things to really slow down.  I would venture to say that you are missing data, causing what looks like a shift in the data.  But you would need to be looking at the error coming out of the VISA Read to know for sure.
    So look into the Producer/Consumer.  The idea is to use a parallel loop to log the data while your current loop reads and processes the data.  The data is sent to the consumer loop via a queue.

  • How can I open a tdms file and replace a subset of data then save that change without re-writing the entire file again?

    Hi all,
    Is it possible to open a tdms file and make a small change an an array subset then save the file without having to save the whole dataset as a different file with a new name? That is to say, is there something similar to "Save" in MS Word rather than "Save As"... I only want to change a 1D array of four data points in a file of 7M data points.
    I am not sure if this make sense? Any help is apreciated.
    Thanks,
    Jack

    You can use either one, but for your application, I would use the synchronous.  It requires far less setup.  When you open the file, set both enable asynchronous and disable buffering to FALSE to enable you to use synchronous with arbitrary data sizes.
    Attached code is LabVIEW 2011.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    UpdateTDMS.zip ‏20 KB

  • How to get the last data point from a TDM file in LabVIEW?

    Hello,
    I am using LabVIEW to analyze some rather large TDM files, and I need a way to get only the last data point.  So far, the only way I have been able to accomplish this is by reading the entire file.  Is there a property in the TDM file or a function in LabVIEW that will allow me to get the index of the last item in a channel?  
    Thanks!
    Christina

    Do you want to avoid reading whole file and want to be able to reach or get the index of last value of channel? is there any specific reason? I am not sure you could do it without loading the whole file. But the easiest way would be just to use array functions "array size" would give you the index of last element. 
    -Nilesh
    Kudos are (always) welcome for the good post. :-)

  • How can I make a query by date with several TDMS files?

    Hi,
    I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS files? I'd like make a time stamp for start date and stop date, where I could compare the TDMS file dates and sum the values that are in the channels where these files are similar. For example, I save a file with "02/01/2013" name, in other day "03/01/2013", in other day "04/01/2013"... so, i'd like put in time stamp for start date "02/01/2013" file and to stop date "04/01/2013" file, than, sum all values that range with my TDMS files existing. How can I make that? 
    Thanks all,
    Val 

    Hello Val_Auto.
    You're Brazilian, no? Me too. = ^ - ^ =
    I converted VI to version of your LabVIEW (8.5). Is attached in this reply.
    This VI search all your TDMS in a range of dates and join them in a single TDMS. I hope this is what you wanted.
    Query TDMS is the main VI. The TDMS VI Search changes the date format that out from calendar control (which is DD / MM / YYYY) to DD-MM-YYYY. This is because you can't name files using "/". I chose "-" but, if necessary, you should change to keep the same format of your TDMS files.
    If you have any doubt as to its operation or how to make changes to adapt VI for your application, keep at your disposal.
    Thank you for your contact; I hope have helped you and succeed in your application.
    Wesley Rocha
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!
    Attachments:
    Query TDMS.vi ‏62 KB
    tdms search.vi ‏24 KB

  • TDMS File Creates Multiple Tabs of Data. Want to create only one.

    Hello NI Community,
    I am currently using the DAQ Assistant with my string pots to record displacement over a long interval of time (see attached VI). I am then using the "Write To Measurement File" vi to save the data into a TDMS file (see the "Write to File Settings" picture attached for all settings chosen for file write). The file is being written, however when I open the TDMS file, the document creates a tab in Excel for every second of data recorded (please see the attached "). It looks like the TDMS file is grouping all the data from each second together and then creating a new group of data.
    How do I get the file to write all the data onto a single tab instead of creating multiple? I do not want to have to concatenate hundreds of tabs into a single excel sheet.
    Thanks,
    Chris
    Solved!
    Go to Solution.
    Attachments:
    Write to File Settings.PNG ‏40 KB
    TDMS File Multiple Tabs.PNG ‏57 KB
    TDMSWrite.vi ‏108 KB

    You should not be using the comment.  I just removed that and it all worked for me.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • Safari crashes when clicking on Top Sites icon

    This problem started a couple of days ago. I haved tried: deleting the plist files for top sites, deleteing the cache.db file, checking plugins and nothing helps. Problem details are as folows: Process:         Safari [406] Path:            /Applicat

  • Error while converting BPMN to BPEL in Business Process Architect

    Hey, I am using Business Process Architect 11gR1 where I have modeled my process. Now that I have to move this model to BPM, I am using the option SOA -> share blueprint with IT in BPA. A dialog appears that asks to validate the model. I confim with

  • Flash 8 Pro freezes on Mac G5, dual 2,5 GHz

    Ever since I upgraded from Flash MX 2004 Professional to Flash Professional 8 on my PowerMac G5 it doesn't run. All I can do is open the software but as soon as I click on a menu or a button, whatever, like changing the size it freezes instantly. I'v

  • What is a dock adaptor??

    I have a 1gb nano ipod ..just downloaded music..I want to be able to charge the battery with the adaptor but some say certain adaptors need a dock adaptor..I dont have a dock..I dont care if my ipod lays down to charge and is not in a stand.. after r

  • Wildcard Filename Match

    Hello! I'm looking for a wildcard filename match method that can work in every operating system supported by the JVM. The signature of this method would be something just like this: public bool match(String wildcard, String fileName);The wildcard wou