|
Post by Roger on Apr 30, 2021 21:21:07 GMT
I've become increasingly frustrated at Mach4's failure to address the bugs introduced in the latest version of Mach4, and it's prompted me to look again at controllers. Back when I first converted the machine, I used CNCBrain which was a development project with huge promise that ultimately came to nothing. It was going to use Linear scales which is exactly what I wanted. However, I ended up with Mach3 then Mach4, but neither works closed loop, so my Linear scales have so far not been used. That's all about to change as I'm binning Mach4 in preference to KMotionCNC, which is a product of Dynamotion. It's not as pretty as Mach4, but it is fully configurable and seems to be a more stable platform. The really big draw is that it exists as a free product to support the sale of their Motion Controller KFLOP, which has a much more powerful motion planner than Mach4 has. This means that the whole product is controlled by one supplier. Mach4, that I currently have, uses a Smoothstepper ESS which is made by someone else. This means what whenever there's a problem, each say's it's the other's issue. The KFLOP motion controller is a full featured 8 channel board that can drive Step & Direction AC Servos and use the Linear Scales. It can also use the reference marks on the Linear Scales when homing. That means I can turn the machine off and get back precisely to a repeatable known position. The KFLOP motion controller piggy backs onto the KANALOG interface board that buffers the outputs and provides many options for interfacing the rest of the machine's I/O. The whole thing, including shipping costs £423.13, so it's pretty cheap for what it does. Obviously it's going to be a lot of upheaval, but it will once and for all deal with the issue of backlash, which is the curse of CNC machines. It's not too bad on mine, especially with backlash compensation, but it's far from ideal. You really want to be measuring where the table really is, not where you hope it is.
|
|
|
Post by racinjason on May 1, 2021 5:47:39 GMT
I've use a stand alone 5 axis controller I just generate G code on fusion post process and load it onto a usb. Cheers Jason
|
|
|
Post by Roger on May 1, 2021 8:22:00 GMT
I've use a stand alone 5 axis controller I just generate G code on fusion post process and load it onto a usb. Cheers Jason Hi Jason, Which one do you use? Most won't handle Linear Encoder feedback, or require you to use an +/- 10V Analog type of velocity interface for the Servo. The Dynamotion product is ultra flexible in what it interfaces with. You can drive Stepper Motors with Step & Direction and use Linear Encoders if you want, it's that clever. I'm hoping it's going to provide not only a better control dynamic with improved accuracy, but also let me customise it to look how I want it to look. We'll see. Why do you use a USB stick? Can't you get the controller connected to the internet and get programs across that way? I have everything on one computer in the workshop. The same computer controls the Mill, has a copy of the 3D modelling package and connects to the internet so I can share files with the office computer using Dropbox. Any 3D model I work on in the office is automatically available instantly in the workshop which is so convenient.
|
|
|
Post by racinjason on May 2, 2021 10:23:00 GMT
Hi Roger, The this is the controller I brought a couple of years ago It works quite well but I am thinking of changing controllers to one the supports 10 tool changer Cheers Jason.
|
|
|
Post by racinjason on May 2, 2021 10:41:09 GMT
Roger, This is the controller I'm thinking of changing to. cheers Jason.
|
|
|
Post by Roger on May 2, 2021 12:11:29 GMT
Those both look like open loop systems without backlash compensation. Do you just live with whatever backlash you have, and basically ignore it? The second one looks like it will connect to a network, that would be an improvement.
Personally I want something that uses the same computer that I use for everything else, I don't think a stand alone solution gives you anything other than simplicity for wiring and setting it up. I like the fact that PC based systems can be modified to look and feel the way you want. You do need a basic understanding or Electronics for the interfacing, but Forums are pretty good at answering those questions. Obviously you also need to package the Electronics, but usually there has to be some kind of cabinet anyway for the Servo Amplifiers, safety relay and fuses. My cabinet is plenty big enough to fit the new boards in, so that's not a problem for my setup.
I don't have automatic tool change, and to be honest, I don't think they are especially useful, at least not for what I do. Having the quill free for quick tool setting and the EasyChange system means I can change tools in seconds anyway. Still, each to their own, the main thing is to have CNC in some form or other. You can argue the pros and cons till the cows come home, but it's the CNC element that's a game changer.
|
|
|
Post by racinjason on May 2, 2021 22:18:05 GMT
Hi Roger, They both have backlash compensation and it's easy to setup. You are 100% correct it doesn't matter how you control it the cnc is the important part for me even doing simple parts is it doubles my productivity like having 2 people working. Jason
|
|
|
Post by Roger on May 3, 2021 11:47:55 GMT
Hi Roger, They both have backlash compensation and it's easy to setup. You are 100% correct it doesn't matter how you control it the cnc is the important part for me even doing simple parts is it doubles my productivity like having 2 people working. Jason That's good, I think backlash compensation is important if you want acceptable accuracy. I don't need any clever canned cycles, just something to run g-code, so the simplest of controls will do.
|
|
Neale
Part of the e-furniture
5" Black 5 just started
Posts: 283
|
Post by Neale on May 5, 2021 9:41:38 GMT
Couple of questions occurred to me reading this:
- why do you want backlash compensation if you are using linear scales for position feedback? Isn't BC just for the open-loop case where you do not have this feedback?
- how much backlash does your machine have? I worry about the possible uncontrolled movement of the slide that can't be managed by the servo. In particular, if the servo is tuned for managing the dynamics of the slide, it's unlikely to react fast enough to cope with, for example, climb milling when a cutter grabs. There is always going to be a bit of uncertainty around any change of direction as well. At one time, I was musing about a CNC conversion of my Warco mill and using the DRO scales already there but given the level of backlash, I was going to need to fit ballscrews anyway, and would have probably gone open-loop in that case. Personally, I find climb milling on my CNC mill (I eventually bought one) often gives a better surface finish so it's worth going for minimum controlled backlash to be able to do that safely.
You haven't mentioned in this thread the kind of machine you are working with, so apologies if all this has been considered!
|
|
|
Post by Roger on May 6, 2021 8:08:45 GMT
Couple of questions occurred to me reading this: - why do you want backlash compensation if you are using linear scales for position feedback? Isn't BC just for the open-loop case where you do not have this feedback? - how much backlash does your machine have? I worry about the possible uncontrolled movement of the slide that can't be managed by the servo. In particular, if the servo is tuned for managing the dynamics of the slide, it's unlikely to react fast enough to cope with, for example, climb milling when a cutter grabs. There is always going to be a bit of uncertainty around any change of direction as well. At one time, I was musing about a CNC conversion of my Warco mill and using the DRO scales already there but given the level of backlash, I was going to need to fit ballscrews anyway, and would have probably gone open-loop in that case. Personally, I find climb milling on my CNC mill (I eventually bought one) often gives a better surface finish so it's worth going for minimum controlled backlash to be able to do that safely. You haven't mentioned in this thread the kind of machine you are working with, so apologies if all this has been considered! I won't need backlash compensation, I was intending to say that it is desirable if you don't have linear scales. I have about 22microns lost motion in the X & Y axes, so it's not much. The leadscrews are precision ground items, the largest I could fit, so it's pretty rigid. I don't see any issues with Climb Milling, it hasn't been an issue to date. That's probably because there isn't that much backlash. I would share your concerns with any of these things if the backlash was larger, and there was noticeable free 'slop' in the mechanism though. You can't expect a control to deal with large mechanical deficiencies in a machine. I don't think the control will have any difficulty with the setup I've got, it's just a matter of figuring out how to interface it.
|
|
|
Post by Roger on May 8, 2021 23:01:07 GMT
This is a little interface board that's the same width as the KANALOG board I've bought. The idea is that it allows the Linear Encoders to plug directly into my board, and then into the two connectors without a nasty 'birds's nest'. KANALOG Linear Encoder interface by Georgia Montgomery, on Flickr As usual, I'm not doing things the usual way. I'm driving the AC Servos with Step & Direction pulses instead of the Analog +/-10V which would be much easier to implement. Those outputs are already on the KANALOG board I've bought. However, these systems can run away if there's a broken wire, and they drift during booting unless you take precautions to prevent that. I service machines with these kinds of drives, and they can be exciting when things go awry. Having said that, on the whole they're very reliable, so I could certainly take that route if this proves to be troublesome. Anyway, you know me, I like to follow ideal solutions if at all possible. However, this does mean that I need to interface the single ended Step & Direction signals from the KFLOP motion control board. That involves level shifting the 3V3 logic signals to 5V and creating differential signals which are capable of driving the optically isolated inputs on the SureServo Amplifiers. That will make them less prone to interference and will prevent them drifting or running away. So the following is the Schematic for that, with the two 16 way headers on the KFLOP board being on the left, and the 15way 'D' connectors I've chosen for the SureServo on the right. I've also taken the opportunity to add the DC Brake circuit to that PCB since the control for that comes from the Z-axis on the same cable. KFLOP Step and Direction interface by Georgia Montgomery, on Flickr That circuit translates to the little board below, which bolts on top of the KFLOP board. Once I've got the new boards in my hand, I'll check the exact positions of the connectors and then commit to making them. KFLOP Step and Direction interface layout by Georgia Montgomery, on Flickr So although it's been a pain to figure out how to go about this, it will mean that it's a really neat installation, with the main system components plugging directly into PCBs.
|
|
Neale
Part of the e-furniture
5" Black 5 just started
Posts: 283
|
Post by Neale on May 9, 2021 7:21:21 GMT
My understanding was that using servos in step/dir mode usually means using an internal encoder for position feedback - but representing rotary motion, of course, with the hope of minimal backlash in the mechanical bits downstream. You are using linear encoders for actual position measurement/feedback but you seem to say that those encoders will connect to the Kanalog or associated boards rather than the servo amplifiers, so I'm curious about how the servo amps get their error signal.
Please forgive the questions - my background is electronics/IT so I follow this kind of thread with great interest and always trying to learn something!
|
|
|
Post by Roger on May 9, 2021 7:51:30 GMT
My understanding was that using servos in step/dir mode usually means using an internal encoder for position feedback - but representing rotary motion, of course, with the hope of minimal backlash in the mechanical bits downstream. You are using linear encoders for actual position measurement/feedback but you seem to say that those encoders will connect to the Kanalog or associated boards rather than the servo amplifiers, so I'm curious about how the servo amps get their error signal. Please forgive the questions - my background is electronics/IT so I follow this kind of thread with great interest and always trying to learn something! The SureServo AC Servos manual is here if you want to look deeper into this. The Dynamotion web site is here if you want to look into the KFLOP motion controller. In short, the SureServo AC Servo motors have an encoder built into them, and that's what the AC Servo amplifier uses to close the position loop, given the required position through the Step & Direction commands. So the AC Servo system itself is closed loop to position, and this is what I've been using with Mach3/4 over the years. However, that's open loop as far as Mach4 is concerned, and you can't add further feedback to Mach4 because Mach4 is PC based. You can add a motion controller such as Gallil to it, there's a plugin, but I didn't like the price or the attitude of their sales people. That would have used the Linear Encoders, but Mach4 would still be open loop. The KFLOP motion controller is designed to work with a wide variety of Servo systems, including ones with Stepper Motors and Encoder feedback. Those have to deal with the sad fact that Stepper Motors can lose steps, and that's a problem if you're trying to digitally match the pulses you're outputting to the actual position you're achieving. Throw backlash into the mix, and it's clear that you have to use Step & Direction in the same way that you would Velocity control. In other words, you don't worry about the number of pulses you're outputting, but instead output a train of pulses to give the instantaneous velocity that you need. Then you can ignore the digital nature of the Stepper Motor, or in my case AC Servo, and use whatever feedback you like to close the position loop. Hopefully that makes sense. As a side note, the AC Servos also have Encoder outputs that you could use instead for the KFLOP motion controller. Presumably you would use that to allow the KFLOP to control position and know where it is, even if the power to the AC Servo amplifier was lost due to an Emergency Stop contition. The AC Servo amplifier splits the motor drive power and logic inputs, so it can still know where it is, even if the power to the motors is disconnected. This is one of the big issues with Mach4 and any other open loop system, especially if you don't have a precision homing mechanism. My Linear encoders have a reference channel, which I'll be using to get a repeatable home position. That ought to allow me to turn off the machine and get back to exactly the same position which would be great in the case of a power cut. I've been really impressed with the AC Servos, they haven't given a bit of trouble since I installed them in 2008, and the machine has done thousands of hours of machining.
|
|
Neale
Part of the e-furniture
5" Black 5 just started
Posts: 283
|
Post by Neale on May 9, 2021 9:30:13 GMT
Many thanks - that does make sense. The bit I was missing was, in effect, that a motion controller could pass on "error correction" signals to the servo amp/servo motor/internal encoder subsystem digitally rather than the analogue +-10V kind of signal. I had been musing about whether the step/dir signals could be re-interpreted as an error signal rather than open-loop position command signal and apparenly they can!
Interesting comments also re homing and reference issues. I know that there are some "absolute" AC servos around these days that have a battery backup to allow them to maintain a position reference; enough of the electronics is kept alive that manual movement of the motors when switched off is recorded so once homed, they never need rehoming subsequently. I measured the repositioning accuracy of the proximity switches I use for homing in my home-built CNC router and from memory, I was getting something like 1thou, 40microns, repeatability. More than good enough for a router mainly intended for woodworking. I must get round to doing the same check on my mill, which I think might be using mechanical switches. Might be a lesson there about the desirability or not of switching it off between machining sessions.
|
|
|
Post by Roger on May 9, 2021 18:58:13 GMT
Many thanks - that does make sense. The bit I was missing was, in effect, that a motion controller could pass on "error correction" signals to the servo amp/servo motor/internal encoder subsystem digitally rather than the analogue +-10V kind of signal. I had been musing about whether the step/dir signals could be re-interpreted as an error signal rather than open-loop position command signal and apparenly they can! Interesting comments also re homing and reference issues. I know that there are some "absolute" AC servos around these days that have a battery backup to allow them to maintain a position reference; enough of the electronics is kept alive that manual movement of the motors when switched off is recorded so once homed, they never need rehoming subsequently. I measured the repositioning accuracy of the proximity switches I use for homing in my home-built CNC router and from memory, I was getting something like 1thou, 40microns, repeatability. More than good enough for a router mainly intended for woodworking. I must get round to doing the same check on my mill, which I think might be using mechanical switches. Might be a lesson there about the desirability or not of switching it off between machining sessions. I was surprised about Step & Direction being used as a Velocity output, but it seems obvious now I think about it. Absolute servos are fine, but I think precision homing is a good solution. You'll never get precise referencing with mechanical switches. You would be lucky to get within 20 microns with the very best, probably twice that. Personally I don't think that's good enough for a metal cutting machine. It makes sense to use the Reference channel on the encoder for that. The reference switch on all the equipment I support is always just to define which reference mark to use, nothing more. I'll probably still leave the machine just paused and on overnight like I usually do on long jobs, There seems little point in turning it off and introducing an error when you don't need to. The referencing is really just of value if you're forced to shut down when you don't want to, and you're in the middle of a job. I never interrupt a finishing cut if it's 3D machining. That's because just the machine cooling down will leave a witness when it's resumed the next day.
|
|
|
Post by Roger on May 17, 2021 19:59:40 GMT
This finally arrived today, after being fleeced over £90 for VAT and import paperwork. Fortunately I can claim about £75 back since I'm VAT registered. I've added the two 16way jumpers and the power connector to check I've got those right. They've made the power input compatible with a PC power supply, but they don't use the 12V and I've already got a decent 5V supply. I'll just wire up what I've already got fitted. PC power supplies aren't the most reliable, so that's better off being left out. I've also had confirmation from JLCPCB that the PCBs are on their way, so hopefully I can get this all together soon for a test. 20210517_205231 by Georgia Montgomery, on Flickr The plan is to experiment with the new control on one axis initially, just to prove that it's set up correctly and I can get it to work. I don't want to dismantle the old system and end up with something that won't work without a lot of heartache and downtime. I've made up two interface cables between the new control board and the SureServo amplifiers, so I don't have to reconnect the old ones. Once I'm sure it's all going to work and that the spindle control is ok, I'll bite the bullet and change it all over.
|
|
|
Post by Roger on May 23, 2021 21:42:56 GMT
This is the back plate that will be attached to the cabinet with four screws. I'm tapping the holes for the standoffs so that I can use screws from the back onto which I can attach the threaded spacers without having to worry about nuts or how to hold the screws on the back. It's too big to machine all of the holes, even if I turned it sideways, so I've elected to machine the end with the most holes first. I've machined the top and both sides about half way down so that I can reference it when it's turned round... 20210523_130218 by Georgia Montgomery, on Flickr ... like this to do the other end. Here I'm having a quick sanity check to make sure the spotted holes for the PCB are going to line up. The Aluminium plate sticks out on this end to support the PCB which terminates the 9 Way 'D' connectors that come from the Linear Encoders. 20210523_132243 by Georgia Montgomery, on Flickr Hopefully the PCBs will arrive soon so I can get on with the installation.
|
|
|
Post by Roger on May 26, 2021 16:12:58 GMT
The two interface PCBs I've designed arrived today, so I've populated those and fitted them to the control. The result is a mechanically robust arrangement with the 15 and 9 way 'D' connectors being really firmly supported. So the top board on the left has connectors that go straight to each of the 4 servos. The screw connectors on the board are for the enable signal and the DC Brake connections. There are now differential 5V Step & Direction outputs that are capable of driving the optical inputs on the AC Servos. That makes for a much more robust connection than a +/-10V Analog one. It remains to be seen whether the motion controller does what they claim and this will work. The RH circuit board 2 way connector at the top is for the 5V power to the Linear Encoders. I've put a series fuse in that line on the PCB and a diode across the power rail to protect against reverse connection. The 9 way 'D' connectors come straight from the Linear Encoders. I couldn't find a 90 degree long header to make the connections, so instead I just added 5mm pitch screw connectors. The copper wires are stripped out from twin and earth mains cable. It's a bit clunky, but a lot easier than wiring it up with flexible cables. 20210526_164917 by Georgia Montgomery, on Flickr The next step is to hook it up temporarily, have a go at configuring the control, and tentatively seeing if it can take control of one axis in an open loop configuration. I have no idea how this control hangs together, so I need to feel my way slowly. Anyway, it's interesting, and a welcome break from Mechanical Engineering. If I spend too long doing one discipline, I get bored and feel the need to do something completely different.
|
|
|
Post by Roger on May 30, 2021 19:58:37 GMT
I've fitted the new Dynamotion control to the side of the cabinet so I can still leave the old one connected and functional while I grapple with configuring it. I've managed to get it to enable the drives and move both the X and A axes, so that's promising. I still need to figure out the distance it moves with each step. The software has a Step Response dialog box that lets you adjust it and also show the graph of the response if you have encoder feedbacks. That looks to be working, but I'm still in the foothills when it comes to understanding how this all hangs together. You can see the X-axis Linear Encoder at the top rear. 20210530_205015 by Georgia Montgomery, on Flickr It looks messy, but I'll tidy it up once it all works. 20210530_205022 by Georgia Montgomery, on Flickr Using these boards is a very different proposition to Mach4 or most other CNC machine controllers. Although they supply a user configurable PC based interface, the expectation is that you're going to define things that usually have default hardware assignments and are hooked up in the user interface. For example, there's no default output for Servo Enable, and no defaults for limit switches. All of the inputs and outputs are freely configurable which is fine, but it would be handy to know what most people use, and have those set up as defaults. Now, anyone with an ounce of common sense would use one of the standard screen formats, just to get things going. However, I know that if I do that, I'll never be happy with it. Even at first glance I can see that there are some really annoying things on the screen that need to go. I'm never going to use the machine in Imperial units, so it's pointless having radio buttons to select Inch/Metric. It's just an accident waiting to happen, and it's just clutter. The same thing goes for Incremental and Absolute coordinates. It's pointless having that option... who's going to use relative moves? There's also no Home button, and no code to perform the necessary actions to do that. However, there's plenty of example code that shows you how to go about these things, so clearly these are well trodden paths. It's just a pity that everyone has to laboriously learn how to implement these things when a skeleton of suitable code could already exist that would need only a little modification. Anyway, with a bit more head scratching, I ought to be able to figure out the clumsy way this needs to be modified to work the way that I want. It's going to take a few days graft though. Hopefully I'll be able to complete this before I need to use the machine again, so the next job can be done with the new setup.
|
|
|
Post by Roger on Jun 2, 2021 21:02:13 GMT
A bit more progress today, but it's painfully slow going.
Unfortunately, there's no really clear Quick Start Guide, so you're left asking questions that must seem basic and blindingly obvious once you know the system.
Basically, you set up the axes using a separate program from the main KMotionCNC program I want to use. That does make sense when you realise that this product is a general purpose one, not limited to CNC Mills and Lathes.
This KMotion program lets you set up each axis, but it's pretty clumsy to be honest. You end up with three windows open, with data being transfered between them. It would be much better to integrate the whole thing more elegantly, but I guess this was easier for the programmer. Who cares about the end user eh?
You have to find an initialisation default 'C' file that's roughly what you need and then save that with a new name. In my case, I've had to modify it to tell it to use the alternative outputs for the axis channels because I'm using the connectors on the KFLOP board for Step & Direction instead of the Analog outputs on the interface board I've bought. You also have to add an endless loop at the end to enable the drive with the right bit I've selected.
So you set up each axis in KMotion, running a Step response operation which gives a graphical output of what's going on. That only works when you've run the Initialisation program, which you just leave open while this is all being done. Each time you change the configuration parameters, you have to post them across to the 'C' file and then save it. It's pretty horrible, but it does work once you realise it's just nailed together.
Once it works moving back and forth, the saved Initialisation 'C' program is attached to the Init button inside the KMotionCNC program so it knows what to do.
What's confusing, is that even though this is using Step & Direction pulses in my case, you don't tell it what the resolution is at this stage. You just get it moving smoothly. In other words, the Step & Direction pulses are just a way to drive the Servo at a velocity and acceleration. You only set the velocity and acceleration parameters once you're inside KMotionCNC and you have the Trajectory Planner open.
Although this is all logical, it's about as far away from plug and play as you can get. Without personal assistance from their helpful guy on the Forum, you'd spend an age trying to get it to work. If you've never done any programming, you'd likely find this all very intimidating.
So at the moment, I've got it moving closed loop in the X-axis using the linear scales. I'm not convinced it correct yet, because the following error seems too big. The DROs don't zero correctly either, there's always a residual error up to 17microns, and the display shows 4 digits of mm precision, which is crazy.
I've asked another ton of questions including how to modify the 'C' program to make it home. That doesn't look too difficult, but it's far from obvious. At least I'm getting somewhere.
Watch this space!
|
|