This keyword allows a variable of type STRU_PHADJ(STRUCT_P) to be defined.
It is used by the mv_phase_adj() motion function.
It consists of the following information:
Field |
Type |
Description |
---|---|---|
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 can be executed by changing the error value and also resetting the space run by the master 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 intervention of the limitation, the correction of the phase error will result only partial. In the case of a negative value, it is 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 correction of the phase error will result only partial |
accMaxSlave |
REAL |
This is the maximum acceleration value accepted for the slave axis. The amount of correctable error is automatically reduced so as not to exceed the set acceleration value. The error parameter provided by the user is automatically changed by the function |
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 |
Esempio di definizione:
Esempio di utilizzo:
|