MC_CreatePLCAxis
Description
-
-
MC_CreateAxis must be called between MLMotionInit and MLMotionStart.
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” = EtherCAT ***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 |
|
|||||||||
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 ST "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