Hello Guest it is November 16, 2019, 06:34:48 PM

Author Topic: Dynamic Braking Macro  (Read 2117 times)

0 Members and 1 Guest are viewing this topic.

Offline rufan

  •  37 37
    • View Profile
Dynamic Braking Macro
« on: July 16, 2013, 04:10:03 AM »
I have written a macro to Dynamic Brake my Mill spindle to perform tool change.
The macro is working, but in my opinion it is not the most nice solution.
Spindle motor = 4kw DC motor with Lenze 480 controller.
Rotation Direction is performed by 2 relays.

Please check the macro, if there is a better approach please let me know.
You will wonder why I used the code instead of dospinCW(), this is because macro M3, M4 & M5 are also edited.

Sample M3 macro:
ActivateSignal(OUTPUT6)      'Activate the motor controller.

-----------------------Dynamic Braking Macro---------------------------------------------
code "M5"                   'Stop spindle
sleep 100
code "M4S10"              'Turn spindle CCW
sleep 2000                  'Time to brake from 6000rpm
code "M3S10"          'Turn spindel CW to brake if the overshoot
sleep 100
code "M4S10"          'Turn spindel CCW to brake if the overshoot          
sleep 200

While Not isactive(INDEX)
sleep 1
ActivateSignal(OUTPUT9)      'Activate the locking pin
If isactive(INDEX) Then code"M5"

While GetOEMDro(39) >0      'Get actual spindle speed
sleep 1

While Not isactive(INDEX) And Not isactive(OEMTRIG1)   'To make sure spindle is aligned
sleep 10
'Continue Tool Change Macro

Thanks in advance.

Offline BR549

  •  6,916 6,916
    • View Profile
Re: Dynamic Braking Macro
« Reply #1 on: July 20, 2013, 10:20:46 AM »
You may want to check the manual for that controller it may NOT like being thrown into reverse at full forward speed. It could blow the final out of it IF it was not designed to do so.

Just a thought, (;-) TP