MC_CreatePLCAxis

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

Inputs

Input

Data Type

Range

Unit

Default

Description

En

BOOL

0, 1

N/A

No default

Requests to create a PLCopen axis.

AxisName

STRING

No range

N/A

No default

Axis name.

BusInterface

STRING

No range

N/A

No default

Bus interface identifier:

BusAddress

DINT

Bus dependent

N/A

No default

Address of 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. on the bus.

AxisNumber

UINT

1, 256

N/A

No default

Axis number.

AxisType

USINT

0, 1

N/A

No default

USINT

Type

Description

0

MC_AXIS_TYPE_SERVO_STEPPER

A Servo or Stepper axis can be mapped to a physical or simulated drive.

Either a servo or stepper drive is supported.

1

MC_AXIS_TYPE_DIGITIZING

A digital positionClosed Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. input from a drive or other device.

It is useful as an input for gearing, camming, etc.

2

MC_AXIS_TYPE_VIRTUAL

A virtual axis cannot be mapped to a physical or simulated drive.

It is useful for generating motion trajectoryClosed Time dependent description of the path the TCP of an axes group moves along. Additional to the geometrical description of the space curve, time dependent state variables like velocity, acceleration, jerk, forces etc. are specified. as an input for gearing, camming, etc.

DriveAxisNumber

UINT

1, 256

N/A

No default

This one-based number specifies the axis on the drive.

For a single-axis drive this number should be 1.

UserUnits

DINT

1, 2147483647

User units

No default

User unit portion of the user unit/feedback unit ratio.

FeedbackUnits

DINT

1, 2147483647

Feedback units

No default

Feedback unit portion of the user unit/feedback unit ratio.

Rollover

LREAL

0, 4294967296

User units

No default

Rollover position.

0 (zero) = no rollover.

UpdateRate

UINT

3, 9

N/A

No default

Servo update rate.

  • (0, 1, and 2 are reserved for future enhancements)
  • 3 = 125 μsec
  • 4 = 250 μsec
  • 5 = 500 μsec
  • 6 = 1 msec
  • 7 = 2 msec
  • 8 = 4 msec
  • 9 = 8 msec

Outputs

Output

Data Type

Range

Unit

Description

OK

BOOL

No range

N/A

Indicates the axis has been created.

Figure 1: MC_CreatePLCAxis

Remarks

  • See Function Blocks - General Rules about how inputs and outputs work.
  • A call to this function is automatically generated when the application is compiled, based on the data entered in the PLCopen Axis Data dialog.
  • MC_CreateAxis must be called between MLMotionInit and MLMotionStart.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_CreatePLCAxis STClosed Structured text - A high-level language that is block structured and syntactically resembles Pascal. Example *)
AxisName1    := 'PLCOpenAxis1';
BusName1     := 'EtherCATDriver';
BusAddress1    := 1001;
AxisNumber1    := 1;
AxisType1     := MC_AXIS_TYPE_SERVO_STEPPER;
DriveAxisNumber1  := 1;
UserUnits1    := 360;
FeedbackUnits1    := 1048576;
Rollover1    := 0;
UpdateRate1     := 3;
MC_CreateAxis(AxisName1, BusName1, BusAddress1, AxisNumber1, AxisType1, DriveAxisNumber1, UserUnits1, FeedbackUnits1, Rollover1, UpdateRate1);