Configure
Configure the algorithm. Channel specific parameter are set using the method ConfigueChannel().
Syntax
Definition:
METHOD Configure : BOOL
VAR_INPUT
nMinLag : DINT;
nMaxLag : DINT;
nStepSize : UDINT;
nNumChannels : UDINT;
eWindowMode : E_ALY_WindowMode;
eCorrelationMode : E_ALY_CorrelationMode;
nWindowSize : UDINT;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
nMinLag | UDINT | Specifies the minimum number of cycles by which the two signals are shifted to calculate the correlation to each other. This is a negative integer. |
nMaxLag | UDINT | Specifies the maximum number of cycles by which the two signals are shifted to calculate the correlation to each other. This is a positive integer. |
nStepSize | UDINT | Specifies by how many cycles the signals are shifted to calculate two consecutive correlation coefficients. |
nNumChannels | UDINT | The number of channels that are correlated with the reference signal. |
eWindowMode | Specifies the type of window used to calculate the coefficients: Continuous: All values since the start of the analysis are included in the analysis with equal weighting. SlidingWindow: The calculation is done via a window of the size Window Size. The current values are always included in the analysis and outputs are updated with each cycle. FixWindow: The outputs are updated every Window Size cycles and calculated via a window with the length Window Size. | |
eCorrelationMode | The coefficients are calculated based on one of the following definitions: Base: Normed: Covariance: CovarianceBessel: Pearson: | |
nWindowSize | UDINT | For the SlidingWindow and FixWindow window modes, specifies the number of cycles over which the coefficients are calculated. For the Window Mode Continuous the setting of nWindowSize has no effect. In SlidingWindow mode, Window Size values for all channels are buffered in addition to Maximum Lag values from the Reference Channel and Minimum Lag values for Channel 00 to Channel 0n. The size of the router memory must be taken into account when setting these parameters. |
Return value
Name | Type | Description |
---|---|---|
Configure | BOOL | Returns |