06-11-2012 04:45 PM
I am writing an application acquires 4 analog channel on demand and write acquiring data along with WO# and Operator ID( Both comes from Front Panel). I am abele to stored all 4 channels data along with time stamp but kind of stuck to store WO# and Operator ID. It seems to me "TDMS Write Custom Properties". Please see the attached code and anyone can add on this feature ? I want to store WO# and Operator ID only one time.
Thanks
~Repon
Solved! Go to Solution.
06-11-2012 05:38 PM - edited 06-11-2012 05:39 PM
Have you tried "TDMS Set Properties.vi", or that what you're referring to? It would help if you put the VI in the code showing us what you are trying to do. Under what section do you want these properties set? For every channel, or at the root section of the file? The VI to set properties is pretty straight forward to use, so what specifically is the problem you are having?
06-11-2012 05:39 PM
I tried it outside of my while loop and it didn't work.
06-11-2012 05:40 PM
Sorry, i hit submit before i was finished Reread my edited post above.
06-11-2012 05:46 PM
See example attached. This puts the properties at the top level, which is what I'm assuming you want.
11-09-2022 06:32 AM
Hello guys!
I'm sorry for the reactivation of this old thread, but the title fits to my case too...
Working several years with Diadem, now I (should) start with LV. Made first courses, but have not a lot of training in the field. Btw, we use LV2019.
My first "job" is to create the VI which saves the test data in the TDMS file.
Where the data come from is not of interest (at least in the first step). So I could just generate some values.
So far it works, but I don't understand how to work with properties for data, group and channels.
I can set the group name and description. Here in this topic is shown, how to add more properties to the root.
But how to do this for channels, with 3-7 custom properties per channel?
Here is shown almost the same what I need, but there is no data writing in shown picture...
Guess, it's not necessary to reopen and reclose the TDMS file for props and data...
What I would need now is a (part of) VI which I can add at specified place 🤗
If possible, without long lectures...
Greetings,
Vassili
11-09-2022 07:31 AM
Hi Dia791,
You're not far off with what you've already got. To write channel properties, use the same TDMS Set Properties but wire the group name *and* channel name inputs. After you've written the data with TDMS Write wire the group name and channel name(s) outputs to another TDMS Set Properties. This will result in a broken wire because the channel name input requires a single string, so add a For Loop around TDMS Set Properties. This will auto-index over the channel names, which means it will run once for each item in the channel names array.
You need to create arrays of properties with one entry for each channel which you can then send to TDMS Set Properties. Hopefully the picture below gives you the general idea. Sorry I couldn't upload a VI snippet - LabVIEW is on another machine.
Andy
11-09-2022 08:16 AM
If you haven't realized it yet, properties in Diadem are index and can be searched for quickly. Lets say you have some data you collect on a channel, like temperature. You might have hundreds or thousands of samples of this reading. If you wanted to create a filter in Diadem and say find all files, where the channel has at least one value greater than say 25, it would be a pain. This is because each sample needs to be read, and then have the check on if the value is greater or not. But if instead when you write the data, you set a property on the channel that is the Minimum, and Maximum, then things get easier. Diadem can quickly look for that property on Maximum and if it is ever greater than 25 you have what you want.
Because anything can be written to a property, it can be a pretty open ended feature. Maybe you want to log what user ran the test, or what the last calibration date of the equipment was, or what the DUT's date of manufacture was. Should these be properties on the Channel, Group, or the whole File? That will likely depend on the structure you data is in.
I made a presentation years ago on TDMS here. It touches on what types of things you might want to store as properties. For me I'll try to think of everything that should be properties and make my software write them when the test is taking place. But then my users always come up with new stuff they might want to search for, and I need to decide if it is worth adding those properties, or if I want to write something custom, as a one off.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-09-2022 08:35 AM
11-09-2022 08:39 AM