Configure

Configure the algorithm. Channel specific parameter are set using the method ConfigueChannel().

Syntax

Definition:

METHOD Configure : BOOL
VAR_INPUT
    nXtsLength : UDINT;
    fHardwarePosFactor : LREAL;
    fSampleRate : LREAL;
    aFilterOrder : ARRAY[1..4] OF UDINT;
    aFilterTimeConstant : ARRAY[1..4] OF LREAL;
    aUseFilterForExtSignal1 : ARRAY[1..4] OF BOOL;
    aUseFilterForExtSignal2 : ARRAY[1..4] OF BOOL;
END_VAR

Configure 1: Inputs

Name

Type

Description

nXtsLength 

UDINT

Length of the given XTS system in millimeters.

fHardwarePosFactor 

LREAL

Factor for scaling the input signal in mm.

fSampleRate 

LREAL

Sampling rate (samples per second) of the input signal.

aFilterOrder 

ARRAY[1…4] OF UDINT

Filter order of the PTn filter for the calculation.
Index:

1: Position

2: Velocity

3: Acceleration

4: Jerk

aFilterTimeConstant

ARRAY[1…4] OF LREAL

Filter time constant of the PTn filter for calculation.
Index:

1: Position

2: Velocity

3: Acceleration

4: Jerk

aUseFilterForExtSignal1 

ARRAY[1…4] OF BOOL

If TRUE, the corresponding filter stage is applied to input signal 1.
Index:

1: Position

2: Velocity

3: Acceleration

4: Jerk

aUseFilterForExtSignal2

ARRAY[1…4] OF BOOL

If TRUE, the corresponding filter stage is applied to input signal 2.
Index:

1: Position

2: Velocity

3: Acceleration

4: Jerk

Configure 2: Return value

Name

Type

Description

Configure

BOOL

Returns TRUE if successful.