Read specific channels of an existing PDM file

Dear users of Lab View,

I would like to ask for help using the PDM read Vi to read specific channels in existing TDMS files.  I know to use the "contents of list TDMS" vi to that group names and channel list, but I don't know how then use this information to read identified specific channels.

the problem, I'm trying to work around is to read a file of PDM with data from two channels, each with a different amount of data taken at different speeds. I would like to read a block of data from a single channel.  However, this data block contains more elements than the other channel. So, end of file error almost everytime I meet because the read PDM Vi tries to read this block of data for each channel.

How can I specify the channel for the PDM read VI?  I tried to create a constant and fix them on the node "channel name" on the PDM read VI, but it gave an error.  I guess I don't know how to format.

is attached the VI I'm trying to implement

A sample file is too large to attach.

Thanks for the tips

I think that the problem may be that you close the TDMS of origin reference in each iteration of the loop, try to move outside as shown in the snippet.

Note that I don't really went through the logic for the rest of your code.

Tags: NI Software

Similar Questions

  • Read/write PDM files

    I'm looking for TDMS files as a way to save disk space for long trials.

    I have trouble finding a clear tutorial on how to write several channels (but I think I got including this one), but more specifically, how to read several channels on a sort of a waveform graph. My research did not give much.

    Is there a better data format to use?

    Rick

    Talk wrote:

    So if I understand well to do a PDM read function for each registered channel?

    No. one is the reading of many channels.  In this case it receives all channels waveform data in the data group measured.  You could also provide an array of channel names if you want to be more specific.  But all channels from a single reading must be of the same data type.  That's why the other two readings are separated.

  • Read the last value of a large file of PDM

    Hello everyone!

    I hope someone can help out me with this one.

    I try to put in place a program that can read the last value of one of the large channels of different TDMS files but I just can´t find a way to do it.

    I would appreciate help for my little problem.

    Thank you very much in advance for your support.

    Kasim.

    Hello

    You can use the following playback TDMS Set Position feature included in the PDM API.  This function receives a parameter called "(0:start)", which can be set to 1 to go to end of the file.  In this way, you can read the last value written to the PDM file.

    I hope this helps!

    Anuar Rojas

  • Channel import from time to tiara from a PDM file

    I have a generated Labview tdms data file has the timestamp clock computer written in the file as a string. When I add this tdms file to the portal in DIAdem data it is important this time string channel, and I can't trace this as the x-axis data. I would like to import this time string of the tdms as a weather channel file easily. Is this possible?

    The work around I have found is to import the tdms file in excel, and then save as an excel file. I can then import this channel since the Excel using the Excel Import Wizard and specifying the time stamp column is a weather channel. Surely, there must be a better way.

    Thank you.

    Hi PRinOR,

    Here is a VBScript script that converts each text string "Time Stamp" in the data portal to a 'Time Stamp' datetime string.  You can run this VBScript manually whenever you load one of these TDMS files in the data portal, or we could implement to run automatically on your computer as an event of BROWSER loading custom.

    If you can convince the controller LV for a Brown wire entry datetime to the PDM file, then this new channel of data will appear as a column of values datetime correctly recognized in Excel, even if the display in Excel will be different from the datetime string in your TDMS file because Excel does not this default format (I think it's possible with a custom display Excel datetime type) display type.

    Brad Turpin
    Tiara Product Support Engineer
    National Instruments

  • How to select a specific channel in another file?

    Hello

    I have several tdv-files (~ 100) I want to analyze for a specific channel. All files have the same structure with the same channels. With tiara, I can load all the files at once to see the files in my dataportal.

    What I want to do is to select a channel x for each folder and view data in a graph or using. It works if I select each channel by hand, but it's a lot of work if I have about 100 cases. Is there an easy way to select a specific channel for all my files at once?

    Thanks in advance

    Hello

    I don't know a file with the extension tdv format. There is also no use on the site of National Instruments, so I think that it's a typo.

    If you are able to open the files, you are also be able to use the tiara serche.

    Take a look at this screenshot:

    I search for all files named TR_M17_QT data *, the name of the Group * superior and the name Temp_B channel. If you display only the channels, you can select all strings in the list of results a trail of the channels in the data portal.

    Best regards, Stephan

  • MS Money 2005 - I rebooted the software, but it does not automatically download the update needed to read my existing data files

    Due to a hard drive crash, I had to reformat my hard drive,
    therefore lost my copy previous update of MS Money.
    I reloaded the software from the CD, but it does not automatically download the update needed to read my existing data files.
    Can someone help me read my old data files?

    Microsoft or anyone have made available as a patch to download?

    Hi Derek,.

    Since the problem is related to Microsoft Money, I suggest you post your question on the Forums of money from Microsoft.

    Microsoft Money Forum

  • PDM-file: how to set the description of the channel?

    Hello

    I use the "DAQmx Configure Logging.vi" to capture the raw data from the measurements of May. Which works very well.

    At the end, after the acquisition of fiishing, I want to save the PDM. To do this, I want to add some properties to the PDM file. Using "TDMS Set Properties.vi" works, but ot for all properties. I'm able to add the name, description, title, author and date/time (yellow cells in the screenshot). How ca I add the description of the channel (see green cells in the screenshot).

    My real simple code to change the properties of PDM:

    Thanks for your help.

    Better subject.

    Michael

    If you want to write a property for the channel, you must provide a group and a channel for the service to know which channel the property goes with.  If a group is provided but no channels, it assumes that the properties for the group.  If neither are provided, it assumes that the file.

    Oh, and you should go give this idea a Kudos: Additional metadata TDMS

  • I have Acrobat Standard XI and recently downloaded CD Player for a specific use. Reader became my default for open PDF files once it has been installed. How can I get Acrobat Standard to be once more my fault?

    I have Acrobat Standard XI and recently downloaded CD Player for a specific use. Reader became my default for open PDF files once it has been installed. How can I get Acrobat Standard to be once more my fault?

    Hi nancye22519208 ,

    Please right-click on any PDF on your system, then go to properties > under general, you will find "opens with". Here you will see 'change' option, by clicking on it, wil give you a window from which you can choose the Acrobat Standard XI as a default for PDF files.

    Kind regards

    Christian

  • PDM file with automatic backup on corrupts the data.

    When I test data stream into a file to PDM using AutoSave = true, data is corrupted in the 'package' #3 and beyond.

    I write matched double/DateTime data to a TDMS file configured as TdmsWaveformLayout.PairedTimeAndSampleChannels.

    When I try to read the PDM file, for example using the sample application to drive, I get all sorts of errors. Notably, the number of timestamps is not equal the number of samples (values y). More data is corrupted. In other words, the timestamps are invalid and the sample data is essentially random.

    This happens every time I write the third package/lot and beyond. If I write a single sample, followed by another single sample, the third will be corrupted. If I write 1 kilosample, followed by 1 kilosample, sample no. # 2001 will be corrupted.

    I guess that something is very wrong in the automatic backup routine, as data are always written correctly when I explicitly save the PDM file.

    It's using MS 8.9.0.246 in Visual Studio 2008 SP1 using .NET framework 3.5 SP1 on Windows 7.

    The TDMS file is created in the following way. Note that AutoSave is set to false to avoid the bug.

    TdmsFile f = new TdmsFile (tdmsFilename, new TdmsFileOptions (TdmsFileFormat.Version20, TdmsFileAccess.ReadWrite, true, TdmsByteOrder.Native));
    f.AutoSave = false; Must not be set to = TRUE because of a bug in Measurement Studio!

    TdmsChannelGroupCollection channelGroups = f.GetChannelGroups ();
    ChannelGroup TdmsChannelGroup = new TdmsChannelGroup (...) Unique ID...) ;
    channelGroups.Add (channelGroup);

    f.Save (); Needed when AutoRecovery is set to false.

    TdmsChannelCollection tdmsChannels = channelGroup.GetChannels ();
    foreach (IDicomInstance instance in series. Instances)
    {
    tdmsChannels.Add (new TdmsChannel (string. Format ("{0} (time) ', for example.") Signal.Name), TdmsDataType.DateTime));
    tdmsChannels.Add (new TdmsChannel (string. Format ("{0}", for example.) Signal.Name), TdmsDataType.Double));
    }
    channelGroup.WaveformLayout = TdmsWaveformLayout.PairedTimeAndSampleChannels;

    Every 10 ms, a double array [100] happens (with information in a DateTime table clock [100]). The data is stored in the file TDMS in a simple way:

    AnalogWaveform wf = AnalogWaveform. FromArray1D (sample. Data.Samples);
    WF. Timing = WaveformTiming.CreateWithIrregularInterval (sample. Data.Timing);
    WF. ChannelName = sample. Source.Name;
    WF. UnitDescription = sample. Source.UnitOfMeasurement;

    ChannelGroup = _tdmsFile.GetChannelGroup (... TdmsChannelGroup Unique ID...) ;
    TdmsChannel channel = channelGroup.GetChannel (... channel... name);
    channelGroup.AppendAnalogWaveform(channel, wf);
    channelGroup.Parent.Save (); Needed when AutoRecovery is set to false.

    This is what the TDMS file looks like in the sample player application:

    For those who can run in it before we are able to get a fix on, a viable solution is to turn off auto-save and save the TDMS file any time a change to the file is made manually, such as after adding channels or groups, or write data.  This will not negatively affect performance, because that's exactly what the property of automatic backup.

    It should also be noted that this problem arises when you use the layout of the TdmsWaveformLayout.PairedTimeAndSampleChannels waveform.

    I'll post back later when we have a fix for this problem.

    Sorry for the inconvenience that this may cause,

    NickB

    National Instruments

  • ChnListBox... of another PDM file

    Hello world

    I would like to draw a waveform channel, given any string value x and value any channel there, I selected in a dialog box.

    It's pretty easy if both channels are owned by the same PDM file, as you can see in the code below (works on my computer):

    Option Explicit  ' force explicit declaration of all variables in a script.
    Dim DisplaySheet, DisplayArea, oMyCurve

    Call UserVarCompile ("WaveformPlot.VAS")
    Call SUDDlgShow ("Dlg1", "C:\Documents and Settings\All Users\Documents\National Instruments\DIAdem 11.0\Documents\WaveformPlot.SUD", NULL)

    Call View.Sheets.RemoveAll
    Dim oMySheet: Set oMySheet = View.Sheets.Add ("Sheet1")
    View.ActiveSheet.Cursor.Type = "line".
    Set DisplaySheet = View.Sheets ("sheet 1")

    Set DisplaySheet.Areas.Item = DisplayArea (1)
    DisplayArea.DisplayObjType = "CurveChart2D".
    Call View.Sheets ("sheet 1"). Areas.Item (1). DisplayObj.Curves.RemoveAll
    Set oMyCurve = DisplayArea.DisplayObj.Curves.Add (XChannel_, YChannel_)

    I created two user variables named XChannel_ and YChannel_ so that I can use in my SOUTH file.

    Everything is perfect... but I am asked to select the channels to any PDM file. The two channels selected may not belong to a same file PDM.

    I don't know how to handle that I don't think that there is a command that would allow me to use 1 channel 1 TDMS file without loading completely. Help, I have seen several methods like ChnNameGet with DataFileHeader, but none of them really treat my problem.

    I hope someone will help me.

    Thank you.

    Near Hi,.

    Let me first address the selective channel loading component of your post.  If you also want to help by the way all the information required of the SUDialog to the VBScript DIAdem, we can address that next.  For a single channel to load a data file, you must know the following information:

    Full path to the database (disk + case + name + extension)

    Name of the use to use to read this data file

    The name or Index of the channel group channel is in

    The name or Index of the string to load

    GroupRef = 'GroupName' ' OR '[1].
    ChannelRef = 'ChannelName' ' OR '[2] '.
    ChannelPath = GroupRef & "/" & ChannelRef ' ' GroupName/ChannelName' GOLD ' [1] / [2].
    Call DataFileLoadSel (DataFilePath, ChannelPath, use)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • repair error 2503 PDM file to recover data

    Hello

    I met a system failure, while writing data to a file of PDM and subsequently can no longer access the PDM data and get "2503" code say error this file is not in line with the style of PDM file format.

    I read the forums and have seen some solutions and has tried to fix the file using other vi but the closest, I had a partial recovery with the majority of deleted data. My file must have four sets of data, tests are the first 3 and the 4th is the important data, recovery seems to delete the data in the last section, which is the important thing and the file is greatly reduced. I did this on a copy of the file so still have the original.

    Delete the index file doesn't help at all.

    I tried to copy and opening of another place that does not work.

    I opened in a file Analyzer that provides a load of code in the hexagonal section, I don't understand, but the last entry made at a reasonable time for the data collected and useful stamp.

    The data are relatively simple, different channels of the same format of an acquisition of measurement data.

    It seems that the data is always there that the file is of a reasonable size for the expected data, but I don't know how to fix and read the data, its really important to access the data, can anyone help?

    the files are attached

    Thank you

    -camm-

    There are 17 segments in the file. #1 à #15 segment are all about 'Thermocouple, Thermocouple #1, Thermocouple #2' groups and channels in them. the 16 segment #, #17 talk about "Thermocouple #3" and channels in it that you are not really worried. These 2 segments stored only metadata about them. If everything went right, it should be a #18 segment that needs to store the raw data on it for «Thermocouple #3» channels And this segment should begin at offset 0xCA000. But there is no such segment. The data offset 0xCA000 is not follow the format of the PDM. Analysis all data after 0xCA000, it is not even a piece of bytes corresponding to the format of the header of PDM. All data after 0xCA000 looks like spilled invalid souvenirs in the file when the system crashed. And it decreases the size of the watched file "reasonable."

    The conclusion is that the raw data for "Thermocouple #3" had not been recorded in the file.

  • Internal error of screw, PDM file storage

    I use LabView 8.5.1, DAQmx 9.0.2. and a module OR USB6216.

    I have set up on my request a task as follows: 15 channels activated with a sampling rate of 1sample/10 s (very slow). My purchase has to work for a few days or more.

    Sometimes, I get the error "Internal storage screw" (code - 2500). so I can't read my file TDMS (see attached file) and I can't deal with my data.

    You know the exact meaning of this error on the case of a PDM file. Yo have a solution to process my data?

    Best regards, Daniel.

    This tdms.dll was released with LabVIEW 2010. TDMS.dll is backwards compatible, it means that you can still use this dll with LV 8.5.

    You can right-click on tdms.dll and choose "details" to see the version.

  • allow to create or write a PDM file with labview 2014

    Hello

    I need help. I'm new with LabView. I tried to create a PDM file, but it does not work. My code in the link below is really simple, but I don't know what the problem is. My code doesn't throw any errors so I don't know what to look for in the internet. Once my code is excuting, no file is created. I use LabView 2014 and my laptoop has windows 7 on it.  My question is, in all I need to do whenever I create a new VI of specific configurations that will be play/create/write a .tdms so that my code may work correctly because the writing in a .txt file works perfectly.

    Thank you and sorry for my English

    Hi bmtanguay,

    you want to run your VI on your cRIO9074?

    Where do you think your cRIO creates this file? A cRIO is a clean computer - and it has its own 'hard drive '. This is where your file is created: C partion on your cRIO!

    You cannot create a file on your Windows pc from a VI running on your cRIO!

  • How to add a time stamp to a PDM file

    I need to add a time stamp to my PDM file.  Currently, I take an array of doubles, their conversion to a type of dynamic data, then send to tdms_write.  I have to add a timestamp, but I can't find a way to do it.  I also tried holding the timestamp, converting it into a doube, U64 and I64 and adding that to my table before the dynamic data conversion type, but when I lose precision.  I need to have at least millisecond resolution.  I know that I lose accuracy because the timestamp is two 64-bit values.  top 64-bit are set to seconds since the epoch and lower 64 bit are fractions of a second.  I would even send these two numbers divided in my happy tdms file and conversion at a later date, but can't seem to do it again.  Any help would be appreciated.

    The natural way would be using a waveform.

    You can add your timestamp as two U64 (using cast to array U64) as properties of the channels as data t0.

    Tone

  • Could not open the PDM file

    Hi, I'm using TDMS format for my project.

    I succedd to connect all the data into TDMS files using the

    DAQmxConfigureLogging(taskHandle, logFile.toAscii().constData() ,DAQmx_Val_LogAndRead,"GroupName",DAQmx_Val_OpenOrCreate)
    

    Now my problem is that when I'm reading the TDMS file I can't open it.

    My reading code is (from the example of TDMStesing):

         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 to the DDC_OpenFileEx function

    Error details http://zone.ni.com/reference/en-XX/help/370051K-01/cvi/cvidiademlibraryerrors/

    -6204 DDC_UnexpectedError An unexpected error has occurred in the library.

    Need help...

    My configuration:

    Material: NEITHER 9234
    NOR-Daqmx: device driver 9.4.0f5
    Version of Windows: XP (sp3)
    Language: Qt (C++)


Maybe you are looking for

  • Moving from Yosemite to El Capitan

    I'm on Yosemite 10.10.5 iMac 27 inch end 2012 and are reluctant to upgrade to El Capitan. I want to get my perfect Yosemite Setup, so El Capitan has a good landing. But I need advice. I did a test proposed by Linc Davis on Re: is el Capitan up to spe

  • Mozzilla knows that keeps constant Norton cause FF scroll & video & enter the lag?

    I say that whoever reads this? This constant guard when installing and using your FF, it causes a lag in typing, scrolling, and video. I have and always had Norton, but when I install CG I have this problem of late. I have remove the constant guard a

  • SSD upgrade - clone OS + part HP_TOOLS. from old to new ssd hd

    I have a hp elitebook 8740wI changed my old hd with an ssd. How can I keep the partition with HP_TOOLS? I've already triedI used the software SSD for migration - perfect copy, the operating system works, copy partition HP TOOLS, but does not start wi

  • New drive hard actviation

    How to enable Windows 7 disc to grade on a new hard drive in my kids computer

  • I have an external keyboard, how is alt codes don't work?

    I have a laptop with a keyboard external USB I plug my 10 - key. When I press ALT on my laptop keyboard and then enter the alt on the keyboard code nothing appears even if num lock is turned on. Anyway is this issue? Thanks for the help.