Danfoss MCO 305 Design Manual page 28

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

Advertisement

MCO 305 Design Guide
Command
Description
DEFSYNCORIGIN
Defines master-slave relation for the
next SYNCP or SYNCM command
MOVESYNCORIGIN
Relative shifting of the origin of
synchronization
PULSACC
Sets acceleration for master
simulation
PULSVEL
Sets velocity for master simulation
SYNCP
Synchronization of angle/position
SYNCSTAT
Queries flag for synchronization
status
SYNCERR
Queries actual synchronization error
of the slave
Position Synchronizing Sample Program
/************************* Position Synchronizing Sample Program ***********************/
// Inputs:
1
Start/stop synchronization
//
2
Start homing
//
3
Home switch
//
4
Increase offset
//
5
Decrease offset
//
8
Clear Error
// Outputs: 1
Within synchronizing accuracy, set accuracy window in par. 33-13
//
2
Homing done
//
8
Error
/****************************** Interrupts **************************************/
ON ERROR GOSUB errhandle
// In case of error go to error handler routine, this must always be included
/**************************
VEL 100
// Sets maximum slave velocity related to par. 32-80 Maximum velocity
ACC 100
// Sets slave acceleration related to par. 32-81 Shortest ramp
DEC 100
// Sets slave deceleration related to par. 32-81 Shortest ramp
/*********************** Define application parameters *****************************/
LINKGPAR 1900 "Offset step" 0 10000 0
LINKGPAR 1901 "Offset type" 0 1 0
/********************** Set parameters and flags ********************************/
SET I_FUNCTION_3 1
next_step = 0
home_done = 0
new_offset = 0
/************************************* main loop ******************************/
MAIN:
IF (IN 2 == 1) THEN
HOME
home_done = 1
OUT 2 1
ENDIF
IF (IN 1 == 1) AND (home_done == 1) THEN
SYNCP
28
__ Functions and Examples __
Basic settings
************************************/
// Define input 3 as Home switch input
// Start homing if input 2 high
// Go to Home and set position to 0
// Set home_done flag
// Set home done output
// Start synchronizing when input 1 = 1 and homing done.
// Start position synchronizing mode
®
MG.33.L5.02 – VLT
is a registered Danfoss trademark
Syntax
Parameter
DEFSYNCORIGIN
master = reference position in qc
master slave
slave = reference position
MOVESYNCORIGIN
mvalue = Relative offset
mvalue
PULSACC a
a = acceleration in Hz/s
PULSVEL v
v = velocity in pulses per second
(Hz)
SYNCP
res = SYNCSTAT
res = SYNCERR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents