FB_TeachingLinearMotionSystem - SetProcedureData (Method)

Overview

Type:

Method

Available as of:

V1.8.0.0

This chapter provides information on:

Task

Sets the data for the procedure.

Description

The method SetProcedureData (...) is used to set the data required by the procedure.

NOTE: When the method is called, all the stored samples are removed.
NOTE: The logical encoder described by i_stData.stLEncLogicalAddress must be allocated for the teaching procedure and not manipulated from outside the function block.

Access: PUBLIC

Interface

Input

Data type

Description

i_stData

ST_TeachingFixedSystemData

Data required by a fixed system teaching procedure.

Output

Data type

Description

q_xError

BOOL

TRUE: An error occurred during last command. For more information refer also to q_etResult and q_sResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information.

If q_xError = FALSE, then q_etResult provides status information.

If q_xError = TRUE, then q_etResult provides diagnostic/error information.

The enumeration ET_Result contains the possible values of the POU operation results.

q_sResultMsg

STRING[80]

Provides additional information about the current status of the POU.

Diagnostic Messages

q_xError

q_etResult

Enumeration value of q_etResult

Description

FALSE

Ok

0

Success.

FALSE

EncoderInitialPositionRollover

56

A position rollover is applied to the provided encoder initial position.

TRUE

EncoderInvalid

54

The provided encoder is invalid.

TRUE

IdenticalPoints

51

Two points are identical.

TRUE

InterfaceInvalid

28

The provided interface value is not valid.

TRUE

LogicalAddressInvalid

53

The logical address is invalid.

TRUE

NumberOfPointsInvalid

52

The provided number of points is invalid.

TRUE

VelocitySourceInvalid

55

The provided velocity source is invalid.

EncoderInitialPositionRollover

Enumeration name:

EncoderInitialPositionRollover

Enumeration value:

56

Description:

A position rollover is applied to the provided encoder initial position.

Status message: A rollover was applied to one or more values of i_stData.alrReferencePointEncoderPosition.

EncoderInvalid

Enumeration name:

EncoderInvalid

Enumeration value:

54

Description:

The provided encoder is invalid.

Issue

Cause

Solution

It is not possible to set the data for the teaching procedure.

The input i_stData.stLEncLogicalAddress does not refer to a logical encoder object.

Provide a logical address referring to a logical encoder object.

IdenticalPoints

Enumeration name:

IdenticalPoints

Enumeration value:

51

Description:

Two points are identical.

Issue

Cause

Solution

It is not possible to set the data for the teaching procedure.

The distance between two or more points inside i_stData. astReferencePoint is less than GEM.Gc_lrEps.

Do not use the same coordinates for different reference points.

InterfaceInvalid

Enumeration name:

InterfaceInvalid

Enumeration value:

28

Description:

The provided interface value is not valid.

Issue

Cause

Solution

It is not possible to set the data for the teaching procedure.

The distance between two or more points inside i_stDataastReferencePoint is less than GEM.Gc_lrEps.

Provide a valid interface for i_stData.ifVelocitySource.

LogicalAddressInvalid

Enumeration name:

LogicalAddressInvalid

Enumeration value:

53

Description:

The logical address is invalid.

Issue

Cause

Solution

It is not possible to set the data for the teaching procedure.

The input i_stData.stLEncLogicalAddress contains an invalid logical address value.

Provide a valid logical address value.

NumberOfPointsInvalid

Enumeration name:

NumberOfPointsInvalid

Enumeration value:

52

Description:

The provided number of points is invalid.

Issue

Cause

Solution

It is not possible to set the data for the teaching procedure.

i_stData.udiNumberOfReferencePoints < 2 or > Gc_udiMaxNumberOfSamplesPerSet.

Verify that 2 <= i_stData. udiNumberOfReferencePoints <= Gc_udiMaxNumberOfSamplesPerSet.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success.

Status message: Setting the data for the procedure was successful.

VelocitySourceInvalid

Enumeration name:

VelocitySourceInvalid

Enumeration value:

55

Description:

The provided velocity source is invalid.

Issue

Cause

Solution

It is not possible to set the data for the teaching procedure.

The input i_stData.ifVelocitySource is not referring to a valid velocity source.

Provide an object that is supported as master encoder input by SystemInterface.FC_SetMasterEncoder (for example: drive, external encoder, virtual encoder, and so on.)