|
Post by Roger on Jun 1, 2014 19:08:06 GMT
That's a pretty comprehensive overview of the most common way of making a machine into a CNC one. The key thing you're trying to do is to get the computer to move a linear axis to a position on command quickly and accurately. This is easier said than done because of friction and backlash. Backlash is a huge problem and as Wilf said you can spend an awful lot of money trying to reduce it. The fact remains that you always have lost motion when you reverse an axis, regardless of how much money you spend. The first thing is to reduce it as much as possible, and the next is to reduce its effect. I believe Mach3 allows you to tell the control how much backlash there is in the system. I don't know if that is correct or if it's that effective. I'll let you know when I get my system up and running. By far the best way to reduce the effects of lost motion is to use linear scales, ie to measure what you're interested in controlling and not the angle of a leadscrew. This is the achilles heel of Mach3 because it doesn't support their use.
So stepper motors are Open Loop controls ie they instruct but can't check that the correct number of steps have been executed. I've fitted AC-Servos which are very expensive and beyond the reach of most amateur conversions. Mine use an encoder to count the steps it's actually moved and will drive the servo to achieve that. The control itself still doesn't know if it's been moved so that's open loop. The servo is closed loop in that it does know that the correct number of pulses it's been asked to move have been achieved. This is why it's a better solution if you can afford it. AC Servos are also very powerful for their size so you can usually fit them straight on to the end of the leadscrew. You can say goodbye to £1000 per axis for this kind of system.
Without backlash compensation or linear scales, you are unlikely to achieve a backlash less than 25microns ie a thou. For most things it's good enough, but for precision machining a hole it probably isn't.
In my opinion, mach3 falls far short of the ideal in that it won't support linear scales and closed loop control, with linear scales in particular. It's also relying far too much on the realtime capabilities of the PC and Windows which isn't designed for such things. This is why I've been using something else that promised to deliver on both these things but has so far not been developed enough to work. One day the designer might make time to complete the project which is so nearly finished, but I'm not holding my breath. In the meantime, mach3 offers a reasonable solution that will do until something better and more accurate comes along.
|
|
|
Post by andyhigham on Jun 1, 2014 19:33:24 GMT
I was looking at some closed loop stepper systems on Zapp Automation web site. It uses a stepper motor with an encoder which feeds back into the driver. An 8A nema34 motor with encoder is about £150 and the driver is about £100. It may be a reasonable compromise
|
|
uuu
Elder Statesman
your message here...
Posts: 2,807
|
Post by uuu on Jun 1, 2014 19:49:11 GMT
By far the best way to reduce the effects of lost motion is to use linear scales, ie to measure what you're interested in controlling and not the angle of a leadscrew. This is the achilles heel of Mach3 because it doesn't support their use. I think there may be an option in Mach3 to connect up linear scales. It may be they only feed a display, not feedback into the program. I need to check this out. Wikf
|
|
|
Post by Roger on Jun 1, 2014 20:41:27 GMT
I was looking at some closed loop stepper systems on Zapp Automation web site. It uses a stepper motor with an encoder which feeds back into the driver. An 8A nema34 motor with encoder is about £150 and the driver is about £100. It may be a reasonable compromise That's worth looking into, at least it could flag up an error and halt the machine if it loses steps. I like the sound of that.
|
|
|
Post by Roger on Jun 1, 2014 20:41:54 GMT
By far the best way to reduce the effects of lost motion is to use linear scales, ie to measure what you're interested in controlling and not the angle of a leadscrew. This is the achilles heel of Mach3 because it doesn't support their use. I think there may be an option in Mach3 to connect up linear scales. It may be they only feed a display, not feedback into the program. I need to check this out. Wikf I'm pretty sure that Mach3 is only open loop.
|
|
|
Post by Doug on Jun 1, 2014 20:47:53 GMT
The biggest issue you have with lost motion and a closed loop system is oscillation a closed loop system with linear scales will not tolerate un sprung backlash
|
|
|
Post by Roger on Jun 1, 2014 21:20:49 GMT
The biggest issue you have with lost motion and a closed loop system is oscillation a closed loop system with linear scales will not tolerate un sprung backlash This is true, but it's not that difficult to arrange for preloaded anti backlash nuts on the leadscrew. All systems have to cope with lost motion, it just has to be subtly done. It does open up a can of worms for Mach3 though because there isn't the processing power to deal with issues like that. The motion control needs to be taken away from the PC and delegated to a sub system. That's what my current control does but it doesn't work properly. It's such a shame because the designer can resolve these issues if he can find the time to get back to it.
|
|
|
Post by runner42 on Jun 1, 2014 23:12:41 GMT
Hi Wilf,
thanks for that. It appears that it is possible to add CNC capability to machines that were not originally designed for that, based on the availability of after market hardware. I know that if I am sufficiently interested I could find out for myself more details on the operation of each hardware item. However, where does the digital to analogue coversion takes place - is it at the breakout board or does stepper motors work on digital signals? What positional accuracy is obtainable with stepper motors and is the system closed loop meaning when the stepper near its specified postion the drive to the motor reduces until it reaches it's position where it drops to zero?
Also is G-code the only software used in CNC machines?
PS I didn't realise that there was a page 2 and a lot more comments were added after Wilf's hardware overview.
Brian
|
|
uuu
Elder Statesman
your message here...
Posts: 2,807
|
Post by uuu on Jun 2, 2014 5:21:26 GMT
My stepper motors have 200 steps per rev. So you can work out what positional accuracy that gives you. Mine have 2 to 1 belt drves which doubles that. The motors are effectively digital. Thry have two sets of coils. Reverse the polarity of one coil set and the motor moves one step, reverse the other coil and it moves a second step. The motors remain energised at all times, so they hold station.
I don't know if there are other coding systems apart from Gcode. It does come in certain dialects, so some machines have a slightly different subset of commands. Some CAM programs will output in the various flavours.
Wilf
|
|
|
Post by Roger on Jun 2, 2014 6:53:45 GMT
Hi Brian, It's possible to apply CNC to almost any machine if you are ingenious enough. It's just a matter of arranging a low backlash drive and connecting a servo system that responds to Step and Direction signals. You can't use servo systems that use an analog input (+/-10v usually) to control them because that only controls the speed and not the position. You need closed loop feedback to the control to tell it where it is if you use that kind of system, and mach3 can't do that.
As Wilf says, you decide the resolution based on the number of steps per revolution of the motor, any belt reduction and the pitch of the leadscrew. Leadscrews can have massively different pitches, some with what looks like a slow helix. This is only possible with recirculating ball types though.
Some dedicated machine controllers such as Heidenhain have their own language which is different to G-Code but most will use g-code. If you look up g-code you'll find that it's quite a loose standard based on APT way back at the dawn of computers. Most controllers will implement a very small subset of those which are universally agreed as having the same meaning. I only use the ones for rapid movement, linear moves and setting the feedrate, so you can see that it doesn't have to be very complicated. The complex results come from computers spewing out hundreds of these simple commands to steer it round the required path.
CAM systems output in their own fundamental formats that are nothing like g-code. This output is passed on to a post processor that you select for your particular machine. There may be dozens of those. I selected the one that was the closest to what I wanted and then went into the editor supplied to change the things I didn't like. So basically, CAM programs can be used to generate a tool path which is then transformed into something you can use on your machine without further modification.
|
|
|
Post by runner42 on Jun 3, 2014 8:05:19 GMT
Thanks Roger that is very informative, CNC is a very interesting subject. One further question since you are using a PC to run the G-code program and the PC's I/O is providing the inputs to the machine, is there also an output from the breakout board to display on the PC's monitor, position data of the tool during the running of the program. If not what is being displayed?
Brian
|
|
|
Post by ejparrott on Jun 3, 2014 8:12:53 GMT
Mach3 gives you a real-time display with DRO, a visualisation of where the tool is going, plus a display of all active data and the program that is running
|
|
|
Post by Roger on Jun 3, 2014 8:40:10 GMT
Thanks Roger that is very informative, CNC is a very interesting subject. One further question since you are using a PC to run the G-code program and the PC's I/O is providing the inputs to the machine, is there also an output from the breakout board to display on the PC's monitor, position data of the tool during the running of the program. If not what is being displayed? Brian Hi Brian, I certainly find it fascinating in its own right, regardless of what it's doing. I'll expand a little more on the hardware because it might clarify a few things as well as what you're asking. As far as the PC is concerned, Mach3 or any other CNC control program is just another windows program. That windows program hooks up to the machine in much the same way as a Word document does when it outputs to a printer. In fact, Mach3 hijacks the parallel printer port (and additional ones added) on old PCs to connect to the machine. It's not convenient to wire straight to those because they are designed to plug into other dense connectors. That's one reason why Breakout Boards are used. Those allow the densely packed connections to fan out to bigger terminals that are convenient to wire to. Adding a circuit board in between the PC's output electronics and the machine opens up new possibilities such as optical isolation and other things. It's possible to add relays or transistors to boost the power to turn on things like suds pumps or spindles. Mach3 used to generate all of the pulses for the step and direction in software in the PC and this is fraught with difficulty. Windows simply isn't designed to do that but it works..... just! These days, companies like SureStepper use USB or Ethernet connected boards that bypass the use of the old printer ports that aren't fitted any more. They talk to Mach3 through those other connections and then create three pseudo printer ports so you can still use all the old legacy breakout boards. Some breakout boards combine the two together to make a neat way of plugging into the PC with a network cable. The point of the SmoothStepper is to take commands from Mach3 and generate the step and direction pulses externally in hardware. This solves most of the problems with the jittering and delay issues encountered when using the PC itself to generate those signals. So, back to your question.... From the above, you'll notice that there's no mention of the breakout board having any knowledge of the position of the machine's servos. It also has no knowledge of any graphics. The mach3 Windows program is the master in all of this and it shows the position it thinks the machine should be at, it doesn't know where it actually is! Mach3 can also show you that graphically but with the same proviso. So it's a pretty dumb system when it comes to feedback. It's quite happy to work without a machine connected because it can't tell the difference if it's there or not. This is a far cry from what we really want, but it's the best we've got for the time being. One day this other guy might get his act together and close the loop. That would be a massive improvement.
|
|
|
Post by runner42 on Jun 3, 2014 23:34:50 GMT
Thanks Roger and ejparrot.
I assume that it wont be too long with the advancement in electronics that say milling machines for the Model Engineer will have CNC capability. It will be similar to the inroads in car electronics that is currently happening. But maybe not I suspect that there is not the economy of scale in home use milling machines to justify the cost.
Brian.
|
|
|
Post by Roger on Jun 4, 2014 5:15:17 GMT
Thanks Roger and ejparrot. I assume that it wont be too long with the advancement in electronics that say milling machines for the Model Engineer will have CNC capability. It will be similar to the inroads in car electronics that is currently happening. But maybe not I suspect that there is not the economy of scale in home use milling machines to justify the cost. Brian. Hi Brian, I think machines with CNC controls will eventually come along for Model Engineers but there's still too much resistance from the 'old guard' for it to be universally accepted. Once we have a new generation who've grown up with computers coming into the hobby, they will wonder why everything has to be so unnecessarily laborious and they will adopt it. The costs are gradually coming down but the anti-backlash elements are still frighteningly expensive if you convert a larger machine. In the smaller sizes you can get away with something more rudimentary and that's where the hobby machines are likely to come from.
|
|
|
Post by Doug on Jun 4, 2014 6:48:56 GMT
the leap over to industrial CNC is quite dramatic the cutting edge setups have gone one big step further forward using digital systems that adapt to the feedback they get so rather than one feedback loop (direct scales or motor encoders) it uses both and as Roger mentioned a few posts ago the drives are becoming smart so the computer has much less to do our latest machines we are building have digital smart drives that are connected together by a fiber optic cable chain that goes back to the CPU and both the encoders go to the drive for that axis, the position encoder is also quite cleaver in that in is distance coded (it knows where it is when you turn it on) its a bit like a good caliper that you turn on and it reads the correct position. the benefits of this system are that if you get an encoder fault the system knows it is not working the positioning is also much better as you get almos no "lag" or delay in positioning. oh and it very very quick.
|
|
pault
Elder Statesman
Posts: 1,496
|
Post by pault on Jun 4, 2014 18:40:35 GMT
"oh and it very very quick." Some machines are now quoting rapid moves at 120 M/min and table accelerations of 1.5G with linear motors. I know of one machine which does 10,000 rpm to zero, change the tool and get back to 10,000 rpm in 1.7 seconds. It is getting a bit mind blowing.
|
|
|
Post by ejparrott on Jun 5, 2014 9:57:57 GMT
now that's quick.....
|
|
|
Post by sncf141r on Jun 5, 2014 12:26:53 GMT
Roger; if you want closed loop, and real time OS, go investigate LinuxCNC.
While I'm "stuck in stepper land" with my CNC machines, I do see people doing servo closed loop systems, plus many, many other very interesting things with LinuxCNC.
Just my 0.02c - JohnS.
|
|
|
Post by Roger on Jun 5, 2014 12:49:29 GMT
Roger; if you want closed loop, and real time OS, go investigate LinuxCNC. While I'm "stuck in stepper land" with my CNC machines, I do see people doing servo closed loop systems, plus many, many other very interesting things with LinuxCNC. Just my 0.02c - JohnS. It is tempting, but I think it would open up another can of worms. I need the PC to do the CAD/CAM at the machine too, so it makes sense for the whole thing to be PC based. I'll have to see how good the backlash compensation is, I've never had that and it could make quite a difference. I'm still hoping this will only be a temporary solution until the new CNC Brain comes along. That will move things into a whole new league and at a very low cost. I just need to lean on the guy a bit more and get it re-started.
|
|