Thanks for your answers Steve, but the one about #2 I'm not sure to have understood it. What did you mean about having a "check"? If user servo is disabled this would be dangerous so do you mean apart from the UserServo modification, another PLC that checks that Ixx59 is active and if not doesn't allows to move?
I wanted to implement something like this in the user written servo code section:
Tracking is the slow high precision movement, and slewing the faster one.
If (MTRNUM = 2)
;Checks if a slewing period starts
If (isTracking = 1) And(current_velocity > min_slew_velocity)
isTracking = 0
I211 = 0
EndIf
;Checks if a tracking period starts
If(isTracking=0) And(current_velocity < min_slew_velocity)
isTracking = 1
I211 = tracking_fatal_following_error_limit
EndIf
;Stops the movement if higher following error exceeded
If (following_error > slewing_fatal_following_error_limit)
COMMAND"#2k”
RETURN(0) ;Break execution and return zero current demand
EndIf
;Here new current demand depending on current and demanded position is calculated with PID
...
RETURN(DAC)
EndIf
Here is our current ECT setup, we are only using motor #2 as a real motor, feedback is obtained from encoder on motor#1, and motor #3 is for synchronization purposes, if you need any more info please don't hesitate to ask us for it:
I8000=$F60460
I8001=$218000
I8002=$78000
I8003=$78008
I8004=$78010
I8005=$78018
I8006=$E00203
I8007=$E00405
I8008=$E00607
I8009=$2810FE
I8010=$18000
I8011=$E20A08
I8012=$EC000B
I8013=$D03509
I8014=$7FFF
I8015=$A
I8016=$2F8430
I8017=$18000
I8018=$2F8434
I8019=$18000
I8020=$2F8438
I8021=$18000
I8022=$2F843C
I8023=$18000