MLCNVInit
Description
Initializes a converter Pipe Block. FunctionA 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 a Convertor Block is added to the Pipe Network, with the input mode (position or speed) entered in the Pipe Blocks Properties screen. The Converter block changes the incoming flow of speed or position values to continuous position output with no periodicity.
-
-
Converter objects are normally created in the Pipe Network using the graphical engine. Then you do not have to add MLCNVInit 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 | — | |
Mode | Description | 1 for Position mode, 2 for Speed mode. Determines the type of input to the Converter Object. |
Data type | DINT | |
Range | [1, 2] | |
Unit | N/A | |
Default | — |
Output
Default (.Q) |
Description | Returns TRUE if the Convertor Pipe Block is initialized See more details here. |
Data type | BOOL | |
Unit | N/A |
Return Type
BOOL
Related Functions
Example
Structured Text
// Initiate a created convertor block named “CNV1”
CNV1 := MLBlkCreate( 'CNV1', 'CONVERTOR' );
MLCNVInit( CNV1, 1 );
Ladder Diagram
Function Block Diagram