LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

setting TDMS properties

is there a way to set the "source date/time" and "source name" properties of a TDMS file in LabVIEW 2016?  Win10

0 Kudos
Message 1 of 8
(3,124 Views)

Properties in DIAdem - Overview

 

You can use script name "sourceoriginalname", try it.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 2 of 8
(3,100 Views)

how would this change if I'm trying to set the properties while the file still resides on the PXIe?  The PXIe controller is using LabVIEW RT 2016.

0 Kudos
Message 3 of 8
(2,971 Views)

I think the following might be what you're looking for.

 

Note that I couldn't get what I thought you were looking for by setting "sourceoriginalname", it seems like DIAdem overwrites that on opening?

 

Example_VI_BD.png

Produces:

diademProperties.png

(the file name I used was test.tdms)


GCentral
0 Kudos
Message 4 of 8
(2,961 Views)

as you can see from the PNG file, I've done that.  I know that the file contains data and that it get FTPed from the PXIe to the PC Host.  But the change in properties at the PXIe side doesn't seem to happen.  I know that the Shared Variables have data because I've check the contents in the Distributed Sys Mgr.

0 Kudos
Message 5 of 8
(2,939 Views)

The snippet you show here has a couple of things that I'm curious about, but perhaps they're not your problems. Maybe you can explain them and I can try understand better:

  • You have an array of TDMS references. Is this because you're setting the same properties for a bunch of files?
  • You set "title", not "name". Is that intentional? Note, it will set a different user-defined property, not the built-in one you previously seemed interested it
  • You don't pass the paths out of TDMS Close. Are you sure you're not copying them somewhere else, before you write the properties? i.e. there isn't a race condition?

GCentral
0 Kudos
Message 6 of 8
(2,921 Views)

yes, I am setting the description, title, and storage date/time the same for an array of TDMS files and closing them.  The data in the files is collected before the properties are set.  Therefore, closing them after setting the properties should not be a problem.  After the main VI on the PXIe has stopped running, then the files are programmatically FPTed to the PC Host.  In that process the filename is changed.  Does this reset the properties I previously set?

0 Kudos
Message 7 of 8
(2,911 Views)

I don't believe that should cause a problem (although the filename is used as a property that was previously mentioned, "sourceoriginalname").

I was more checking this bit (quoting disappeared on my computer so copying below...):

 

After the main VI on the PXIe has stopped running, then the files are programmatically FPTed to the PC Host.

 

I.e. that you are sure the files are closed having had their properties written before you copy the files. If you're sure that's the case (they're copied from disk after they're fully written and closed) then I have no further suggestion. Perhaps if you shared some more of the code someone here might see something, but I don't know where to suggest your problem is.


GCentral
0 Kudos
Message 8 of 8
(2,899 Views)