From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

renaming "arithm_mean"

Hi,
I'm using one of the built in function in Diadem to try and find the mean of a channel
For Sel = 1 To 22
StatSel(Sel) = "No"
Next
StatSel(6) = "Yes"
StatClipCopy = 0
StatClipValue= 0
StatFormat = ""
Call StatBlockCalc("Channel",TotMinInt,FindChnMean)

However, when it spits out the mean it stores it in a channel called Arithm_mean, I was wondering if there was a way in which you are able to change that name within the block of code.

Thanks
0 Kudos
Message 1 of 5
(3,669 Views)
Unfortunately there is no way to tell the StatBlockCalc command which result channels to use. The command always creates its own new channels with its own names.
So the easiest thing to do is to rename the channel afterwards CN("ArithmMean")="newName".
Make sure that there is no other channel called ArithMean, this command will always rename the 1st channel of that name . Keep also in mind that if you are using DIAdem 9 you might want to add a groupname to the channelname in CN() to be able to explicitely address the correct channel.

There is another thing you could do if you are only calculating the average of one channel. Configure the function in a way that it does not write channels at all. After the calculation, get the result out of the Variable StatArithMean a
nd write it to the channel of your choice. Since that variable is not a vector, you can only access the results of the first channel you are doing the calculation on. Use a loop if you wnat to calculate the mean ov several channels.

Ingo Schumacher
National Instruments
0 Kudos
Message 2 of 5
(3,669 Views)
Hi StepZ,

No, the name of the resulting "aritm_mean" channel is hardcoded, but you can rename the channel afterwards with the command:

ChnName("arithm_mean") = "NewChannelName"

Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 3 of 5
(3,669 Views)

Hi! I have DIAdem 2012. It still not possible to rename the channel during the application of the command "StatBlockCalc"?

 

Thank you

 

0 Kudos
Message 4 of 5
(2,844 Views)

Hi maurispaulies,

 

Correct, as of DIAdem 2014 it is not possible to provide the name of the output channel in the StatBloclCalc() command.  Since you can easily change the name of the resulting channel(s) afterwards, and since the number of return channels is variable, this is not a clear high priority request.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 5 of 5
(2,834 Views)