Hi,
I took the time to build a sample project that shows the problem. Please see the joined files.
Avg1 has a varying SmplTm value.
Avg2 has a fixed SmplTm value.
When you run this program on a controller and when you check with the Diagnostic file, you will see that Avg1Output will spike to 0 in a cyclic fashion. Avg2Output has a nice filtered output like it should.
So, I think that the SmplTm parameter should be able to take variable values, not only fixed values. If this is not possible, please modify the Help File associated with this function block to tell the users that SmptTm parameter must be a constant.
Have a good day!