DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Append channel name information to a large number of channels simultaneously?

Solved!
Go to solution

Hi all,

 

My first post!

 

I've been using Diadem for the past few months. I have a large number of TDM with exactly the same channel names for each one. Now I need to graph certain channels from multiple different TDM files and things are getting confusing.

 

Is there a quick way to append additional channel name information to all channels - I have 135 channels per TDM file so I'm not doing it manually!

 

Example:

Channel names: Vdd_10dBm, Measured_Power_10dBm..Etc

 

I would like to add something like "_test1" appended to each channel name in a particular TDM file so I can distinguish them.

 

Thanks,

Mark

0 Kudos
Message 1 of 9
(5,100 Views)
Solution
Accepted by topic author mdon

Hey Mark -

 

Welcome to DIAdem and the forums!  I'm assuming you're using a recent version of DIAdem (or else the code below might not work).

 

This is something you can (and should) use a script for.  A few lines like this will iterate through every channel group in the Data Portal and append "_test1" to each of the channels in those groups:

 

DIM Group, Channel  'declare variables
FOR EACH Group IN Data.Root.ChannelGroups   'loop over each channel group
  FOR EACH Channel IN Group.Channels  'loop over each channel in the group
    Channel.Name = Channel.Name & "_test1"  'append to the channel name
  NEXT  'next channel
NEXT  'next channel group

 

Let us know how else we can help.

Derrick S.
Product Manager
NI DIAdem
National Instruments
Message 2 of 9
(5,074 Views)

Hi Derrick,

 

Thanks for this! 🙂 I'lll give it try later today and let you know how I get on.

 

Regards,

Mark

0 Kudos
Message 3 of 9
(5,072 Views)

Did the trick!

 

Thanks

0 Kudos
Message 4 of 9
(5,040 Views)

Derrick already posted the solution to your question. Would you mind to explain why you were adding the extension to the channel name ? While the channels are listed in the Dataportal, channels from one file are in a separate groups so its easy to distinguish them.

 

When / Where do you need the extended channel names ?

 

Andreas

0 Kudos
Message 5 of 9
(4,960 Views)

Hi Andreas,

 

I wanted to have distinct names for each group of channels.  I was often graphing the same channels from multiple different groups. At the time I did not think to append distinct infomation to each chaanel set per group.

 

When graphed the series would all have the same legend information and i could not tell which ones were from what group. By runinng Derricks program for each group I could add a distinghuishing feature. I won't run into this problem in the future as I will update labview to append addtional channel information for each group.

 

Make sense?

 

Mark

0 Kudos
Message 6 of 9
(4,954 Views)

Hello Mark,

 

that makes a lot of sense. So in fact you add a piece of information to each channel so that you can tell which channel belongs to which channel looking at the legend.

Did you see that legens can have additional columns and one of them can be the group name ? I attached a screen shot of the dialog in REPORT I am referring to.

 

Andreas

 

0 Kudos
Message 7 of 9
(4,927 Views)

Thanks Andreas,

 

I was not aware of that feature - I'll keep it in mind for future reference.

 

Mark

0 Kudos
Message 8 of 9
(4,915 Views)

Thanks Andreas,

 

I was not aware of that feature - I'll keep it in mind for future reference.

 

Mark

0 Kudos
Message 9 of 9
(4,914 Views)