Motion Library - Integrator

Name

Description

Return type

MLIntInit

Initializes an integrator object

BOOL

MLIntWriteOutVal

Sets the output value of an integrator object

BOOL

 

FunctionMLIntInitPipe Network motion icon

Description

Initializes an integrator object. 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 is automatically called if an Integrator Block is added to the Pipe Network, with user-defined settings entered in the Pipe Blocks Properties screen.

Integrator object can operate in Modulo or not modulo mode. While in Modulo mode, the output values are adapted according to the entered ModuloPosition value.

MLIntInit

Figure 8-98: MLIntInit


  • Integrator objects are normally created in the Pipe Network using the graphical engine. Then you do not have to add MLIntInit function blocks to their programs. Parameters are entered directly in pop-up windows, and the code is then automatically added to the current project.

Arguments

Input

BlockID

Description

ID number of a created Pipe Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

N/A

 

Default

ModuloPosition

Description

Output ModuloPosition of Integrator object

 

Data type

LREAL

 

Range

 

Unit

User unit

 

Default

360.0

     

Modulo

Description

TRUE when mode is modulo. Modulo mode adapts the output values according to the ModuloPosition (modulo)

 

Data type

BOOL

 

Range

0, 1

 

Unit

N/A

 

Default

TRUE

Output

Default (.Q)

Description

Returns TRUE if the Integrator object is initialized

See more details here.

 

Data type

BOOL

 

Unit

N/A

Return Type

BOOL

Related Functions

MLBlkCreate

MLIntWriteOutVal

Example

Structured Text

//Initiate an Integrator Pipe Block named “MyIntegrator” with a Modulo of 360
MLIntInit(MyIntegrator, 360.0, true );

Ladder Diagram

MLIntInit: LD example

 

Function Block Diagram

MLIntInit: FBD example

Go back to the top of the page [Top]

FunctionMLIntWriteOutValPipe Network motion icon

Description

Sets the output value of an integrator object. This function can force the output to an entered value not dependent on the input value from the Pipe Network.


  • Output value can jump to another value instantly after the function is executed if the Pipe Network is running.

Arguments

Input

BlockID

Description

ID number of an initiated Integrator object

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

N/A

 

Default

Value

Description

Desired new output value of the selected Integrator object

  Data type LREAL
  Range
  Unit User unit
  Default

Output

Default (.Q)

Description

Returns TRUE if the output value if the Integrator object is changed

See more details here.

 

Data type

BOOL

 

Unit

N/A

Return Type

BOOL

Related Functions

MLIntInit

Example

Structured Text

 

//change the output value of an integrator object to 35

MLIntWriteOutVal ( PipeNetwork.MyIntegrator, 35.0 );

 

Ladder Diagram

MLIntWriteOutVal: LD example

 

Function Block Diagram

MLIntWriteOutVal: FBD example

Go back to the top of the page [Top]