MC_GearInPos_BkPlcMc (from V3.0.33)

MC_GearInPos_BkPlcMc (from V3.0.33) 1:

The function block starts and monitors an on-the-fly coupling between two axes. To release the coupling, an MC_GearOut_BkPlcMc function block should be used.

MC_GearInPos_BkPlcMc (from V3.0.33) 2: Inputs

VAR_INPUT
     Execute:               BOOL;
     RatioNumerator:        INT;
     RatioDenominator:      INT;
     MasterSyncPosition:    LREAL;
     SlaveSyncPosition:     LREAL;
     SyncMode:              INT;
     MasterStartDistance:   LREAL;
     Acceleration:          LREAL;
     Deceleration:          LREAL;
     Jerk:                  LREAL;   (ab/from V3.0.5)
     BufferMode:            MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc;
END_VAR

Name

Type

Description

Execute

BOOL

A rising edge at this input starts the coupling.

RatioNumerator

INT

[1, 1] These parameters describe the coupling factor in the form of a gear unit.

RatioDenominator

INT

[1, 1] These parameters describe the coupling factor in the form of a gear unit.

MasterSyncPosition

LREAL

[mm] The coupling is fully active from this master position.

SlaveSyncPosition

LREAL

[mm] The coupling is fully active from this slave position.

SyncMode

INT

Currently not supported.

MasterStartDistance

LREAL

[mm] This is the master distance over which the coupling is established.

Acceleration

LREAL

[mm/s2] The acceleration permitted for the synchronization in actual value units of the axis per square second.

Deceleration

LREAL

[mm/s2] The deceleration permitted for the synchronization in actual value units of the axis per square second.

Jerk

LREAL

[mm/s3] The jerk to be applied.

BufferMode

MC_BufferMode_BkPlcMc

reserved. This input is provided in preparation for a future build. It should currently either not be assigned or assigned the constant Aborting_BkPlcMc. (from V3.0.8)

MC_GearInPos_BkPlcMc (from V3.0.33) 3: Inputs/outputs

VAR_INOUT
     Master:       Axis_Ref_BkPlcMc;
     Slave:        Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

Master

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

Slave

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

MC_GearInPos_BkPlcMc (from V3.0.33) 4: Outputs

VAR_OUTPUT
     StartSync:        BOOL;
     InSync:           BOOL;
     Busy:             BOOL;
     Active:           BOOL;
     CommandAborted:   BOOL;
     Error:            BOOL;
     ErrorID:          UDINT;
END_VAR

Name

Type

Description

StartSync

BOOL

Indicates the transition phase between idle state and fully active coupling.

InSync

BOOL

This indicates the first successful synchronization of the axes. The signal the remains active, even if the synchronization subsequently fails temporarily or permanently.

Busy

BOOL

Indicates that a command is being processed.

Active

BOOL

Indicates that a command is being processed.

CommandAborted

BOOL

This indicates abortion of the coupling.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Behavior of the function block

On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:

If these checks could be performed without problem, the coupling is initiated. The slave axis initially continues to be in state McState_Standstill. Only when the master axis reaches the start of the synchronization distance for the first time does the slave axis report McState_Synchronizedmotion and indicate StartSync, and the function block starts monitoring the coupling. As soon as the axis reaches the end the synchronization distance for the first time, the slave axis indicates InSync. Should the master axis later pass the start of the synchronization distance backwards, the coupling is not released.

If an error code occurs in the motion generator while the coupling is active, the system responds with Error and ErrorID:=motion algorithm error code.

A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the coupling is still active, the existing coupling remains unaffected and active.

An example is available under #103.

MC_GearInPos_BkPlcMc (from V3.0.33) 5:

The function block does not support the functionality of TwinCAT NC.

MC_GearInPos_BkPlcMc (from V3.0.33) 6:

The output Active is currently identical to the output Busy.