Hello Guest it is April 26, 2024, 03:00:26 AM

Author Topic: Mach 4 liniar automatic tool change  (Read 2586 times)

0 Members and 1 Guest are viewing this topic.

Mach 4 liniar automatic tool change
« on: December 08, 2019, 08:41:41 AM »
Hello
I need some help with liniar automatic tool change on a turn Citizen 5 axis machine.
In fact I need, that when I request a tool (ex: T5) the Y axis to go into a position defined in the text box T5/Y.
The same will apply to all tools with the position inserted in the text boxes for Y X A axis.
These would be parameter-defined positions and I wish they could be changed only with a password by activating and deactivating writing in boxes.
Thanks!
 
Re: Mach 4 liniar automatic tool change
« Reply #1 on: December 10, 2019, 01:44:22 PM »
WOW! Never seen a Mach 4 user with a Swiss machine before. I'll have to think on the bast way to do this. Do you intend to run both spindles in simultaneous back work?
Re: Mach 4 liniar automatic tool change
« Reply #2 on: December 10, 2019, 02:46:08 PM »
I hope I can do spindle sync as well.
I try to make the retrofit as close to the original as possible.
If you could help me with the software change I would be grateful to you.
Re: Mach 4 liniar automatic tool change
« Reply #3 on: December 10, 2019, 03:52:15 PM »
OK,

Take my reply with a grain of salt as I have never attempted to convert a Swiss machine to Mach 4.

Mach 4 offers a single motion planner with up to 6 coordinated axes. There a also 6 out of band axes that can be used for uncoordinated motion (basic spindle, ATC, etc.)

Your swiss machine would require 2 motion planners, one for the front spindle and one for the rear since they act independently. Your spindles would also each consume a standard axis since they will be used as a C axis. The out of band axes would work great for live tooling spindles (unless you need rigid tapping, most motion controllers cannot support tapping).

So you have two options. You can forego the simultaneous front and back work and fit the machine into the capabilities/limitations of Mach 4. You might still be able to integrate the back spindle, but the front couldn't cut at the same time.

Second option would be to run 2 computers with two separate instances of Mach 4. One would control the main spindle and associated tools, and the other would control the back spindle and associated tools. Syncs would need to be realized with custom macros and likely hardware signals between the two copies of Mach 4 to handle the hand off. Hardware encoder signals could be passed between the two spindles to allow them to sync.

Either way, you have a complicated machine and a lot of work to get it under the control of Mach 4. There is no standard configuration that will work out of the box. I would prepare to get very intimate with LUA scripting to accomplish what you want. With all those disclaimers, I don't see any immediate reason you wouldn't be able to get this working. It would be an awesome project and there is a great community here to support you along the way. I think you will capture the respect of those in this community as you work your way through this.

Best of Luck,

Mike
Re: Mach 4 liniar automatic tool change
« Reply #4 on: December 10, 2019, 03:54:35 PM »
BTW, for anyone reading this, I count 11 axis including the live tooling motors, B axis, and C and C* axes for the spindle. What an incredible machine.
 
Re: Mach 4 liniar automatic tool change
« Reply #5 on: December 11, 2019, 02:09:06 AM »
Hi
My machine has only 5 axes, without the axis B and Y2 from the picture.
The picture was informative to see the movement of the tools on the X and Y axis (for those who do not know this type of machine).
My problem now is that I don't really get along with LUA.
I have to make a macro that when I request tool 1 (T01), the Y axis has to go in a defined position ,also valid for the other tools, each with its position on the Y axis.
At the moment I have chosen the axes as X-X1 Y-Y1 Z-Z1 A-X2 C-Z2  (mach4 - original Citizen)
I do not think that spindle-synchronization will be a big deal as long as, as long as mach4 will allow me to move simultaneously the Z and C axis.
Older Citizen machines have Z-axis synchronization and spindle rotation done in G code by the programmer.
I have seen machines that have the difference of 15 - 20 rotations between the spindles and make quite good pieces.
My ambition is to be as close to the original as possible. I know it's a lot of work and a lot of money to invest but I hope something nice comes out of it.
Thank you very much for your support!
Re: Mach 4 liniar automatic tool change
« Reply #6 on: December 11, 2019, 09:38:57 AM »
Quote
My machine has only 5 axes, without the axis B and Y2 from the picture.

OK, That simplifies it a bit.

Unfortunately you have still have two independent coordinate systems. Also, unless I misunderstand, each spindle is capable of rotary positioning which would consume an axis. In this case your two coordinate systems would be: (X, Y, Z, C - Main Spindle) and (X2, Z2, C2 - Sub Spindle). This would bring you to a total of 7 coordinated axes (Y2 and B from the attached image no longer apply). Additionally, you will likely have two servos for live tooling that can be accomplished with Out of Band axes in Mach 4. This brings us up to a total of 9 axes.

In Swiss machines these typically act independently and at the same time, pausing only for synchronization when part exchange and cutoff is required.

As shown here (https://www.machsupport.com/wp-content/uploads/2014/06/Mach%20Version%20Differences_doc_a9.pdf) Mach 4 only supports a single planner right now meaning that all motion would happen at the same time. In this way, you could still use the front and rear spindles, but the front would need to sit stationary while the back spindle is doing its thing. If you went with the 2 concurrent copies of Mach 4 running the machine, you could likely get the entire machine running as normal.

Quote
My problem now is that I don't really get along with LUA.

I was in that position 6 months ago. Today I really feel like I have a solid grasp on the language and can bend Mach 4 to do my will. There is no easy way to get there other than just working on it and asking a lot of questions here. There are some extremely knowledgeable people on this forum that are happy to help.

I would begin by reading through the reference material for LUA 5.3, the Mach 4 API documentation (in the Mach 4 docs folder on your computer), and maybe playing with the LUA online demo to test executing code.

You will absolutely need to be comfortable writing LUA scripts in order to interface with your machine. Users of very simple mills and lathes can use Mach 4 out of the box, but any "extra" functionality (ATC, powered drawbar, etc) needs to be scripted. The flexibility and customization offered by Mach 4 is one of it's biggest selling points in my mind. 

Quote
I do not think that spindle-synchronization will be a big deal as long as, as long as mach4 will allow me to move simultaneously the Z and C axis.
Older Citizen machines have Z-axis synchronization and spindle rotation done in G code by the programmer.

Again, I don't have direct experience with converting a Swiss machine, I have to imagine that behind the scenes the control is doing something a little more complicated with speed matching the spindles. This is certainly able to be done if needed, otherwise we can just stick with running the axes from G-Code only and hoping they synchronize well enough.

Quote
My ambition is to be as close to the original as possible. I know it's a lot of work and a lot of money to invest but I hope something nice comes out of it.

Again, an awesome project. I really hope to see lots of updates about how this is coming along. Don't let me discourage you with the discussion above. Swiss machines have rather special CNC controls (same with wire EDM and mill turn machines) that we don't see much of in the hobby realm. Trying to think through the best way to recreate the functionality within the capabilities of Mach 4. Would love to see pictures of the machine you're working with.
« Last Edit: December 11, 2019, 09:42:35 AM by mcardoso »

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Mach 4 liniar automatic tool change
« Reply #7 on: December 11, 2019, 12:53:25 PM »
Use the linear version of the A and C rotary axes.  U, V, and W are linear versions of the A, B, and C.  The difference is mainly how the DROs display the current units.  U, V, and W change with G20 and G21 where A, B, and C doesn't because a degree is the same in metric and inch.  :) 

Mach 4 Expert can support up to 6 planners.  Each planner can have 6 coordinated axes and 6 non coordinated (out of band) axes.  Typically, each planner would control a separate motion controller.  Since the two planner outputs are executed on two different motion controllers, motors from one motion controller can't be used to influence the motors from the other motion controller.  Meaning no override or overlays between the planners.  But the movements of the two planners can be synced with G code (special synchronization M codes). 

Each planner typically controls one motion controller because there are not many motion controllers out there that support more than 6 or 8 motors.  If there was a motion controller that could support say 16 motors, then axis overrides and overlays could be implemented.  The EtherCAT controllers may offer some support for this but none of it has been implemented at this point, at least to my knowledge. 

Steve
Re: Mach 4 liniar automatic tool change
« Reply #8 on: December 11, 2019, 01:33:26 PM »
Hi smurph,
is Mach4 Expert publicly released? I don't see it on the NFS site nor does it turn up as a result of the search?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Mach 4 liniar automatic tool change
« Reply #9 on: December 11, 2019, 02:08:47 PM »
Well...  it isn't something that we typically sell via the web site as it will usually need an integrator to successfully get it working.  Obviously the complexity goes WAY up.  And I don't think we have actually had a customer that is using it yet.  But I know some are planning to. 

Setup will require getting each planner working independently, each with its' own profile.  Then both profiles are run at the same time with a screen that is laid out according to the needs of the machine.  If you'll notice, all of the screen elements/controls has an Instance property so that G code lists from each planner can be displayed on one screen, etc... 

Steve