MC_AxisSetDefaults
Function Block - Sets the default kinematic parameters for an axis.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
FALSE, TRUE |
N/A |
No default |
On the rising 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. |
Acceleration |
LREAL |
Jerk > (Acceleration / 2) |
User unit/sec2 |
No default |
Trapezoidal: Acceleration rate. S-curve: Maximum acceleration. |
Deceleration |
LREAL |
Jerk > (Deceleration / 2) |
User unit/sec2 |
No default |
Trapezoidal: Deceleration rate. S-curve: Unused. |
Jerk |
LREAL |
Jerk > (Acceleration / 2) and Jerk > (Deceleration / 2) |
User unit/sec3 |
No default |
Trapezoidal: 0 (zero). S-curve: Constant jerk.
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Done |
BOOL |
FALSE, TRUE |
N/A |
If TRUE, the command completed successfully. |
Error |
BOOL |
FALSE, TRUE |
N/A |
If TRUE, an error has occurred. |
ErrorID |
INT |
-2147483648 to 2147483647 |
N/A |
Indicates the error if Error output is TRUE. |
Remarks
-
- This function block starts a motion-related action and stores data for calculations and error checking.
If using a dual-core controller, see Call Function Blocks Multiple Times in the Same Cycle.
- 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, and Deceleration set to values greater than 0 (zero).
- 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 not supported by MC_MoveDirAbs or MC_MoveDirRel.
Jerk parameters are ignored.
Figure 1: MC_AxisSetDefaults
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
(* ST 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