FB_ALY_XtsVelocityAnalysis_1Ch
The XTS Velocity Analysis 1Ch calculates the current velocity 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_XtsVelocityAnalysis_1Ch
VAR_OUTPUT
ipResultMessage: Tc3_EventLogger.I_TcMessage;
bError: BOOL;
bNewResult: BOOL;
bConfigured: BOOL;
fVelocity: LRAL;
END_VAR
Outputs
Name | Type | Description |
---|---|---|
ipResultMessage | 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 |
bNewResult | BOOL | When a new result has been calculated, the output is |
bConfigured | BOOL | Displays |
fVelocity | LREAL | Current velocity of the XTS mover in m/s. |
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
fbXtsVelocity : FB_ALY_XtsVelocityAnalysis_1Ch;
fbSystemTime : FB_ALY_GetSystemTime;
nXtsLenght : UDINT := 4000;
bConfigure : BOOL := TRUE;
fPosition : LREAL;
END_VAR
// Configure algorithm
IF bConfigure THEN
bConfigure := FALSE;
fbXtsVelocity.Configure(nXtsLenght);
END_IF
// Get current system time
fbSystemTime.Call();
// Call algorithm
fbXtsVelocity.SetChannelValue(fPosition);
fbXtsVelocity.Call(fbSystemTime.tSystemTime);
Requirements
Development environment | Target platform | Plc libraries to include |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x64, x86) | Tc3_Analytics |