DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

tdms property value for Double as SI type

hi,

 

I   use TDMS Set Properties VI to   save the  result  .

 

I use a Numeric double,  but want the  data  to be in SI  (m,n k....) format with specific Precision length. eg 0.0025643678 = 2.564m

 

any   way to achieve this 

 

Type casting  doesnt seem to work

 

regards

Akshay

0 Kudos
Message 1 of 4
(4,194 Views)

Hi Akshay,

 

You raise two issues here.  The first is that custom properties in a TDMS file (as of 2015) do not have a built in mechanism to store the engineering unit of the property value. The only way to clearly indicate that is with a property name suffix:

 

Pressure_Pa

EngineSpeed_RPM

ElapsedTime_s

 

The second question you raise is how to achieve the desired precision of the stored property value.  If you're storing a DBL data type property, then you usually have enough precision in the data type to encode the exact desired precision of your measurement.  If you use smaller footprint data type properties, such as SGL, I16, I8, then you may well run out of available precision in the data type you're using, such that trailing zeros after your known measurement precision may not be possible.  If you put the unit in the property name as suggested above, then you can at least scale the property value so that it's close to 1 and therefore makes good use of the data type precision you have.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 4
(4,175 Views)

 

Thanks Brad  for  response,

 

I  was not specific in saying that  "SI Notation"  -> display format for a Dbl   & not SI units.

 

it automatically adjusts the data & saves space.

 

as a response to your 2nd point  I just want to use the TDMS  Set  Properties VI  only witha double..

 

I cant  get why I cant change the precision of my data that is saved  in TDMS file.

 

regards,

Akshay

 

0 Kudos
Message 3 of 4
(4,158 Views)

Hi Akshay,

 

The data type of the wire in LabVIEW will determine the data type of the property in the TDMS file.  If you want to reduce the precision of the property value to just a few digits, just make this happen in LabVIEW in the wire, then save that reduced precision value to the TDMS file.  Only note that reduced precision values work best as data type DBL.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(4,094 Views)