ssMotion Library - Integrator
-
-
For a description of the this pipe block and its parameters, see sPipe Blocks Description
Name |
Description |
Return type |
Initializes an integrator object |
BOOL |
|
Sets the output value of an integrator object |
BOOL |
MLIntInit
Description
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.
-
-
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
Example
Structured Text
//Initiate an Integrator Pipe Block named “MyIntegrator” with a Modulo of 360
MLIntInit(MyIntegrator, 360.0, true );
Ladder Diagram
Function Block Diagram
MLIntWriteOutVal
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.
-
-
This function or function block returns cached data. See Programming a Dual Core Controller for more information.
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
Example
Structured Text
//change the output value of an integrator object to 35 MLIntWriteOutVal ( PipeNetwork.MyIntegrator, 35.0 );
|
Ladder Diagram
Function Block Diagram