MC_AxisSetDefaults
Description
MC_AxisSetDefaults sets the default kinematic variables for MC_MoveDirAbs and MC_MoveDirRel. These variables are only used with the MC_MoveDir function blocks.
Each axis within the group must have the default kinematic parameters of Velocity, Acceleration, Deceleration, and JerkIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time set to values greater than zero. A non-zero Jerk value will perform an S-Curve rather than a trapezoidal move. Each axis within the group must have these values set before a direct move can be started.
-
- Jerk with a non-zero value is currently not supported for coordinated motion. Jerk parameters are currently ignored.
The function block returns an error if the group state is not GroupStandby or GroupDisabled.
Figure 7-178: MC_AxisSetDefaults
-
- This function block starts a motion-related action and therefore stores data for calculations and error checking. Please see Calling Function Blocks Multiple Times in the Same Cycle if you are using a dual-core controller.
Related Functions
MC_MoveDirAbs, MC_MoveDirRel, MC_ErrorDescription
Coordinated Motion, the top-level topic for Coordinated Motion.
See also:
Arguments
Input
Execute | Description | On the rising edgeA rising edge is the transition of a digital signal from low to high. It is also called positive edge, request to set the default kinematic parameters. |
Data type | BOOL | |
Range | 0, 1 | |
Unit | N/A | |
Default | — | |
Axis | Description | Reference to the axis which will have its default kinematic parameters set. |
Data type | AXIS_REF | |
Range | — | |
Unit | N/A | |
Default | — | |
Velocity | Description | The default velocity. |
Data type | LREAL | |
Range |
0 < Velocity < ( 20 * Acceleration ) and 0 < Velocity < ( 20 * Deceleration) See Limitations on Acceleration and Jerk for more information. |
|
Unit | User units per second | |
Default | — | |
Acceleration | Description |
Trapezoidal: Acceleration rate see "Selection of Acceleration and Jerk Parameters for Function Blocks" |
Data type | LREAL | |
Range |
( Velocity / 20 ) < Acceleration < ( 2 * Jerk ) See Limitations on Acceleration and Jerk for more information. |
|
Unit | User units per second2 | |
Default | — | |
Deceleration | Description |
Trapezoidal: Deceleration rate |
Data type | LREAL | |
Range | ( Velocity / 20 ) < Deceleration < ( 2 * Jerk ) | |
Unit | User unit per second2 | |
Default | — | |
Jerk | Description |
Trapezoidal: 0
see "Selection of Acceleration and Jerk Parameters for Function Blocks" |
Data type | LREAL | |
Range | ( Velocity / 20 ) < Acceleration < ( 2 * Jerk ) and ( Velocity / 20 ) < Deceleration < ( 2 * Jerk ) | |
Unit | User units per second3 | |
Default | — |
Output
Done | Description |
If True, then the command completed successfully. |
Data type | BOOL | |
Error | Description | If True, then an error has occurred |
Data type | BOOL | |
ErrorID | Description | Indicates the error if Error output is set to TRUE. See the table in PLCopen Function Block ErrorID Output. |
Data type | DINT |
Example
Structured Text
(* ST"Structured text" A high-level language that is block structured and syntactically resembles Pascal MC_AxisSetDefaults Example *) default_velocity := 50.0; default_acceleration := 250.0; default_deceleration := 300.0; default_jerk := 1000.0; Inst_MC_AxisSetDefaults ( TRUE, CoordAxis1_ref, default_velocity, default_acceleration, default_deceleration, default_jerk);
Instruction List
BEGIN_IL"Instruction list" This is a low-level language and resembles assembly CAL Inst_MC_AxisSetDefaults( TRUE, CoordAxis1_Ref, default_velocity, default_acceleration, default_deceleration, default_jerk) END_IL
Function Block Diagram
Ladder Diagram