IF_PosReferenceGenerator - Calculate (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

Task

Calculation of reference values of externally defined positioning jobs.

Description

This method is called up in the real-time cycle of the SoMotionGenerator. By means of output q_lrY, the reference values for the slave axis have to be made available.

Via the input i_lrRtbCycleTimeSec, the SoMotionGenerator transfers the cycle time of the real-time process (unit: seconds) to the external positioning function block. The cycle time can be used for calculating reference values as well as for observing reference velocities and accelerations.

By setting the output q_xReady, the SoMotionGenerator can be informed that the positioning job has been completed and the next job in the queue can be activated.

By means of the return value of the method, the SoMotionGenerator can be notified about any errors that may have occurred. In the case of a return value <> 0, the IEcRefenceGenerator reports via the parameter etCurrentJobState of the structure ST_RealtimeChannel that an error hasbeen detected while calling up the method.

Interface

Input

Data type

Description

i_xFirstCall

BOOL

TRUE := First call-up of job processing. Can be used for precalculations.

i_lrRtbCycleTimeSec

LREAL

Cycle time of the real-time process.

Unit: sec. (3 positions after decimal point)

i_lrCurrentPosition

LREAL

Position of the channel to which the positioning job has been assigned. Used to calculate start values.

Unit: Length units

i_lrCurrentVelocity

LREAL

Velocity of the channel to which the positioning job has been assigned. Used to calculate start values.

Unit: length units/s

i_lrCurrentAcceleration

LREAL

Acceleration of the channel to which the positioning job has been assigned. Used to calculate start values.

Unit: length units/s2

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = GD.ET_Diag.Ok -> status message

q_etDiag <> GD.ET_Diag.Ok -> diagnostic message

q_lrY

LREAL

Calculated slave position.

Unit: Length units

q_xReady

BOOL

TRUE := Job processing is finished.

FALSE := Job processing is still active.