Hope the meeting went well the other day: gutted I missed it by one day as was in Newbury the day after.
I have a quick question as I’m getting quite heavily in to DIAdem, but as usual it’s all in the way the data is captured so need to sort my TDMS out. Probably an easy labview core one or two question but must admit to only just moving from express vi’s !
The 'write to measurement' Vi has a write multiple files option that I would like to include: the custom properties I want to add stop me using the write to measurement vi (I think). Basically I want the file name to be the sample number and multiple tests on the same sample to add a suffix each time……..hopefully easy
I’ve attached a sample vi as a trial to add the multiple file option to, if anybody has any ideas.
Thanks for help in advance
Sorry mate, not got LV 2015 on any machines.
I've certainly done something similar to what you need using the standard TDMS VIs and it's not too tricky.
If you downscale the VI to 2014 or sooner I'll have a nose.
Can you fake an example directory list so I can see what you mean by suffix?
If you can do the string concatenation of the sample number (couldn't see that in your example) then see if that file already exists and then modify the name if it does.
Steve et al.- here's the file as a snippet so you can see what's there - can't attach a 2014 version but I'll email it to you.
Can we explore the requirement a bit more in words and not VIs.
Do you want to generate a single file for each sample?, with each file having a different name but with common custom properties against sample?.
If you can put the issue in those terms it will save me a lot of time.
Thanks for the responses, here is a little more detail and version 14 vi attached.
There are many parameters / settings I want to record with the actual channel data in the Tdms, hence all the properties I want to add to the Tdms file. I can then sort and select by these properties in DIAdem. I think I’ve cracked this in the attached vi but it getting a suffix like in labviews ‘write measurement file’ I’m struggling with
The file name is also the sample number and is created in the main vi. There may be multiple tests on the same sample and would like to add a suffix each time and not overwrite or append the file. The labview ‘write measurement file’ explains how the suffix looks quite well so attached a couple of screenshots.
Example of sample number 005 with 4 tests would look like:
Thanks for the idea of doing the checking if file exists and the concatenating, but wondered if there was a ‘built way’ like the labviews ‘write measurement file’
I certainly wouldn't expect there to be a built way of doing it as it is a quite specific requirement.
I've used the method Sacha suggested many times, essentially just count the similar items and increment the result for a new number (a less risky strategy is to run through looking for the same file name and increment the suffix every time it matches until it doesn't)
Thanks for all the help; seems I wasnt missing something too obvious. May have a re-think on what I'm trying to achieve: is the extra work of adding the suffix automatically worth the luxury of the easy identification of the sample from the file name.