From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

rename channel name and comments

When I use a calculation function like digital filter, the new channel has a name reflecting the function and the columns used by index. I would like to rename the channel created to be more descriptive as well as the comment or just overwrite the existing channel but retain the name and comment. Any suggestions?
0 Kudos
Message 1 of 3
(5,775 Views)
The channel name and channel comment are two vector variables called CN and CC. You can access each channel either by using its number in the channel list (e.g. CN(1)) ir its name (e.g. CC("Time")).

You can simply use lines like this to change a comment:

CC("Time")="Hello"

This will change to comment for the "Time" channel to the string "Hello".

Hope this helps,

Otmar
Otmar D. Foehner
Message 2 of 3
(5,775 Views)
To add to Otmar's comment,

The DIAdem "variables" CN and CC can also be referred to as ChnName and ChnComment and are referenced as a vector (array) to indicate which channel you want to work with. So as an expansion to Otmar's example consider the following code to set a channel name and comment

CN(1) = "Speed" ' Same as ChnName(1) = "Speed"
CC(1) = "Instantaneous" ' Same as ChnComment(1) = "..."

You can also refer to the channels by name by doing exactly as Otmar said:

CN("Time") = "Speed"

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 3 of 3
(5,775 Views)