Tag Archives: DIAdem

National Instruments DIAdem Text @@ Commands

If you’ve ever used NI’s DIAdem for data analysis you know how useful it is for looking at and analyzing large datasets.  What you may or may not have discovered is the @@——@@ commands that can be used to display channel related texts anywhere in the program.

DIAdem helpfully gives you a list of available commands, but doesn’t tell you what they display or how to use them.
Program Command: @@ChnPropGet(No,Property name)@@
Formatting: @@ChnPropGet(1,”Description”)@@
Output: The 1st channel’s Description, other input could be Name, Unit, etc
Notes: Make sure to use quotes around the Property name and remember that the channels are counted from the very first channel onwards and found as “Number” in the channel information.

Command: @@CD()@@
Formatting: @@CD(1)@@
Output: The 1st channel’s Units

Command: @@ChD(Line,No)@@
Formatting: @@ChD(2,1)@@
Output: The 1st channel’s second data point value

Command: @@CL(No)@@
Formatting: @@CL(1)@@
Output: The 1st channel’s number of points (length)

Command: @@CNoXGet(Channel group number,No)@@
Formatting: @@CNoXGet(2,1)@@
Output: Finds the 2nd group’s first channel and returns it’s channel number (counting from the first channel.
Notes: Could be considered translating from relative position of a channel (in a group) to absolute position in the list of channels.

Couple of general notes, you can’t nest lookups (at least not in the text boxes, so it would be invalid to:

@@ChnPropGet(794,"Description")@@

and turn it into a lookup:
@@ChnPropGet(@@CNoXGet(15,1)@@,"Description")@@

Otherwise it’s pretty helpful to use these when labeling graphs/etc so you don’t have to constantly correct things.  DIAdem also builds in lots of string functions like trim/etc, so you can clean things up if necessary!

<Wordpress>  – I had all these formatted nicely in a table but WordPress ate itself trying to render it, hence the oddball list, sorry. </Wordpress>