MLCNVInit

 Function - Initializes a converter Pipe Block.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

1 to 1024

N/A

No default

ID number of a created Pipe Block.

Mode

DINT

1 to 2

N/A

No default

Determines the type of input to the Converter Object.

The available modes are:

Position

  • 1 is for Position mode.
  • The values drive the position of the motor.
    • At pipe activation, the current (axis) position is set to the first value given by the pipe by moving the motor.
    • Speed and acceleration are derivatives of position.
    • The torque is set according to the regulator needs.
    • Units are the axis physical units.

Speed

  • 2 is for Speed mode.
  • The values drive the speed of the motor.
    • At pipe activation, the current position is not affected.
    • Position is the integral of speed and acceleration is the derivative of speed.
    • The torque is set according to the regulator needs.
    • Units are the axis physical units per second.

Outputs

Output

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

Remarks

  • MLCNVInit 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.
    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.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

// Initiate a created convertor block named “CNV1”
CNV1 := MLBlkCreate( 'CNV1', 'CONVERTOR' );
MLCNVInit( CNV1, 1 );

See Also