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

FunctionMLSyncInitPipe Network motion icon

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

Default (.Q)

Description

Function BlockClosedA function block groups an algorithm and a set of private data. It has inputs and outputs. Execute Successfully

See more details here.

 

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

Go back to the top of the page [Top]

FunctionMLSyncReadDeltaSPipe Network motion icon

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 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 Get Output Phasing after MLSyncStop).

Get Output Phasing after MLSyncStart

Figure 8-109: Get Output Phasing after MLSyncStart

Get Output Phasing after MLSyncStop

Figure 8-110: 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

Go back to the top of the page [Top]

FunctionMLSyncStartPipe Network motion icon

Description

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

MLSyncStart

Figure 8-111: MLSyncStart

Arguments

Input

BLockID

Description

Name of the Pipe Network Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

n/a

 

Default

Output

Default (.Q)

Description

FunctionClosedA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Block Execute Successfully

See more details here.

 

Data type

BOOL

 

Unit

n/a

Example

Structured Text

 

MLSyncStart( PipeNetwork.SYN );

 

Ladder Diagram

MLSyncStart: LD example

 

Function Block Diagram

MLSyncStart: FBD example

Go back to the top of the page [Top]

FunctionMLSyncStopPipe Network motion icon

Description

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

MLSyncStop

Figure 8-112: MLSyncStop

Arguments

Input

Position

Description

Motion Stop Position

 

Data type

LREAL

 

Range

 

Unit

User unit

 

Default

Output

Default (.Q)

Description

Function Block Execute Successfully

See more details here.

 

Data type

BOOL

 

Unit

n/a

Example

Structured Text

 

MLSyncStop( PipeNetwork.SYN , 120 );

 

Ladder Diagram

MLSyncStop: LD example

 

Function Block Diagram

MLSyncStop: FBD example

Go back to the top of the page [Top]

FunctionMLSyncWriteDeltaS

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

Figure 8-113: Set output phasing after MLSyncStart

Set output phasing after MLSyncStop

Figure 8-114: 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

Default (.Q)

Description

Function Block Execute Successfully

See more details here.

 

Data type

BOOL

 

Unit

n/a

Example

Structured Text

 

MLSyncWriteDeltaS( PipeNetwork.SYN, 45 );

 

Ladder Diagram

MLSyncWriteDeltaS: LD example

 

Function Block Diagram

MLSyncWriteDeltaS: FBD example

Go back to the top of the page [Top]

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

Figure 8-115: Synchronizer Functions Usage

Go back to the top of the page [Top]