MCO 305 Design Guide__ Functions and Examples __MG.33.L5.02 – VLT® is a registered Danfoss trademark 47 Mechanical Brake ControlIn applications controlled by MCO 305 involving an electro-mechanical brake it normally makes sense tocontrol the brake from the MCO 305 application program to avoid situations when the position controller ofMCO 305 attempts to move the motor while the brake is still engaged.Controlling the brake from the MCO 305 applicationprogram can be combined with the Mechanicalbrake control of FC300 by using 2 outputs in seriese.g. Digital output 29 set to Mechanical brakecontrol (par. 5-31) and relay output 1 set to MCOcontrolled (par. 5-40 [0]) and connect the brake asshown below:Program Example for Relative Positioning with Mechanical Brake/**********************************************************************/Inputs: 1 Go to position8 Clear ErrorOutputs: 1 In position8 Error11 Relay output for mechanical brake/************************** 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 height" 0 1073741823 0LINKGPAR 1901 "Brake close delay" 0 1000 0LINKGPAR 1902 "Brake open delay" 0 1000 0/******************* Initialize drive to safe state *************************/GOSUB engage // Ensure that mechanical brake is closed after power up./****************************** main loop ******************************/MAIN:IF (IN 1 == 1) AND (flag == 0) THEN// Go to position once (ensured by flag) when input 1 is high.GOSUB disengage // Open mechanical brake before start.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.ELSEIF (IN 1 == 0) AND (flag == 1) THEN // Stop once when input 1 is lowMOTOR STOP // Stop if input is low.flag = 0 // Reset "flag" to enable new positioning.GOSUB engage // Close mechanical brake after stop.ENDIFGOTO MAIN/********************** Sub programs start ********************************/SUBMAINPROG/******************* Engage mechanical brake ******************************/