Welcome, Guest. Please login or register.
Did you miss your activation email?
November 23, 2008, 10:28:18 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Brains Development
| | |-+  Modbus Simple spindle control brain........
Pages: 1   Go Down
Print
Author Topic: Modbus Simple spindle control brain........  (Read 620 times)
0 Members and 1 Guest are viewing this topic.
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Online Online

Posts: 766


Briceville, TN, USA



View Profile WWW
« on: February 13, 2008, 09:48:45 AM »

Greetings here is a Brain to do Modbus Spindle control (Out), using Brians and Macropump (this is going to a PLC with a 12 bit Analog module, but you could write it to a M1 board, or Peters board).

When doing Spindle control over a modbus (I used TCP in this example), the M3 and M4 CAN happen at the same time. The DRO99 (Spindle percent), is always accurate for Mach regardless of Spindle over rides. It will max out at 1%, at the top of your pulley range, it doesnt matter how much your spindle over ride is.

You need to keep your m3 and m4 controls in Output range 1-6 for mach to use its native LEDs for CW, CCW.

Further When doing control over the Modbus, at the initilize of Mach you can get some wierd "Space junk" in spindle control OVR. I have also put some code you need to drop into your Macropump to set these to correct values on moving out of Reset. (It resets them, each time you move out of reset).

'Macropump.m1s

k=GetUserDRO(2000)                               'Interlock counter

If k=0 and Not(GetOEMLED(800)) Then     'reset off (mach in run condition)
DoOEMButton(183)                                 'Reset Spindle override
SetOEMDRO(99,0)                   'set % to zero
SetUserDRO(2000,1)                                'set interlock counter
End If

If GetOEMLED(800) Then                        'On reset (mach in Estop condition)
SetUserDRO(2000,0)                               'reset interlock counter
End If

'Scott (Brain Attached)

* ModSpinOutControl.brn (3.24 KB - downloaded 82 times.)
Logged

All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!