MC_InitAxis

PLCopen motion icon

 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. - Initializes a PLCopenClosed A vendor -and product- independent worldwide association active in Industrial Control and aiming at standardizing PLC file formats based on XML Axis' data.

Inputs

Input

Data Type

Range

Unit

Default

Description

En

BOOL

0, 1

N/A

No default

Requests to create a PLCopen axis.

AxisNumber

UINT

1, 256

N/A

No default

Axis number.

VelocityLimit

LREAL

No range

User unit/sec

No default

Reserved for future use.

LowerLimit

LREAL

No range

User units

No default

Reserved for future use.

UpperLimit

LREAL

No range

User units

No default

Reserved for future use.

LimitControl

UINT

0, 2

N/A

No default

Reserved for future use.

PosErrorLimit

LREAL

No range

User units

No default

Position error limit:

When the Position Error (command position – actual position) exceeds this value, an E-stop is generated.

InPositionBand

LREAL

No range

User units

No default

In-position bandwidthClosed In computer networking, bandwidth often refers to a data rate measured in bits/s, for example, network throughput. The reason for the connection of data rate with the term bandwidth is that the limit to the data rate of a physical communication link is related to its bandwidth in hertz:

When the axis actual position is within this distance from its programmed endpoint, the axis is considered in position.

Outputs

Output

Data Type

Range

Unit

Description

OK

BOOL

No range

N/A

Indicates the initialization is complete.

See Pipe Network - General Rules for more information.

Remarks

  • A call to this function is automatically generated when the application is compiled.
  • This is based on the data entered in the PLCopen Axis Data dialog.

MC_InitAxis

Figure 6-206: MC_InitAxis

FBD Language Example

FFLD Language Example

MC_InitAxis: LD example

IL Language Example

Not available.

ST Language Example

(* MC_InitAxis STClosed "Structured text"
A high-level language that is block structured and syntactically resembles Pascal example *)
AxisNumber1 := 1;
VelocityLimit1 := 10000; (*User unit/second*)
LowerPosLimit1 := 0;
UpperPosLimit1 := 0;
LimitControl1 := 0; (* Ignore lower and upper pos limit*)
PosErrorLimit1 := 10; (*User unit*)
InPosBand1 := 0;
MC_InitAxis(AxisNumber1, VelocityLimit1, LowerPosLimit1, UpperPosLimit1, LimitControl1, PosErrorLimit1, InPosBand1);