Hello Guest it is November 18, 2019, 03:18:17 AM

Author Topic: Example Brain or Macro pump to run a spindle  (Read 6994 times)

0 Members and 1 Guest are viewing this topic.

Example Brain or Macro pump to run a spindle
« on: February 17, 2014, 10:52:15 AM »
Good morning, I have two VFD's on a 3 in 1 machine, one for mill and one for lathe.  I want to control the spindles for both of these with Mach3.  I am new to Mach3, new to Brains, new to macro pumps, new to DRO's.  I'm looking for an example of either a brain or macro pump or both that can do spindle control from Mach3.  I want to start, stop, change directions and change speed.  I know all of the addresses in the VFD's to start, stop, change speeds and change direction and have tested it all using the Serial Modbus test screen in Mach3.

What I have are two Altivar 12 VFD's hooked to two 3HP motors running 3 phase 240Vac.
So far my communication path is Serial 232 to Serial 485 through a 232 to 485 converter.  The drives are modbus 485 and I also have a Magelis terminal attached that is Modbus 485 or Modbus TCP, but since the drives are Modbus 485, it's connected that way for now.  I'm considering trying Modbus TCP and using a Modbus TCP to Modbus 485 converter, but would like to prove concept with what I have now before I invest anymore.

I'm guessing there is something already here that can do this, but I haven't run across it yet.

If there are tutorials I can use, other than the ones on the Mach3 site, I will dig into them also if you point them out.  I have gone through the ones on Modbus on the Mach3 site.

What I'm needing help with is understanding what DRO's go to what Mach3 screen buttons or actions.
How to set the Modbus plugins up to talk to the drive.  I saw a tutorial from PappaBear that helps, but my addresses are all over the place in the drive, especially if I read things back like RPM.  I was wondering if I should create a line in the plugin for each address.  Everything to these drives is 16 bit words, both digital and analog.  For instance to start the drive in forward, I need to write 15 decimal to memory word 8601, and to run in reverse I write something like 242 to memory word 8601.  To change speed, I write the speed such as 3000 decimal for 3000 RPM to memory word 8602.  I would need less than 10 addresses for each drive, and each drive would be in a separate Mach3 setup.  One Mill, the other Lathe.  Last, I'm not sure how to relate the plugin setup to the Pins setup in Mach3.

Is there anything out there that can help me get started quickly?  I'm not sure if a macro pump may be a better choice or if it should be a brain, or even a combination.

Thanks in advance.
TeaMan

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Example Brain or Macro pump to run a spindle
« Reply #1 on: February 17, 2014, 04:06:22 PM »
What I'm needing help with is understanding what DRO's go to what Mach3 screen buttons or actions.
>>>look in the users docs or on the mach3 wiki for OEM code for: buttons, leds and dros.

How to set the Modbus plugins up to talk to the drive.  I saw a tutorial from PoppaBear that helps, but my addresses are all over the place in the drive, especially if I read things back like RPM.  I was wondering if I should create a line in the plugin for each address.
>>> most drives have a way to do "Parameter Blocks" just for getting all that different stuff into a block of addresses.
>>> if your drives don't have parameter block addressing, then, put a different config for each function or functions you need
>>> (if they are sequential).

Everything to these drives is 16 bit words, both digital and analog.  For instance to start the drive in forward, I need to write 15 decimal to memory word 8601, and to run in reverse I write something like 242 to memory word 8601. To change speed, I write the speed such as 3000 decimal for 3000 RPM to memory word 8602.
>>> in serial plugin modbus, config 0: start address = 8601, number of addresses 2 (since 8602 is the next sequential address and in this case, it controls the speed).

  I would need less than 10 addresses for each drive, and each drive would be in a separate Mach3 setup.  One Mill, the other Lathe.  Last, I'm not sure how to relate the plugin setup to the Pins setup in Mach3.

>>> Ok, again, pull out the modbus/brians user manual, understand that your "Start address" of your config, will be MOD0 (input or out) in Brians.

In Brains:

at the input side, look for OEM LEDs, there is one each for Spindle CW and Spindle CCW use these to drive what value gets driven into your modbus output address that handles direction. So in brains on the input side, look up OEM LEDs

Rung 1,  SpindleCW LED -> no-op -> formula: 15*1 ->MOD0  (mod0 equates to 8601 in your drivers direction parameter)
Rung 2,  SpindleCCW LED -> no-op -> formula: 242*1 ->MOD0

For rung3, the analog for speed, since you can just drop the speed you want directly then you may need to use your Spindle RPM dro out.
so: Look in the inputs of brains, and pick OEM DROs and pick the spindle RPM DRO.

Rung 3, SpindleRPMdro -> no-op -> MOD1 (mod1 equates to 8602 where your speed value lives).

other control like On/Off ect. you can look through the "Drop down" in the Brains to get an idea of what you can see/control in Mach3, from the OEM list. There is OEM funcitons for" OEMLEDs, OEMDROs, buttons, and user LEDs/DROs as well as some other Mach3 functions.

Scott


Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: Example Brain or Macro pump to run a spindle
« Reply #2 on: February 26, 2014, 01:15:29 PM »
Scott (PoppaBear), I have to thank you for all the help you gave me personally on brains and modbus.  Your quick thinking and out of the box ideas in brains were a phenominal help.  It gave me exactly what I needed, a starting point to which I could start to build and understand how they worked.  You eliminated hours of frustration and helped me prove concept and move to more important things like tuning the system and actually make it work. You obviously have an excellent knowledge of Mach3, Brains, Macro's and in my case almost most important, Modbus.  Your knowledge and willingness to share it and help others says a lot to who you are and what you're about.

Thanks again.  I hope some day I can return the favor.

TeaMan

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Example Brain or Macro pump to run a spindle
« Reply #3 on: February 26, 2014, 04:39:55 PM »
Thank you for your kind words!!!

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/