MoveToPoint()

MoveToPoint() 1:

Moves directly to the position of a configured PTP segment without processing the segments between the start position and the target point.

Syntax:

METHOD MoveToPoint : HRESULT
VAR_INPUT
    bCommand:       BOOL;   // TRUE to start move, FALSE to abort running move or rewind old command
    MoveIdx:        INT;    // Selected cluster of segments (By default: Cluster 1 - negative direction / Cluster 2 - positive direction) 
    TargetSegment:  INT;    // Destination segment of the selected cluster (0 to move to the last used segment in a cluster)
END_VAR

MoveToPoint() 2: Inputs

Name

Type

Description

bCommand

BOOL

TRUE to trigger a movement,

FALSE to cancel a current movement or to cancel a pending command.

MoveIdx

INT

Selected cluster (grouped PTP segments).

In the default initialization, cluster 1 comprises the movements in the negative direction and cluster 2 those in the positive direction.

TargetSegment

INT

Target segment within the selected cluster. If a 0 is transferred, the last segment is approached with InUse equal to TRUE.

MoveToPoint() 3: Outputs

Name

Type

Description

MoveToPoint

HRESULT

Return value with feedback on the success of the execution.

Requirements

Development Environment

Target platform

PLC libraries to include

TwinCAT 4026 >= v3.1.4026.16
TwinCAT 4024 >= v3.1.4024.66

PC or CX (x64, x86)

Tc3_PlasticBaseApplication (>= v12.12.0.0)