MLAxisDriveNumber

Pipe Network motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Returns the driveClosed In electrical engineering, a drive is an electronic device to provide power to a motor or servo. Control device for regulating the speed, torque and position of a motor. A unit controlling a motor using the current and timing in its coils. number associated with the axis or -1 if the functionClosed A 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 failed.

Inputs

Input

Data Type

Range

Unit

Default

Description

AxisID

DINT

No range

N/A

No default

ID Name of the Axis block.

Outputs

Output

Data Type

Range

Unit

Description

OK

BOOL

FALSE, TRUE

N/A

Returns TRUE when the function successfully executes.

DriveAxisNumber

INT

-1 or 1,32767

N/A

Either:

  • The drive number associated with the axis.
  • -1 if the function block failed.

Remarks

Figure 1: ML_AxisDriveNumber

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

Inst_MLAxisDriveNumber( AxisID)
IF Inst_MLAxisDriveNumber.OK Then
    Axis1DriveNumber     := Inst_MLAxisDriveNumber.DriveAxisNumber
End_IF;