Hi Radurdin,
As "bohm" mentioned, you might be interested in the channel number of the last channel with any values in it. There is an easy way to get that-- the DIAdem variable
GlobUsedChn
always stores the channel number of the last channel with data in it. It can happen that there are smaller empty channels prior to the channel number returned by GlobUsedChn, but usually the channels before it are all full.
Also, you say you want to know how many channels there are in a file, but then you start a loop over the channels in DIAdem. If you really want to know how many channels there are in a file, without having to load them into DIAdem, this is possible for some files with an easy set of commands and for all files with a hard set of commmands.
Finally, in DIAdem 9.0 and later you can also get the number of channels in any group with the
GroupChnCount(GroupIndex)
variable, and the number of available Groups with the
GroupCount
variable.
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments