MC_AxisSetDefaults
Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. - Sets the default kinematic parameters for an axis.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
0, 1 |
N/A |
No default |
On the rising edge A 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. |
Axis |
AXIS_REF |
No range |
N/A |
No default |
Reference to the axis which has its default kinematic parameters set. |
Velocity |
LREAL |
0 < Velocity < (20 * Acceleration) and |
User unit/sec |
No default |
The default velocity. See Limitations on Acceleration and Jerk for more information. |
Acceleration |
LREAL |
(Velocity / 20) < Acceleration < (2 * Jerk) |
User unit/sec2 |
No default |
Trapezoidal: Acceleration rate. S-curve: Maximum acceleration.
|
Deceleration |
LREAL |
(Velocity / 20) < Deceleration < (2 * Jerk) |
User unit/sec2 |
No default |
Trapezoidal: Deceleration rate. S-curve: Unused. See S-curve and Trapezoidal Acceleration / Deceleration for more information. |
Jerk |
LREAL |
(Velocity / 20) < Acceleration < (2 * Jerk) and (Velocity / 20) < Deceleration < (2 * Jerk) |
User unit/sec3 |
No default |
Trapezoidal: 0 (zero). S-curve: Constant jerk In physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time.
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Done |
BOOL |
|
|
If TRUE, the command completed successfully. |
Error |
BOOL |
|
|
If TRUE, an error has occurred. |
ErrorID |
DINT |
|
|
Indicates the error if Error output is TRUE. See the table in PLCopen Function Block ErrorIDs. |
Remarks
-
- This function block starts a motion-related action and stores data for calculations and error checking.
See Call Function Blocks Multiple Times in the Same Cycle if using a dual-core controller.
- See Coordinated Motion, the top-level topic for Coordinated Motion.
- The MC_AxisSetDefaults function block sets the default kinematic variables for MC_MoveDirAbs and MC_MoveDirRel.
- These variables are only used with the MC_MoveDir function blocks.
- Each axis in the group must have the default kinematic parameters of Velocity, Acceleration, Deceleration, and Jerk set to values greater than 0 (zero).
- A non-zero Jerk value performs an S-Curve instead of a trapezoidal move.
- Each axis in the group must have these values set before a direct move can be started.
- The function block returns an error if the group state is not GroupStandby or GroupDisabled.
-
- Jerk with a non-zero value is currently not supported for coordinated motion.
Jerk parameters are currently ignored.
Figure 6-146: MC_AxisSetDefaults
FBD Language Example
FFLD Language Example
IL Language Example
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
ST Language Example
(* 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);
See Also