LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a channel property in a tdms file

How do you create a channel property in a TDMS file. I've tried using the TDMS_SetChannelProperty as follows

 

 

for (i = 0; i < numChannels; i++)
     error = TDMS_SetChannelProperty (channels[i], :Color, TDMS_UInt32, colors[i]);

No error is generated but the data doesn't get written to the file?

 

 

0 Kudos
Message 1 of 3
(3,340 Views)

Hey,

 

I've been working with TDMS library lately.  Sorry, I haven't exactly tried that function though.  The help has this to say about parameter number 2:

 

property const char * The name of the channel property. You can specify a built-in property or a property created by TDMS_SetChannelProperty.

The following built-in properties are available:

 

Property Constant Data Type
Name                TDMS_CHANNEL_NAME                    String (char *)
Description      TDMS_CHANNEL_DESCRIPTION     String (char *)
Unit String        TDMS_CHANNEL_UNIT_STRING     String (char *)

 

I'm confused about yours.  What does ":Color" mean?  How does that compile?

0 Kudos
Message 2 of 3
(3,292 Views)

There is an error with the line 

the actual line i send is as follows

Fmt(propertyName, "%s<%s", "Color\0");

channel is a TDMSChannelHandle

int color = 1234567;

 

error = TDMS_SetChannelProperty (channel, propertyName, TDMS_Int32, color);

0 Kudos
Message 3 of 3
(2,922 Views)