Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: DanielS 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!
-
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?
-
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.
-
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
-
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.
-
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!
-
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.
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.
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.
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.
-
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
-
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
-
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
-
Mach 4 Expert can support up to 6 planners.
Well Gosh, you have certainly piqued my interest! I doubt I could afford to play with it, but I am always interested in hearing about the capabilities of Mach.
-
Hi,
yep....me too!
It would be even more intriguing if there were motion controllers that had 16 synchronized motors as smurph has suggested.
Then you could have an override axis from one motion planner operating on top of an axis nominally controlled by another planner...
the possibillites are endless.
The potential for Mach4 to get into highly complex production machines is good, not only with Mach4Expert but Mach4Ethercat.
I hope NFS succeeds in breaking into those markets, we as hobbyists are likely to ride on those coat-tails.
Craig.
-
I have similar neded ,with cnc ,and labeling station that have 2 axiss ,and need work while the 3 axiss cnc run,i solve it with 2 computers ,that conect together ,and one c# app that controls the both mach ,by api
So at the end user see only one screen cant mistake
It wasnt easy but now work perfect,and i install it this days on other 2 machines
-
Hello
KatzYaakov you can detail a little how you managed to do it, put some pictures with the final screen ...
The PC must be exactly the same, same configuration?
I currently have a problem with the script for positioning the Y axis at certain fixed points when calling the tools.
For example, when I call the tool 1 (T0101) the Y axis moves 550 mm from the origin, for the tool 2 (T0202) it moves 500 mm and so on.
When I was younger I did programming in visual basic but this LUA kills me.
Thanks
-
Daniel,
I don't know why I didn't think of this before, but I have done a few jobs which required me to use my mill as a vertical CNC lathe. I had many tools on the table, some clamped in the vise, others mounted elsewhere on the table.
Rather than using a M06 T## to change between tools, I flipped everything around. I used work offsets to give the machine the X,Y,Z coordinates of the 0,0 location on every tool, then I used the tool offsets to handle my different lengths of stock (held in tool holders).
This is a little backwards, but the functionality is exactly what you need to handle your tool changes.
-
Daniel
do you mean how control 2 mach4 "machines" by one c# application with the Api?
-
Mcardoso, I don't think I have work offsets in the lathe, I found only tool offsets but not work offsets.
KatzYaakov "do you mean how control 2 mach4 "machines" by one c# application with the Api?"
Yes, and I'm curious about how the control screen looks like also.
And through the application in C # you can synchronize the two "machines", meaning, when Z1 goes to +, Z2 goes to -, synchronized ?!
And how does the application make distinction in the G Code X axis from the first "machine" from the X axis from the second "machine" !?
-
Use the milling screenset then and just edit it to only show what you need for the lathe. In this case you may want to use work offsets and call them "Tool Offsets" then not even use the real tool offsets.
-
My problem is that I have to use M6 T ##, because I want the machine to be programmed and operate almost like the original.
I have 11 tools on the Y axis and 7 tools on the A axis
-
Hello
Update:
I solved with the tool positioning part and it seems that it was not the problem with the programming but with the fact that I try to do this in the demo version.
I thought the demo didn't let you run G code longer than I don't know how many lines, but it seems that it doesn't respond too well to modifying scripts. I did so because I wanted to test everything before uploading the script in the licensed version, but it seems that I will have to work in the licensed version.