
MCO 305 Design Guide
__ Functions and Examples __
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
25
Parameter Settings and Commands for Conveyor Belt Application
The following MCO 305 parameters are relevant for
velocity synchronization:
32-0*
Encoder 2 – Slave
page 183
32-3*
Encoder 1 – Master
page 186
32-6* PID-Controller
page
189
32-8* Velocity
&
Acceleration page
191
33-1* Synchronization
page
194
Command
Description
Syntax
Parameter
SYNCV
Synchronization of velocity
SYNCV
–
ON ERROR GOSUB
Definition of an error subroutine
ON ERROR GOSUB
name
name = name of the subroutine
Program Example: Velocity Synchronizing
/************************ Velocity synchronizing sample program ***********************/
// Inputs:
1
Start/stop synchronization
//
2
Start manual mode
//
3
Increase manual velocity
//
4
Decrease manual velocity
//
8
Clear Error
// Outputs:
1
In synchronizing mode
//
2
In manual mode
//
8
Error
/********************************* Interrupts **************************************/
ON ERROR GOSUB errhandle
// In case of error go to error handler routine, this must always be included
/***************************** Basic settings *************************************/
VEL 100
// Sets maximum slave velocity related to parameter 32-80 Maximum velocity
ACC 100
// Sets slave acceleration related to parameter 32-81 Shortest ramp
DEC 100
// Sets slave deceleration related to parameter 32-81 Shortest ramp
/************************** Define application parameters *****************************/
LINKGPAR 1900 "Manual velocity" 0 100 0
LINKGPAR 1901 "Velocity step" 0 10 0
/*************************** Define flags and variables *******************************/
sync_flag = 0
done = 0
err = 0
man_vel = 0
/********************************** main loop *************************************/
MAIN:
IF (IN 1 == 1) AND (sync_flag == 0) THEN
// Start synchronizing once when input 1 is high
SYNCV
// Start velocity synchronizing mode
sync_flag = 1
// Set sync_flag to ensure synchronizing is only started once.
OUT 1 1
// Set "In synchronizing mode" output
ELSE
MOTOR
STOP
// Stop if input 1 is low.
sync_flag = 0
// Reset sync_flag after stop
OUT 1 0
// Reset "In synchronizing mode" output
ENDIF
IF (IN 2 == 1) AND (sync_flag == 0) THEN
// Start manual mode if input 2 high and not synchronizing
OUT 2 1
// Set "In manual mode" output
man_vel = GET 1900
// Set manual velocity to parameter 1900
CVEL
man_vel
CSTART
// Start constant velocity mode
WHILE (IN 2 == 1) DO
// Stay in manual mode while input 2 is high
CVEL
man_vel
// Update manual velocity
IF (IN 3 == 1) AND (done == 0) THEN
// Increase manual velocity by one step when input 3 is set
Summary of Contents for MCO 305
Page 4: ......