
MCO 305 Design Guide
__ Functions and Examples __
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
21
Relative Positioning
Relative Positioning is explained with following function of the palletizer: When leaving the deliver position
the vertical axis just needs to move up one box height so that it is clear of the stack before the horizontal
axis can move back to the pick-up position. This is done by relative positioning to “box height” in the “up-
direction”.
Parameter Settings and Commands for Palletizer Application (Relative Positioning)
The following MCO 305 parameters are relevant for
relative positioning:
32-0*
Encoder 2 – Slave
page 183
32-6* PID-Controller
page
189
32-8* Velocity
&
Acceleration
page
191
Command
Description
Syntax
Parameter
Relative Positioning (REL)
ACC
Sets acceleration
ACC a
a = acceleration
DEC
Sets deceleration
DEC a
a = deceleration
POSR
Positioning relative to the actual position POSR d
d = distance to actual position in UU
VEL
Sets velocity
VEL v
v = scaled velocity value
Program Example: Relative Positioning for Palletizer Application
/********** Relative positioning sample program for palletizer application example **********/
//
Inputs:
1
Go to position
// 8
Clear
Error
// Outputs:
1
In
position
// 8
Error
/*************************** Interrupts *****************************************/
ON ERROR GOSUB errhandle
// In case of error go to error handler routine, this must always be included
/************************ Define flags *****************************************/
flag = 0
/********************* Basic settings ****************************************/
VEL 80
// Sets positioning velocity related to par. 32-80 Maximum velocity.
ACC 100
// Sets positioning acceleration related to par. 32-81 Shortest ramp.
DEC 100
// Sets positioning deceleration related to par. 32-81 Shortest ramp.
/******************* Define application parameters *********************************/
LINKGPAR 1900 "Box high" 0 1073741823 0
/************************** main loop *****************************************/
MAIN:
IF (IN 1 == 1) AND (flag == 0) THEN
// Go to position once (ensured by flag) when input 1 is high.
OUT 1 0
// Reset "In position" output.
POSR
(GET
1900)
// Go to position.
OUT 1 1
// Set "In position" output.
flag = 1
// Set "flag" to ensure that distance is only traveled once.
ELSE
MOTOR
STOP
// Stop if input is low.
flag = 0
// Reset "flag" to enable new positioning.
ENDIF
GOTO MAIN
/********************** Sub programs start **************************************/
SUBMAINPROG
/************************ Error handler *****************************************/
Summary of Contents for MCO 305
Page 4: ......