FunctionMC_CreatePLCAxisPLCopen motion icon

Description

This function creates a PLCopenClosedA vendor -and product- independent worldwide association active in Industrial Control and aiming at standardizing PLC file formats based on XML Axis. A call to this function is automatically generated when the application is compiled, based on the data entered in the PLCopen Axis Data dialog.

Figure 7-121: MC_CreatePLCAxis

Arguments

For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules

Input

En Description Requests to create a PLCopen axis
  Data type BOOL
  Range 0, 1
  Unit N/A
  Default
AxisName Description Axis name
  Data type STRING
  Range
  Unit N/A
  Default
BusInterface Description Bus interface identifier:
“EtherCATDriver” = EtherCATClosed***EtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs interface
“MSBusDriver” = KAS Simulator interface
  Data type STRING
  Range
  Unit N/A
  Default
BusAddress Description Address of the drive on the bus
  Data type DINT
  Range bus dependent
  Unit N/A
  Default
AxisNumber Description Axis number
  Data type UINT
  Range [1,256]
  Unit N/A
  Default
AxisType 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 position 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 trajectory as an input for gearing, camming, etc.
  Data type USINT
  Range [0,1]
  Unit N/A
  Default
DriveAxisNumber Description This one-based number specifies the axis on the drive.
For a single-axis drive this number should be 1.
  Data type UINT
  Range [1,256]
  Unit N/A
  Default
UserUnits Description User unit portion of the user unit/feedback unit ratio
  Data type DINT
  Range [1, 2147483647]
  Unit User unit
  Default
FeedbackUnits Description Feedback unit portion of the user unit/feedback unit ratio
  Data type DINT
  Range [1, 2147483647]
  Unit Feedback units
  Default
Rollover Description Rollover position (0 = no rollover)
  Data type LREAL
  Range [0, 4294967296]
  Unit User unit
  Default
UpdateRate Description 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
  Data type UINT
  Range [3,9]
  Unit N/A
  Default

Output

OK Description

Indicates the axis has been created

See more details here.

  Data type BOOL

Example

Structured Text

(* 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);

Function Block Diagram

Ladder Diagram

Go back to the top of the page [Top]