MC-Transformation OB
Description
You program the user transformation of the Cartesian coordinates and the axis-specific setpoints for the user-defined kinematics in the organization block MC‑Transformation [OB98]. This programming includes the transformation of the positions and the dynamic values (velocity, acceleration, jerk).
When you add the MC‑Transformation [OB98] in the TIA Portal, the data block "TransformationParameter" is automatically created under "Program blocks > System blocks > Program resources". In the properties of the organization block, the MC‑Transformation [OB98] indicates the number of the data block "TransformationParameter" under "General > Transformation".
In the user program, supply the input parameters of the MC‑Transformation [OB98] with the required start information. You write the axis-specific parameters or the Cartesian parameters in the "TransformationParameter" data block. The MC‑Transformation [OB98] is called with this start information in the execution system of the CPU.
提示 Only one MC‑Transformation [OB98] per CPUYou program all required user transformations in an organization block MC‑Transformation [OB98]. If you require multiple transformations or multiple instances of a transformation, you need to identify the transformations or the instances in your user program. |
Block call and priority
The MC‑Transformation [OB98] is called according to the configured priority in the execution system of the CPU.
You configure the priority of the MC‑Transformation [OB98] in the properties of the organization block under "General > Attributes > Priority". For the priority you can set values from 17 to 25 (default setting 25):
The priority of MC‑Transformation [OB98] must be at least one level lower than the priority of MC‑Servo [OB91].
The priority of MC‑Transformation [OB98] must be at least one level higher than the priority of MC‑Interpolator [OB92].
Parameter
The following table shows the parameters of the "MC‑Transformation [OB98]":
Parameter | Declaration | Data type | Default value | Description | |
---|---|---|---|---|---|
KinematicsObject | INPUT | DB_ANY | - | Kinematics technology object for which the MC‑Transformation [OB98] calculates the transformation when called. | |
ExecutionContext | INPUT | DINT | - | Processing context of the MC‑Transformation [OB98] | |
0 | MOTION_EXECUTION Calculation of the axis setpoints in the motion execution in the interpolator. The calculated values are necessary for the current motion control. Torque precontrol values can be calculated and preset. | ||||
1 | NON_MOTION_EXECUTION Calculation of axis setpoints from IPO task and other OBs are possible. The transformation is necessary for the motion planning. | ||||
TransformationType | INPUT | DINT | - | Calculation called for | |
0 | Forward transformation Calculation of the Cartesian parameters from the axis positions | ||||
1 | Inverse transformation Calculation of the axis-specific parameters from the Cartesian parameters | ||||
TransformationParameters | InOut | VARIANT | - | Pointer to the data block "TransformationParameter" | |
FunctionResult | OUTPUT | DINT | - | Return value of the MC‑Transformation [OB98] to the kinematics technology object | |
0 | Calculation performed and parameters output | ||||
< 0 | Error during calculation If an error occurs during the calculation, the kinematics technology object stops the motion. The kinematics technology object outputs a technology alarm with the error ID as an accompany value and deletes the job sequence. | ||||
If an error occurs during the calculation, the kinematics technology object stops the motion. The kinematics technology object outputs a technology alarm with the error ID as an accompany value and deletes the job sequence. |
shtxjd.cn.b2b168.com/m/