This keyword allows a variable of type STRU_MVTOCJV (STRUCT_P) to be defined.
It is used by the mv_to_cjv() motion statement.
It consists of the following information:
Field |
Type |
Description |
|
---|---|---|---|
cPos |
REAL |
Current position [units]. To be updated the first time the function is called. In case the position of an axis is controlled, the assignment to be made is: stru_mvto.cPos = IP() |
|
cSpeed |
REAL |
Current speed [units/sec]. To be updated the first time the function is called. In case the position of an IP axis is controlled, its IV (speed) is automatically calculated by RTE. The assignment to be executed thus results: stru_mvto.cspeed = IV() In case the value of a register or variable is controlled (thus not the IP), the calculation of cSpeed (current speed) must be done by the user. The simplest system is to calculate the rate of change of the controlled variable as follows:
|
|
cAcc |
REAL |
Current acceleration [units/sec²]. To be updated the first time the function is called. In case the position of an IP axis is controlled, the corresponding IA (acceleration) is automatically calculated by RTE. The assignment to be executed thus results: stru_mvto.cAcc = IA() Otherwise, see cSpeed |
|
dPos |
REAL |
Desired position [units] |
|
dSpeed |
REAL |
Desired speed [units/sec] |
|
dAcc |
REAL |
Acceleration [units/sec²] |
|
dJerk |
REAL |
Jerk [units/sec³] |
|
delta |
REAL |
Time increment since the last execution of the function. If used in rules then it corresponds to the value of si. It is not mandatory that the value refer to a time. Nothing prohibits it from being a space of a master axis, for example. |
Example declaration:
Example of use:
|