Download Print this page

Danfoss MCO 305 Design Manual page 20

Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
Program Example: Absolute Positioning for Palletizer Application
/********************** Absolute Positioning program sample **************************/
//
Inputs:
1
Go to pick up position
//
2
Goto deliver position
//
3
Home switch
//
8
Clear Error
// Outputs: 1
In pick up position
//
2
In deliver position
//
8
Error
/****************************** Interrupts **************************************/
ON ERROR GOSUB
errhandle
// In case of error go to error handler routine, this must always be included
/****************************
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 "Pick up Position" 0 1073741823 0
LINKGPAR
1901 "Deliver Position" 0 1073741823 0
/****************** Define Home(0) position after power up *************************/
SET
I_FUNCTION_3 1
HOME
/****************************** main loop **************************************/
MAIN:
IF (IN
1
== 1) AND
(IN
2 ==
OUT
2 0
POSA (GET
1900)
OUT
1 1
ELSEIF (IN
1
== 0) AND
(IN
OUT
1 0
POSA (GET
1901)
OUT
2 1
ELSE
MOTOR STOP
ENDIF
GOTO MAIN
/*********************** Sub programs start *************************************/
SUBMAINPROG
/************************* Error handler ****************************************/
SUBPROG
errhandle
err = 1
OUT
8 1
WHILE
err
DO
IF IN
8
THEN
ERRCLR
err=0
ENDIF
ENDWHILE
OUT
8 0
RETURN
/*****************************************************************************/
ENDPROG
/*************************** End of program ************************************/
20
__ Functions and Examples __
Basic settings
***********************************/
// Define input 3 as Home switch input
// Go to Home and set position to 0
0)
THEN
// Go to pick up position when only input 1 is high
// Reset "In deliver position" output
// Go to position
// Set "In pick up position" output
2 ==
1)
THEN
// Go to deliver position when only input 2 is high
// Reset "In pick up position" output
// Go to position
// Set "In deliver position" output
// Stop if both inputs are low or high.
// Set error flag to remain in error handler until error is reset.
// Set error output
// Remain in error handler until the reset is received
// Reset error when Input 8 is high.
// Clear error
// Reset error flag
// Reset error output
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark

Advertisement

loading