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 The transition of a digital signal from low to high. AKA: 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. |
LREAL |
User unit/sec |
No default |
The default velocity. |
||
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. |
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.
|
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 |
DINT |
-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.
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 The orientation components of a vector in space. 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 ignored.
Figure 1: 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