Vous êtes sur la page 1sur 11

27.09.

2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Software

Blog

Cookbooks

DIY CNC

Projects

About

Search for: Search

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1
Dec 23, 2011 // by Bob Warfield // Blog, Products, Softw are, Techniques // 12 Comments

Subscribe
Get our latest blog posts delivered 0 to your email inbox once a week for free. Email Subscribe

Many a forum post has carried the derisive view that Mach3 cant be an industrial grade control because you cant build industrial grade on top of Microsoft Windows. The logic goes on to say that because Windows is not a real time operating system, itll never be able to do industrial grade work. There are various other arguments against Mach3, such as the idea that the servo closed loop isnt accessible to Mach3, but the big issue is the real time operating system issue. How severe is this criticism of Mach3 and Windows? It turns out the idea that an industrial grade CNC controller cant be built on top of Windows is false. We can dispense with that objection right away with an existence proof. Consider the Siemens A2100 control, used on machines like the Cincinnati Arrow. Some say it was one of the best CNC controllers ever made, but whether you agree with that assessment or not, it was clearly an industrial grade controller, and it was based on Windows NT. There are many other examples of industrial grade CNC controls based on Windows. How did they manage to get great results despite Windows and whats the deal with Mach3?

Tw eet

Share

5
Like

1
0

Featured
CADCAM Wizard 10 TIps for Router Aluminum Cutting G-Code Tutorial Coupons, Sales, and Special Deals 5 Steps to Evaluating VMC Performance

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

1/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Designing Parts for Easier Manufacture Easy to Use 3D CAM Package Best Cut Depth and Width for Pocketing

The key answer in both cases is that they separated the functions of low level motion control and the user interface and g-code interpreter. Look at a CNC controller as consisting of 3 layers:

Popular
10 Tips for CNC Router Aluminum Cutting Success MIT Students Create Hand-Held CNC Router: You Gotta See This! 10 Things Beginning CNC Milling Machine Users Need to Succeed Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 2 CNCd Art From Old CDs and DVDs Fixturing with Vacuum Tables, Vacuum Chucks, and Vacuum Clamping Systems Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 CNC Router Cutter Types and How to Use Them Small Injection Molding Machine: Morgan Press CNC Control Market Shares: What Are the Most Popular Controls?

Comments
Bill Blackburn on New Machine Day: Tormach CNC Lathe BarnabyK on The Art and Craftsmanship of Zeamon Ken Strauss on Expanding Studs for Fixturing Bob Warfield on G75 and Peck Parting Off For Lathes Bob Warfield on New Machine Day: Tormach CNC Lathe At the top level is the human interface, the part that talks to the operator through the control panel. The middle level is the g-code interpreter. Give it a block of g-code (uploaded by the User Interface through a USB key, serial feed, or other means), and it knows how to convert that g-code into simple motions. Those simple motions go to the motion control portion of the program which is responsible for converting the simple motions into driver control signals. For example, if you want to X0Y0Z0 and the machine is at X1Y0Z0, the X-axis has to move -1 to get to 0. Lets say your machine moves in 0.0005 steps. It then has to move 1 / 0.0005 = 2000 steps in the correct direction.
2/11

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Categories
3D Printing (33) Beginner (100) Blog (676) Business (70) CNC Projects (128) CNC Router (31) Cool (161) DIY CNC (32) FeedsSpeeds (59) GCode (62) Guest-Post (10) Manual (9) Manufacturing (9) Products (58) Software (205) Techniques (246)

Lets look at how this works with vanilla Mach3, running with a parallel port. What that means is the Mach3 software must generate a smooth series of 2000 pulses on a parallel port pin to accomplish that motion. If we want to move at 100 IPM, which is not very fast by industrial standards, we have to produce those 2000 pulses in 0.6 seconds. For each pulse, we only have 0.0003 seconds to get the job done. Put another way, we need to move at 3,333 pulses per second. It turns out Mach3 can pulse up to 6 axes at whatever the kernel speed allows, but Mach has to do more than a few unnatural acts to pull that off. Any minor interruption or distraction for the computer, may result in a brief pause between sets of the pulses. It turns out that Mach processes groups of buffered pulse requests. For example, it may have 5 requests that each ask for 0 to 5 pulses, depending on whether the axis is maintaining speed, slowing down, or accelerating. Lets say we have perhaps 25 pulses from 5 requests of 5 each. If, instead of getting a following on request for 25 pulses, that follow on is lost, it may take a whole new kernel timer cycle before the pulses are delivered. In the meanwhile, its as though the lost cycle had instead been heard but requested the axis to slam on the breaks to 0 speed. On average, we got 25 pulses instead of 50, so we ran a lot slower, but the acceleration/deceleration makes it that much worse. Imagine trying to cut smoothly and with good surface finish if you command your cutter to move 1 at 100 IPM, but at 2 points during the move it actually slows down to 33 IPM. Things are not quite that bad because we have inertia to smooth it out and the axis doesnt start and stop instantaneously, but you can start to understand the problem here. A so-called real-time operating system, which Windows is not, has the capacity to put out a do not disturb sign during critical operations. If it was making that 1 move, it might very well want to be left alone to finish that task in perfect timing and at exactly the right speed. The problems of distracting the controller, resulting in poor surface finish or even worse problems, can be compounded because Mach3 runs on a general purpose Windows PC. The owner may have installed all sorts of other software on the machine. They might be running

Meta
Log in Entries RSS Comments RSS WordPress.org

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

3/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

the MP3 player so they have music while theyre machining. There are a number of factors that can cause one of these timer ticks to be disturbed including: - Multimedia Software. Im told Quicktime is a known offender. - DMA. If your machine accesses disk too much, it interferes as the disk takes control of data transfer through a process called Direct Memory Access. - Normal OS operations can also disable the interrupts involved from time to time. - Lots of other kinds of software. For this reason, you frequently see recommendations not to connect a Mach3 PC to the Internet, not to allow any extraneous software onto the controller machine, and so on. This is a pity, because it is almost entirely due to the parallel ports limitations and we can work around those as we shall see in a moment. Personally, I hate the idea of being cut off from the Internet in my shop. Theres just too much useful information to be had there that I can use in my work. How do the Industrial Grade Controllers get around this problem? The answer is pretty simple. They move those parts of the software that are sensitive to these timing issues to another piece of hardware. Imagine a configuration like this:

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

4/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Now we have a separation of tasks that forms an assembly line. As the Windows PC finishes converting each g-code line to some sort of motion commands, it hands them off to the Motion Control Board and goes on to the next line. The Motion Control board is a piece of dedicated hardware whose sole purpose is converting motions to driver control signals. It cant really be interrupted because it doesnt do anything else, which is great in terms of providing smoother and higher speed motion. The G-Code Interpreter is happier too. It takes a fair amount of machine cycles to produce all those motion control pulses smoothly. By handing that task off to another piece of hardware, the G-Code Interpreter finds more time to do a better job itself. Whether thats simply processing g-codes faster, or using the time for
blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/ 5/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

more sophisticated look-ahead and trajectory planning is a function of the controller, but the important thing is that more time is available. Having this 2-part architecture is the secret sauce in creating an industrial grade CNC control from Microsoft Windows. It isnt the only secret sauce, but it is an extremely important starting point. Is it hard to use a Motion Control Board with Mach3 instead of the Parallel Port? Is it worth it? It turns out to be pretty easy to use a Motion Control Board with Mach3, and it is well worth the effort. In Part 2 of this series, well take a look at some of the Motion Control Boards that are available and well also talk about the results. *** This article is slightly revised from the original version. I benefited greatly from a generous side conversation with Henrik Olsson, who gave me quite a lot of additional information and even took the trouble to hook his logic analyzer up in order to prove that Mach3 can pulse 6 axes as easily as it pulses 1. Thank s Henrik !

You may also like -

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 2 Our first article in this series discussed how using Window s to solve all of the CNC Controller problem suffers because Window s is not a ...

3D Printing 101: Part 3: Electronics This w eek's 3D Printing 101 post focuses on the electronics aspect of 3D printers. The electronics required for motion control w ill be familiar to ...

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

6/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Want to use a Sm oothstepper and Servos for your CNC project? Due to a query from a customer, I put together a quick page that show s how I set up my CNC4PC boards and Smoothstepper ...

CNC Control Market Shares: What Are the Most Popular Controls? As of this morning, w e have 200 responses to our CNC Control Survey. While w e're picking up some new controls here and there, the ...

Welcom e to Gearotic Motion This is a guest blog post by Art Fenerty, father of Mach3 and now the Gearotic Motion softw are. I asked Art to tell us ...

12 Comments
Motion Control Boards Take Reply Mach3 From Hobby Class to Industrial Grade, Part 2 CNCCookbook 2011/12/24 at 8:49
pm

[...] to read a random CNCCookbook post Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 [...]

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

7/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Motion Control Boards Take Reply Mach3 From Hobby Class to Industrial Grade, Part 2 CNCCookbook 2011/12/24 at 8:49
pm

[...] to read a random CNCCookbook post Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 [...]

Quite surprised at how little Reply discussion is here... - Page 2 - CNCzone.com-The Largest Machinist Community on the net! 2011/12/27 at 5:21 pm
[...] [...]

Quite surprised at how little Reply discussion is here... - Page 2 - CNCzone.com-The Largest Machinist Community on the net! 2011/12/27 at 5:21 pm
[...] [...]

Why should i use EMC over Reply Mach3 - Page 5 CNCzone.com-The Largest Machinist Community on the net! 2011/12/28 at 12:01 am
[...] [...]

Why should i use EMC over Reply Mach3 - Page 5 CNCzone.com-The Largest Machinist Community on the net! 2011/12/28 at 12:01 am
[...] [...]

Why Doesnt My CNC Reply Machine Move the Cutter Where I Told It To?!?? CNCCookbook CNC Blog CNCCookbook CNC Blog
blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/ 8/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

2012/02/12 at 2:05 pm

[...] And, theyre going to try to operate by generating pulses via the parallel port unless a separate hardware motion control solution is being used. Mach3 uses a ring buffer which it fills with velocity commands for each axis. [...]

Want to use a Reply Smoothstepper and Servos for your CNC project? CNCCookbook CNC Blog CNCCookbook CNC Blog
2012/03/12 at 7:41 pm

[...] youre curious about how something like this helps, see my articles on motion control boards for use with Mach3. Share this:FacebookEmail [+] Share & Bookmark Twitter StumbleUpon [...]

Hardware Pulse Board for Reply CNC | The Hobbyist's Machine Shop Blog
2012/03/22 at 1:19 pm

[...] I am now doing very small almost micro-machining I am becoming more concerned about accuracy. Several articles in the CNCCookbook blog by Bob Warfield got me to thinking. Read both parts written by [...]

The Top 25 Pages People Reply Come to CNCCookbook to Read CNCCookbook CNC Blog CNCCookbook CNC Blog 2012/05/16 at 11:06 am
[...] Boards: A two-part series on how to get your PC talking to your CNC machine. My 2-part series on Motion Control boards was also extremely popular on the blog for extra [...]

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

9/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Dealings with Mach Moton? Reply


2012/05/20 at 7:15 am

[...] [...]

Step and Servo Motor Sizing Reply Software for CNC CNCCookbook CNC Blog CNCCookbook CNC Blog
2012/05/20 at 5:11 pm

[...] port. Above a certain pulse speed, its hard to get reliable motion unless you have a motion control board, such as a Smoothstepper. If this number is higher than what Mach3 reports as your maximum reliable parallel port speed, [...]

Leave a comment
Name (required)

Mail (will not be published) (required)

Website

Comment

POST COMMENT

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

10/11

27.09.2013

Motion Control Boards Take Mach3 From Hobby Class to Industrial Grade, Part 1 - CNCCookbook CNC Blog CNCCookbook CNC Blog

Notify me of follow-up comments by email. Notify me of new posts by email.

Home Software GW Calculator GW Editor Gearotic Conversational Deals and Steals

CNC Blog Software Techniques Beginner Cool Projects

Cookbooks Feeds and Speeds G-Code Tutorial CNC Machining & Manufacturing DIY CNC Cookbook CNC Dictionary

CNC Projects

Resources Machinist's Search Videos Online Groups

Workshop Hall of Fame Organization: Soon!

About Individuals Customers Reference Data Books CNC Dictionary Suppliers Tool Brands All material 2010-2012, CNCCookbook, Inc. Partners Our History Privacy Policy

blog.cnccookbook.com/2011/12/23/motion-control-boards-take-mach3-from-hobby-class-to-industrial-grade-part-1/

11/11

Vous aimerez peut-être aussi