FB_ALY_XtsAccelerationAnalysis_1Ch

The XTS Acceleration Analysis 1Ch calculates the current acceleration of a XTS mover. For this purpose, the length of the XTS in millimeters must be declared and as input signal the mover position is required.

Syntax

Definition:

FUNCTION_BLOCK FB_ALY_XtsAccelerationAnalysis_1Ch
VAR_OUTPUT
    ipResultMessage: Tc3_EventLogger.I_TcMessage;
    bError: BOOL;
    bNewResult: BOOL;
    bConfigured: BOOL;
    fAcceleration: LREAL;
END_VAR

FB_ALY_XtsAccelerationAnalysis_1Ch 1:Outputs

Name

Type

Description

ipResultMessage

I_TcMessage

Contains more detailed information on the current return value. This special interface pointer is internally secured so that it is always valid/assigned.

bError

BOOL

This output is TRUE if an error occurs.

bNewResult

BOOL

When a new result has been calculated, the output is TRUE.

bConfigured

BOOL

Displays TRUE when the function block is successfully configured.

fAcceleration

LREAL

Current acceleration of the XTS mover in m/s².

FB_ALY_XtsAccelerationAnalysis_1Ch 2:Methods

Name

Definition Location

Description

Call()

Local

method calculates the outputs for a given configuration.

Configure()

Local

General configuration of the algorithm with its parameterized conditions.

Reset()

Local

Resets all internal states or the calculations made so far.

SetChannelValue()

Local

Method to pass values to the algorithm.

Sample

VAR
    fbXtsAcceleration : FB_ALY_XtsAccelerationAnalysis_1Ch;
    fbSystemTime : FB_ALY_GetSystemTime;
    nXtsLenght : UDINT := 4000;
    bConfigure : BOOL := TRUE;
    fPosition : LREAL;
END_VAR
// Configure algorithm
IF bConfigure THEN
    bConfigure := FALSE;

   fbXtsAcceleration.Configure(nXtsLenght);
END_IF

// Get current system time
fbSystemTime.Call();

// Call algorithm
fbXtsAcceleration.SetChannelValue(fPosition);
fbXtsAcceleration.Call(fbSystemTime.tSystemTime);

Requirements

Development environment

Target platform

Plc libraries to include

TwinCAT v3.1.4024.0

PC or CX (x64, x86)

Tc3_Analytics