MLAxisInit

Pipe Network motion icon

 Function - Initializes an axis object.

Inputs

Input

Data Type

Range

Unit

Default

Description

Acceleration

LREAL

Acceleration > 0 (zero)

User unit/sec2

No default

AxisID

DINT

No range

N/A

No default

ID of the Axis block.

Deceleration

LREAL

Deceleration > 0 (zero)

User unit/sec2

No default

FeedbackUnitsPerRev

DINT

No range

User units

No default

  • Number of units associated to the Drive for one revolution of the physical motor.
  • This is only available when using an imported ENI file.
  • This parameter is only configurable through MLAxisInit.

InitialPosition

LREAL

No range

User units

No default

Initial position value expressed in user logical units.

Modulo

BOOL

FALSE, TRUE

N/A

No default

The available modes are Modulo (TRUE) and No Modulo (FALSE).

ModuloPosition

LREAL

No range

User units

No default

  • The value of the period of a cyclic system expressed in User units.
  • The parameter is defined to correctly manage the periodicity (modulo) of the input values.

Speed / Travel Speed

LREAL

No range

User units

No default

UserUnitsPerRev /
User Units per Revolution

LREAL

No range

User units

No default

To divide the current axis into graduations adapted to your project, you must define the unit that is equivalent to one revolution of the physical motor (e.g., 3600 means that you define the user unit to be tenth of a degree).

You can rely on expressions to define values.

Example with Expressions

Gear factor 1:3 and 1000.0 User Units per one gear shaft revolution.

// user units per revolution calculation example
#define DEF_BandGear 3.0 // gearbox ratio
#define DEF_BandUnit 1000.0 // user units for 1 mechanical turn
#define DEF_BandUUperRev DEF_BandUnit/DEF_BandGear

Define Value with Expressions

Figure 3: Define Value with Expressions

See Use the Defines List.

Outputs

Output

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

Remarks

  • Returns TRUE if the function succeeded.
  • The axis object can be mapped to servo or stepper drives.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

MLAxisInit( PipeNetwork.Axis1, 360.0, 360.0, SHL(1,20), 500.0, 100000.0, 100000.0, 0.0, true ) ;