Motion Library - Synchronizer

Name

Description

Return type

MLSyncInit

Initializes a synchronizer Pipe Block

BOOL

MLSyncReadDeltaS

Gets the output phasing value of a synchronizer block

None

MLSyncStart

Starts a synchronization of a synchronizer Pipe Block

BOOL

MLSyncStop

De-synchronizes a synchronizer Pipe Block

BOOL

MLSyncWriteDeltaS

Sets the output phasing value of a synchronizer block

BOOL

MLSyncInit

Description

Initializes a synchronizer Pipe Block. Returns TRUE if the function succeeded.

This FB is automatically created in the compiled code of a Pipe Network.

This function block is part of the MLPN_CREATE_OBJECT to initialize the Pipe Network. It is called at the beginning of an application program with the function call:

PipeNetwork(MLPN_CREATE_OBJECTS);

Arguments

Input

BLockID

Description

Name of the Pipe Network Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

n/a

 

Default

ModuloPosition

Description

The modulo distance

 

Data type

LREAL

 

Range

 

Unit

User unit

 

Default

CurveType

Description

The curve type to the motion when starting and stopping synchronization. Option are Parabolic or Polynomial

 

Data type

DINT

 

Range

[1 , 2] (1 = Parabolic, 2 = Polynomial)

 

Unit

n/a

 

Default

DeltaS

Description

The Distance to get in or out of synchronization. This parameter is used in the  MLSyncStart and MLSyncStop FunctionBlocks

 

Data type

LREAL

 

Range

 

Unit

User unit

 

Default

Output

Description

Function Block Execute Successfully

 

Data type

BOOL

 

Unit

n/a

Related Functions

MLSyncWriteDeltaS

Example

Structured Text

//Initialize  a synchronizer  Pipe Block named “ SYN” with a modulo of 360, Curve Type of Parabolic, and a distance (DeltaS) of 30 to get in and out of synchronization
MLSyncInit( PipeNetwork.SYN, 360, 1, 30 );

Ladder Diagram

MLSyncInit: LD example

 

Function Block Diagram

MLSyncInit: FBD example

MLSyncReadDeltaS

Description

Gets the output phasing value of a synchronizer block. Output phasing is the distance or the slope the output takes to synchronize with the input when MLSyncStart Block is executed (see figure: "Get output phasing after MLSyncStart"). It also affects the distance or the slope the output takes to desynchronize with the input and come to a stop when MLSyncStop Block is executed (see figure: "Get output phasing after MLSyncStop").

Get Output Phasing after MLSyncStart

Get Output Phasing after MLSyncStart

Get Output Phasing after MLSyncStop

Get Output Phasing after MLSyncStop

Arguments

Input

BlockID

Description

Name of the Pipe Network Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

n/a

 

Default

Output

DeltaS

Description

Present Delta Slope value

 

Data type

LREAL

 

Unit

User unit

Related Functions

MLSyncWriteDeltaS

Example

Structured Text

 

ActScope := MLSyncReadDeltaS( PipeNetwork.SYN );

 

Ladder Diagram

MLSyncReadDeltaS: LD example

 

Function Block Diagram

MLSyncReadDeltaS: FBD example

MLSyncStart

Description

Start a synchronization of a synchronizer Pipe Block. Returns TRUE if the function succeeded.

MLSyncStart

MLSyncStart

Arguments

Input

BLockID

Description

Name of the Pipe Network Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

n/a

 

Default

Output

Description

Function Block Execute Successfully

 

Data type

BOOL

 

Unit

n/a

Example

Structured Text

 

MLSyncStart( PipeNetwork.SYN );

 

Ladder Diagram

MLSyncStart: LD example

 

Function Block Diagram

MLSyncStart: FBD example

MLSyncStop

Description

De-synchronizes a synchronizer Pipe Block. Returns TRUE if the function succeeded.

MLSyncStop

MLSyncStop

Arguments

Input

Position

Description

Motion Stop Position

 

Data type

LREAL

 

Range

 

Unit

User unit

 

Default

Output

Description

Function Block Execute Successfully

 

Data type

BOOL

 

Unit

n/a

Example

Structured Text

 

MLSyncStop( PipeNetwork.SYN , 120 );

 

Ladder Diagram

MLSyncStop: LD example

 

Function Block Diagram

MLSyncStop: FBD example

MLSyncWriteDeltaS

Description

Set the output phasing value of a synchronizer block. Returns TRUE if the function succeeded. Output phasing is the distance or the slope the output takes to synchronize with the input when MLSyncStart Block is executed. It also affects the distance or the slope the output takes to desynchronize with the input and come to a stop when MLSyncStop Block is executed.

Set output phasing after MLSyncStart

Set output phasing after MLSyncStart

Set output phasing after MLSyncStop

Set output phasing after MLSyncStop

Arguments

Input

BLockID

Description

Name of the Pipe Network Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

n/a

 

Default

DeltaS

Description

Slope to be used during Start and stop of Synchronization

 

Data type

LREAL

 

Range

 

Unit

User unit

 

Default

Output

Description

Function Block Execute Successfully

 

Data type

BOOL

 

Unit

n/a

Example

Structured Text

 

MLSyncWriteDeltaS( PipeNetwork.SYN, 45 );

 

Ladder Diagram

MLSyncWriteDeltaS: LD example

 

Function Block Diagram

MLSyncWriteDeltaS: FBD example

Usage example of Synchronizer Functions

When you call the MLSyncStop function, the output value is adapted according to the specified Stop-Position (point B).

The OUTPUT_PHASING parameter is used to define point A, where the flow follows a curve in order to smooth the output value.

When you call the MLSyncStart function, the output value is adapted to catch up with the input value.

The OUTPUT_PHASING parameter is also used to define a curve in order to smooth the output value.

Synchronizer Functions Usage

Synchronizer Functions Usage