Rename Group in TDMS File

Does anyone know how to rename a group in a TDMS file?
I have a TDMS file with 90 groups, each containing 4 channels.  I would like to rename the groups within the file while leaving everything else the same.  Thoughts?
thank you,
Scott Otterbacher

Thanks for the great input.  However, I'm still having some problems.  I have a for loop that runs through all the group names and at each iteration takes in the original and revised group names as inputs into TDMS Set Properties.  Some of the groups go to the correct new names, but some get changed to incorrect ones.  Attached is a copy of the VI.  I'd include one of the TDMS files as well, but each are about 20Mb.
The TDMS file contains about 90 groups that are decimal strings which relate to antenna azimuth direction.  When I collected the data I did not reference the azimuth to north, but rather I just pointed the antenna north and noted what position I was getting from the encoder (i.e. North = 156 deg).  Now I want to go through and change the group names to be referenced to north = 0 deg.  So I read in the array of group strings, convert to integer, subtract 156 or add 204, depending on the value, and then convert that new number back to a string and send it to the TDMS Set Properties function.
I am unsure if my problem is how i'm passing the arrays into the for loop or if it's how i'm using TDMS Set Properties.
Here is an example of what happens:
original groups: 5,8,13,17,20,25,28,32,36,etc...
desired groups: 209,213,217,221,224,229,232,236,240,etc...
new groups: 53,57,61,65,224,73,232,236,240,etc...
The first few are wrong, but then the 5th is correct along with the 7th, 8th, and 9th.  5 of the groups after that are also correct before it goes back to an erroneous one.  The wrong group names seem to be from the array of correct names, but just from the wrong index of the array.  This seems odd because the for loop should be reading in just one array value at a time, and in the correct order from beginning to end.
Hope you can help out a confused labview newbie.
Attachments:
Change_Az_TDMS.vi ‏25 KB

Similar Messages

  • Number of Groups in TDMS file?

    Hello,
    Is there a way I can read the number of groups in a pre-existing TDMS file? I want the groups to be named numerically so if I know how many groups there are in a file that was opened, I can automatically set the group name for the next one.
    Kenny
    Solved!
    Go to Solution.

    TDMS List Contents is what you're looking for.
    You can then do an array size on the Group names list that comes out.

  • Channel count limit for tdm files

    Hello,
    I have not been able to find any documentation listing the maximum number of groups, channels/group for tdm files.  Does anyone know these values, or a document that lists them??

    Hello CAN_man,
    There is a DevZone document on the topic of TDMS files that can be found at the following link: TDMS File Format Internal Structure
    The document contains the answer to your question, and states that:
    "Each file can contain an unlimited number of groups, and each group can contain an unlimited number of channels."
    Please let me know whether you have more questions!
    Kameralina
    Ask NI (ni.com/ask)
    Search The KnowledgeBase
    NI Developer Zone
    Measure It. Fix It. ni.com/greenengineering/
    NI Vision ni.com/vision/

  • Error -2500 while writing new channel groups / channels to tdm-file

    I'm creating a tdm-file using the express vis provided by LabView. Everything goes fine in opening the file and setting the file parameters.
    When i'm using the write data-express vi to create a new channel group and setting it's parameters i receive an "error -2500" accompanied with the call chain of the vi.
    I'm setting the parameters by using a terminal on the express vi and by using the value setting in the express vi configuration. Any ideas what might cause this error?

    I solved it. I made the error to begine some of the properties names with a number, eg. 1s for 1 sigma. I renamed them to sigma_1s and it works.

  • Create sub-group or sub-channel in TDMS file?

    Hello All,
      I have been presented with a situation where I am required to log data that is arranged in a multi-level hierarchy.  My preferred method for data logging is the TDMS format, but it is unclear if I can log more than 2 levels of hierarchy with this option.  In the terminology of TDMS file, I would need to create "sub-groups" or "sub-channels" so that all of the data can still be arranged within the same parent group.  Is this type of data arrangement possible with a TDMS file?
    Thanks,
    GSinMN 

    My understanding is that TDMS files are set at 3 levels of hierarchy: File, Group, Channel.  You could probably name the groups to show a parent group such as "Parent:Group".
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Script to auto zero channels in a TDM file with multiple channel groups

    Hi friends,
    I am trying to process some data but am having trouble modifying a script to autozero channels across multiple channel groups. The following script works to zero channels across one group. I use this script to process data in a TDM file with only one channel group. I need to be able to zero channels across multiple groups (5 groups). But the amount of groups I will have may change so I might need an option to enter the amount of groups or have the script determine the amount of groups in my TDM file. 
    Here is the code I use to zero the data. Thanks in advance for your help!
    Sub UserDlg_Select
    Call USERDLGINIT()
    USERDLGCAPTION="Auto Zero Channel Based on Specified Points "
    USERDLGTXT(5)="Number of points to Average"
    USERDLGCOMMAND(5)="t1"
    Call USERDLGOPEN()
    End Sub
    Call UserDlg_Select()
    T2="1-"&T1
    For I= 1 To ChnNoMax 'For all data channels except time
    T4=CHNNAME(I) 'Create string for Channel name (I)
    T3=ChnDim(T4) 'Create text variable for channel dimension
    STATSEL(6)="Yes" 'Arith mean
    STATCLIPCOPY="yes"
    STATCLIPVALUE="No"
    Call StatBlockCalc("Channel",T2,T4) 'Calculate Stats for Channel (I)
    'Subtract Mean of first (T1) points for Channel (I)
    Call FormulaCalc("Ch('temp1') := CH('"&T4&"') - statarithmean")
    CHNCOMMENT("temp1")=("Channel zeroed over first "&T1)+"pts" 'Add Comment
    ChnDim("temp1")=T3 'Add Dimension
    CHNNAME("temp1")=T4+"-Z" 'Save updated data with -Z
    'Delete Stat Channels
    Call CHNDEL("ArithmeticMean")
    Call CHNDEL("Sum")
    Next 'End For loop
     

    Hi rvillalta319,
    Sounds like you'll need to adapt your code to use both a for loop and some implementation of the GroupCount variable (or ChannelGroups.Count) as seen here:
    http://zone.ni.com/reference/en-XX/help/370858K-01/varoff/groupcount/
     

  • Properties in TDMS file not visible in Diadem

    Hi,
    I'am using Diadem 2011 to read a tdms file created in LabVIEW 2011.
    In diadem i cannot see the properties (file, group or channel) i added myself to the tdms file, in LabVIEW withe the TDMS file reader they are visible.
    Attached (in the zip), the TDMS file and an word doc with some screenshots.
    Somebody knows what i'm doing wrong?
    thx
    Ben Engelen
    Solved!
    Go to Solution.
    Attachments:
    No Properties in Diadem 2011.docx ‏186 KB
    BenenWalter.zip ‏190 KB

    Hello Ben,
    the properties are loaded but not all properties are displayed in the Properties node in the tree control automatically. The context menu offers the ability to display properties in the tree.
    But if you klick on the main root/group/channel node in the tree the properties are displayed in the window right bottom. There you will see your properties.
    But in the DIAdem/DataFinder naming conventions following happens.
    If you use one of the following characters in a custom property name, DIAdem replaces this character with an underscore: ., :, ,, ;, ', \, @, <, >, #, [, ], %, (, ), {, }, |, *, ?, =, !, ", ^, $, &, +, -, /, and a space.
    So if you do not want to run into this you should rename the properties
    Greetings
    Andreas

  • Read multiple tdms files

    Two questions:
    1) how can i rename the different signals in the tdms file? Now they are names "untitled x". I am looking for an elegant solution, because i record about 200 different Signals.
    2) Is there an "easy way"  to select, read and concatenate multiple TDMS files to show them in a graph?

    I had a similar goal with grouping plots and  rearranging them on the X-axis, so I put together this pretty quickly to search a range of TDMS files for a specific channel, should be able to adapt it pretty easy to suit your needs, once you manage to rename your channels.
    Attachments:
    Record Grouping.vi ‏48 KB

  • How to compare signals from two different .tdms files?

    i'm developing a lie detection system in labview.so inorder for that i need to compare the threshold physiological signals from the .tdms file with the signals i acquire continuelsy from the subject for each question asked.i use respiration monitor and heart beat monitor together with the sensorDAQ to acuire the physiological signals.so which are the function i should make use of?i have the following toolkits
    1. advanced signal processing toolkit
    2. adaptive filter toolkit
    3. digital filter design toolkit
    4. biomedical toolkit
    please give me advise on this.
    thank you.
    Solved!
    Go to Solution.

    Lie detector systems (polygraphs) generally work by looking at the physiological responses to the own subjects baseline, and do this in real-time.  You could use a file that represents the stored "baseline" for the subject, but the overall environment, circumstances, general state of the subject, etc. may not be similar enough to easily see subtle changes.
    From the stored file, you might determine a set of parameters or thresholds that indicate "normal, relaxed" for each signal.  You could read the file into your LabVIEW program, process each channel, and save these parameters.  Then when you have the new data, you can read the new data file in and process it in a similar way and then determine whether the parameters are outside the limits that you established for a "lie".
    You may get more responses to this question if posted in the Biomedical User Group
    Visit the NI Biomedical User Group at:
    www.ni.com/biomedusers

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • .tdm file storage vi's slow editing vi's

    I am developing software using Labview 8.5 and have recently added some file storage vi's for the .tdm format for use in DIAdem 10.2.  Upon using the open storage, set file properties, write channel group, write channel, and close storage vi's, the editing has become extremely slow - for any operation I try to perform there is a 10-15seconds delay before it occurs.  If I remove the .tdm vi's from my diagram then the editing goes back to normal and changes/operations occur almost instantaneously as expected.  My project is not large as far as I am concerned (Front panel - 121k, block diagram=1538k, code=0.2k, data=957k, total=2617k, total vi size on disk=389k)
    I saw a similar post to the .tdm storage vi's causing this to occur back in 2005 and was supposed to have  been on the fix list but it does not appear that it has 3 years later.  I am sure many others are using these vi's so not sure what I may have done differently to cause the editing to slow down so much.  
    Anyone with ideas and fix would be greatly appreciated as I cannot afford to sit around 10-15 seconds for every step of my developement.

    Yes, sometimes Storage VIs are slow. But They are Express VIs, supplying the easy configuration for users. If you feel they are too slow, I suggest that you can use TDMS files instead.

  • 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

  • How do you save arrays in tdm files?

    Hi,
    As part of a university project I am trying to save some program data to a .tdm file.  On each channel I wanted a number of different types of data including an analogue wave form and a couple of 1-D DBL arrays.  I have found an NI presentation that says that you can store arrays in them but dont seem to be having any luck.  Any ideas what Im doing wrong?  I am using labview 8.5.
    Regards,
    James

    Hi James,
    in a channel, you can save only one array as data. If you want to save more arrays then use several channels. You can organize them in groups. If the arrays must be in the same channel, then convert them to a spreadsheet string (in string palette) and save the string as a property.
    Greetings,
    shb

  • Can I save a TDM file without its TDX data?

    I have hundreds of data files that have been sorted (by date).  In certain cases, I want to analyze subsets of this data in particular groupings.  I would like to save these groupings in a TDM file but I don't want to another copy of the bulk data.  However, I notice that if I save a TDM, it automatically saves the TDX, and I'm not sure it's possible to save/open a TDM without its same-name TDX file.  Does anyone else have a similar need and/or know of a data management method that can suit my need?
    Thanks.
    Solved!
    Go to Solution.

    Hmm...  But it seems that the TDMS file simply puts all the information in a single file and, in the end, is almost as big as the TDX file.  What I'm trying to do is only save the meta data but not the bulk data, since I already have a copy of the bulk data in another set of TDM/TDX files. 
    Maybe I'm asking the wrong question.  Here is a simplified example of what I'm trying to do:
    I have several (let's say, 6) original TDM files.  Each of these original TDM files have 20 or more channels.  I've created a new TDM file, pulling out only 5 of the channels from each of the original TDM files but organizing them into 6 groups corresponding to the original 6 TDM files.  From this new TDM file, I've created a TDR file where the plots are based on the 6 channel groupings.  Due to this TDR to new TDM association, I think I need to save the new TDM.  However, that means I now have a new giant file that contains duplicate data from the original TDM files.  I don't want this duplicate data.  Being very new to DIAdem, maybe I'm just going about this the wrong way because I haven't figured out the "right way" to accomplish my needs.  Can anyone advise?

  • Editing String in.TDM file

    With Set Properties it is possible to add one or more strings to a .TDM file (or is it to another file that is linked to the .TDM file?). Similarly it is possible to read that string with Get Properties.
    My current impossibilities are:
    - If each measurement is appended to the preceding measurement how do I read a record that is not the last one saved?
    - If one or more strings has to be edited how can the modification replace only the affected strings? This implies a Read VI that is also capable to Write (replace).
    I am not finding much information on this file format and would appreciate knowledgeable insight.
    Regards,

    TDM = 2 Files
    The Storage VIs create a .TDM file (XML-based, for descriptive properties) and a .TDX file (binary, contains waveform / array data).
    One or many channel groups
    Each measurement can be appended to a file as a new channel group, or the values can be appended to channels that were stored earlier (resulting in one channel group per file). Use the "Always create new channel group/channel" switch to decide which way of appending data you want to use. You might want to use the "Data viewer" example shipping with LabVIEW to have a look at the hierarchy of channel groups and channels.
    Note that when appending values to a channel, "Write Data" uses the channel name to find the right channel to append data to.
    Get and set properties on particular channel groups
    To modify data on a particular channel group, you need to obtain a "storage refnum (channel group)" to this channel group. There are two ways of doing that:
    - Use "Read Data", configured to object type "channel group". The "channel groups" output will give you the array of refnums you need (the attached VI shows how to obtain and use these refnums).
    - Wire the "storage refnum (file)" that comes out of "Open Storage" to "Get Properties". The "channel groups" property will be an array of all channel group refnums in your file (the "Write channel groups" and "Read channel groups" examples shipping with LabVIEW show how to do that).
    "Read Data" should be used if you want to apply a query condition or if you are e.g. looking up channels across channel groups. "Get Properties" can give you all channel groups in the order they were stored in, or e.g. all channels of a particular group.
    "Read Data" and "Set Properties"
    "Set Properties" will replace all properties that you have selected and that show up on the block diagram as terminals. All other properties remain unchanged. The properties will be written only to the one file, channel group or channel that the incoming refnum refers to. "Read Data" doesn't write anything by itself, but you can use the output refnums of "Read data" to apply "Set Properties" to whatever you have read.
    Attachments:
    GetAndSetPropertiesInTdmFile.vi ‏115 KB

Maybe you are looking for

  • Officejet Pro 8500 Wireless All-in-One Printer- A909g Product Code Differences

    The Officejet Pro 8500 Wireless All-in-One Printer- A909g has been offered under several product codes: CB023A#BEL CB023A#BEV  CB023A#BEK  CB798A   CB794A   CB023A#B1H1027   CB023A#B1H1052   CB023A#B1H-A1  CB023A#B1H-B2 CB023A#B1H   CB023A#BEQ CB023A

  • Exporting PDF's - Initial View settings?

    Hey all! Is there any way from InDesign CS4 to set the Initial View of the PDF when exporting your layout to a PDF? I would like to be able to set the display of the Navigation Tab, the Page layout, Magnification, and a few security settings. Is this

  • Data import XML and CSV

    Hi, I have customized incident form and added few fields as per our requirement. All customized fields are in a separate class extension "ClassExtension_9cd2b3e6_25ea_4385_9a94_fc08e0cf6172" Now we are planing to import incident data from our legacy

  • ITunes on two PC's

    I've just got a new computer and would like to duplicate my iTunes library from my other computer to the new one. Helpful comments please.

  • Depreciation for IFRS requirement

    Hello experts, Could anyone explain me the configurations required for IFRS related to depreciation. My company is following Indian GAAP in Leading ledger. The non-leading ledger is also active. Now I want to make the relevant changes for depreciatio