This function is used to check if mv_follow2() can be executed with the specified data. The function if it results in failure returns an error code; otherwise, if ok, it can also return the maximum synchronism duration time.
|
i32 check_mv_follow2 (stru_follow2 stru, real masterSpe, real syncTime)
|
|
Structure of type stru_follow2 containing movement-related parameters
|
|
Speed of the master at steady state
|
|
Variable in which the maximum sync duration will be written
|
|
Returns:
|
|
-5
|
Invalid axis number
|
-1
|
masterSpe <= 0
|
0
|
Operation performed successfully. You can run mv_follow2(), in syncTime you can read the maximum sync duration
|
1
|
Maximum acceleration of the slave <= 0
|
2
|
Start space (sync position / park position) or braking space are <= 0
|
3
|
kSlaveMaster <= 0
|
4
|
Rotary slave -> insufficient start master space + braking space
|
5
|
Rotary slave -> the master space available to the slave to reach the next sync is insufficient
|
Linear slave -> the master space available to the slave to go back is insufficient
|
6
|
masterCycle <= 0
|
21
|
The slave exceeds the maximum speed while moving from the parking position to the sync position
|
22
|
The slave exceeds the maximum acceleration while moving from the parking position to the synchronism position
|
31
|
Linear slave -> the slave exceeds the maximum speed while braking after synchronism
|
32
|
Linear slave -> the slave exceeds the maximum acceleration during braking after synchronism
|
41
|
Linear slave -> the slave exceeds the maximum speed while returning to the initial position
|
42
|
Linear slave -> the slave exceeds the maximum acceleration while returning to the initial position
|
51
|
Rotary slave -> the slave exceeds the maximum speed while moving to the parking position after synchronism
|
52
|
Rotary slave -> slave exceeds maximum acceleration while moving to the parking position after synchronism
|
61
|
Rotary slave -> slave exceeds maximum speed while moving from the current synchronism position to the next one, slave stops to wait for the required master space
|
62
|
Rotary slave -> the slave exceeds the maximum acceleration while moving from the current synchronism position to the next one, the slave stops to wait for the necessary master space
|
71
|
Rotary slave -> the slave exceeds the maximum speed while moving from the current sync position to the next one
|
72
|
Rotary slave -> slave exceeds maximum acceleration as it moves from the current synchronism position to the next one
|
|
|
Rule, Task
|
|
|