Danfoss MCO 305 Design Manual page 25

Programmable motion controller
Hide thumbs Also See for MCO 305:
Table of Contents

Advertisement

MCO 305 Design Guide
Parameter Settings and Commands for Conveyor Belt Application
The following MCO 305 parameters are relevant for
velocity synchronization:
Command
Description
SYNCV
Synchronization of velocity
ON ERROR GOSUB
Definition of an error 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
/*****************************
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
SYNCV
sync_flag = 1
OUT 1 1
ELSE
MOTOR STOP
sync_flag = 0
OUT 1 0
ENDIF
IF (IN 2 == 1) AND (sync_flag == 0) THEN
OUT 2 1
man_vel = GET 1900
CVEL man_vel
CSTART
WHILE (IN 2 == 1) DO
CVEL man_vel
IF (IN 3 == 1) AND (done == 0) THEN
__ Functions and Examples __
// In case of error go to error handler routine, this must always be included
Basic settings *************************************/
// Start synchronizing once when input 1 is high
// Start velocity synchronizing mode
// Set sync_flag to ensure synchronizing is only started once.
// Set "In synchronizing mode" output
// Stop if input 1 is low.
// Reset sync_flag after stop
// Reset "In synchronizing mode" output
// Start manual mode if input 2 high and not synchronizing
// Set "In manual mode" output
// Set manual velocity to parameter 1900
// Start constant velocity mode
// Stay in manual mode while input 2 is high
// Update manual velocity
// Increase manual velocity by one step when input 3 is set
®
MG.33.L5.02 – VLT
is a registered Danfoss trademark
32-0*
Encoder 2 – Slave
32-3*
Encoder 1 – Master
32-6*
PID-Controller
32-8*
Velocity & Acceleration
33-1*
Synchronization
Syntax
Parameter
SYNCV
ON ERROR GOSUB
name = name of the subroutine
name
page 201
page 205
page 210
page 213
page 218
25

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents