MC_InitAxis
Description
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_InitAxis
Arguments
See Function Blocks - General Rules for more information about how inputs and outputs work.
Input
En |
Description |
Request to initialize a PLCopen axis |
Data type |
BOOL |
|
Range |
0, 1 |
|
Unit |
N/A |
|
Default |
— |
|
AxisNumber |
Description |
Axis number |
Data type |
UINT |
|
Range |
[1,256] |
|
Unit |
none |
|
Default |
— |
|
VelocityLimit |
Description |
Reserved for future use |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit/sec |
|
Default |
— |
|
LowerLimit |
Description |
Reserved for future use |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit |
|
Default |
— |
|
UpperLimit |
Description |
Reserved for future use |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit |
|
Default |
— |
|
LimitControl |
Description |
Reserved for future use |
Data type |
UINT |
|
Range |
[0,2] |
|
Unit |
N/A |
|
Default |
— |
|
PosErrorLimit |
Description |
Position error limit – when the Position Error (command position – actual position) exceeds this value, an E-stop is generated |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit |
|
Default |
— |
|
InPositionBand |
Description |
In-position bandwidth 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” |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit |
|
Default |
— |
Output
OK |
Description |
Indicates the initialization is complete. See Function - General Rules for more information. |
Data type |
BOOL |
Example
Structured Text
(* MC_InitAxis ST "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);
Function Block Diagram
Ladder Diagram