ST_CM_RMS_InitPars
Function block-specific structure with initialization parameters, which are analyzed when the function block is initialized.
TYPE ST_CM_RMS_InitPars EXTENDS ST_CM_Object_InitPars :
STRUCT
nChannels : UDINT := 4; (* Number of channels. *)
nSubChannels : UDINT := 0; (* Number of subchannels. *)
nBufferLength : UDINT := 2000; (* Buffer length. *)
fDecibelThreshold : LREAL := cCM_MinArgLog10; (* Minimum argument of decadic logarithm for 64-bit IEEE 754 arithmetic. *)
bTransformToDecibel : BOOL := TRUE; (* Transform to decibel. *)
END_STRUCT
END_TYPE
nChannels
defines the number of independent channels. This must be greater than zero.nSubChannels
defines the number of independent subchannels. This must be greater than or equal to zero.nBufferLength
is the number of input values per channel held in the internal buffer.fDecibelThreshold
is a very small floating point value greater than zero. Values that are less than this number are replaced with this value before any transformation to the decibel scale. (The purpose is the avoidance of value range errors. The logarithm of zero is not defined and strives infinitely towards minus for the limit value of small arguments. The same applies to the argument of the number zero, arg(0). The smallest possible value is 2.3e-308, which is equivalent to the constantcCM_MinArgLog10
.)bTransformToDecibel
is a Boolean value that indicates whether the result of the FFT is to be transformed to the decibel scale, according to transformation x → 20 * log10(x).
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4022.25 | PC or CX (x86, x64) | Tc3_CM_Base |