MC_InitAxis
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
En |
BOOL |
FALSE, TRUE |
N/A |
No default |
When TRUE, requests to create a PLCopen axis. |
AxisNumber |
UINT |
1 to 256 |
N/A |
No default |
Axis number. |
VelocityLimit |
LREAL |
No range |
User unit/sec |
No default |
Reserved. |
LowerLimit |
LREAL |
No range |
User units |
No default |
Reserved. |
UpperLimit |
LREAL |
No range |
User units |
No default |
Reserved. |
LimitControl |
UINT |
0 to 2 |
N/A |
No default |
Reserved. |
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 bandwidth: 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 |
FALSE, TRUE |
N/A |
Indicates the initialization is complete. See Function - General Rules. |
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.
Figure 1: MC_InitAxis
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
(* MC_InitAxis ST 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);