
MCO 305 Design Guide
__ Functions and Examples __
26
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
man_vel = m GET 1901
done
=
1
ELSEIF (IN 4 == 1) AND (done == 0) THEN
// Decrease manual velocity by 1 step when input 3 is set
man_vel = man_vel - GET 1901
done
=
1
ELSE
done
=
0
ENDIF
ENDWHILE
CSTOP
// Stop when leaving manual mode
OUT 2 0
// Reset "In manual mode" output when leaving manual mode
ENDIF
GOTO MAIN
/****************************** Sub programs start ********************************/
SUBMAINPROG
/******************************** Error handler ***********************************/
SUBPROG errhandle
err = 1
// Set error flag to remain in error handler until error is reset.
OUT 8 1
// Set error output
OUT 1 0
// Reset "In synchronizing mode" output in case of error
OUT 2 0
// Reset "In manual mode" output in case of error
WHILE err DO
// Remain in error handler until the reset is received
IF (IN 8) AND NOT (IN 1) AND NOT (IN 2) THEN
// Reset error when Input 8 is high and input 1+2 is low.
ERRCLR
// Clear error
err=0
// Reset error flag
ENDIF
ENDWHILE
OUT 8 0
// Reset error output
sync_flag = 0
// Reset sync_flag after an error
done = 0
// Reset done flag after an error
RETURN
/*******************************************************************************/
ENDPROG
/******************************* End of program **********************************/
Position/Angle Synchronization (SYNCP)
Position synchronization (SYNCP) is closed loop position control with a moving target where the set-point
(commanded position) is the master position multiplied by the gear-ratio also considering any position off-
set. The slave position is controlled based on this set-point and the actual position feedback from the slave
encoder. Any position deviation will continuously be corrected considering maximum velocity, acceleration
and deceleration of the slave. The gear-ratio is set as a fraction (numerator and denominator) to avoid
rounding errors e.g. when using prime numbers. The gear-ratio must be 100% correct, even the smallest
rounding error will lead to position drifting over time.
When starting position synchronizing the actual slave position will be locked to the actual master position, it
is thus necessary to bring the slave into the right physical position with respect to the physical position of
the master. This can be done manually or be means of an automatic homing procedure (requires external
reference switches or absolute encoders).
The slave must be faster and more dynamic than the master in order to maintain accurate synchronization
both at maximum master velocity and during acceleration/deceleration. I.e. the slave must be able to
exceed the maximum velocity, acceleration and deceleration of the master to allow it to catch up if getting
behind the master. Already during the design phase it is thus important to consider making the least dyna-
mic shaft the master as this shaft will anyway be the limiting factor for the system performance.
Содержание MCO 305
Страница 4: ......