Validity: RC3E v33.5.8-7 (or later)
This keyword allows a variable of type STRU_PHADJ2 (STRUCT_P) to be defined.
It is used by the mv_phase_adj2() motion function.
It consists of the following information:
Field |
Type |
Description |
|||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
corrType |
I32 |
Type of correction profile: Comparison table of correction profiles taking the triangular profile as reference:
|
|||||||||||||||||||||||||||||||||||
error |
REAL |
It is the deviation of the slave axis from the desired phase position (positive if you need to accelerate to reach the phase, negative if you need to slow down). Once the function is working, a new correction is executed by changing the error value and also resetting the space traveled by the deltaMaster runtime (e.g., on the rising edge of an input) |
|||||||||||||||||||||||||||||||||||
masterCycle |
REAL |
It is the master axis space available to perform phase correction |
|||||||||||||||||||||||||||||||||||
velMinSlave |
REAL |
This is the lower limit of speed allowed for the movement of the slave axis. In case the correction formula requires going below the minimum speed, the value returned by the function would be velMinSlave. In case of limitation, the phase error correction will result only partial, and the state variable will take the value M_SPEED_LIMITED. In the case of a negative value it will be limited to 0 |
|||||||||||||||||||||||||||||||||||
velMaxSlave |
REAL |
This is the upper speed limit allowed for slave axis movement. In case the correction formula requires going above the maximum speed, the value returned by the function would be equal to velMaxSlave. In case of limitation, the phase error correction will result only partial, and the state variable will take value M_SPEED_LIMITED |
|||||||||||||||||||||||||||||||||||
accMaxSlave |
REAL |
This is the maximum acceleration value accepted for the slave axis. If the limitation is triggered, the phase error correction will result only partial, and the state variable will take value M_ACCEL_LIMITED |
|||||||||||||||||||||||||||||||||||
vRef |
REAL |
This is the base speed of the slave axis, i.e., the speed to be held in the absence of corrections. This parameter must be updated by the application software before each call to the function |
|||||||||||||||||||||||||||||||||||
deltaMaster |
REAL |
This is the elapsed master space since the start of the function call. The correction occurs in the range of deltaMaster between zero and masterCycle. For deltaMaster values greater than masterCycle, the function returns the base speed vRef and return code M_SYNCHRONIZED This parameter must be updated by the application software before each call to the function |
|||||||||||||||||||||||||||||||||||
vRefMaster |
REAL |
Master target speed (if not specified leave 0 or IV(master)) |
|||||||||||||||||||||||||||||||||||
vSlave |
REAL |
Current slave speed This parameter must be updated by the application software before each call to the function |
|||||||||||||||||||||||||||||||||||
si |
REAL |
Sampling interval |
|||||||||||||||||||||||||||||||||||
kTrap |
REAL |
Minor base/major base ratio trapezoid (possibly recalculated at start of correction and reset at end of correction) |
|||||||||||||||||||||||||||||||||||
camValue |
REAL |
Current correction cam value (read only). Varies between 0 and 1 |
Examples |
Example declaration:
Example of use in rule:
|