05-17-2017 09:21 AM
Hi,
The script below works in Diadem 2012 and writes the arithmetric mean to properties in the channel.
With diadem 2015, it does not write the properties. It gives no error message.
If I select all the channel data ("1-"), its writes the properties. If I set StatResChn = false, it works also. But I don't really want to have the results in a separate channel. Obviously, I am missing some thing...any help?
Thanks!
Thomas
dim start_Idx
dim end_Idx
StatSel(6) = "Yes" ' Arith. mean
StatResChn = true
start_Idx = 607
end_Idx = 1207
call StatBlockCalc("channel", start_Idx & "-" & end_Idx,8)
Solved! Go to Solution.
05-18-2017 01:39 AM
Hi,
It seems that you found bug in DIAdem 2015. Unfortunately, I don't have work-around, except those you already mentioned. This behavior is also in DIAdem 2017. We plan to fix it for the next 2017 SP1.
Referring to DIAdem 2017 I can say that we reworked the statistic functions to have an easier handling and a better performance (the function calls of DIAdem 2015 still exist). In DIAdem 2017, your script can be defined as follows:
dim start_Idx, end_Idx
start_Idx = 607
end_Idx = 1207
StatsSelection = eStatsArithmeticMean
StatsUsePopulationFormula= 0
StatsResultChn = 0
Set ChnResult = ChnStatisticsChannelCalc("[2]/Schall_1", StatsSelection, start_Idx, end_Idx)
Greetings
Walter
05-23-2017 09:10 AM
Hi Walter,
Thanks for the explanation.
Regards
Thomas