Gallery, Projects and General > How do I??

How does CNC _actually_ work?

(1/4) > >>

AdeV:
OK, that might seem like an odd (and pretty wide) question.... so let me boil it down by way of a couple of examples...

Let's say I wanted to machine a straight line between the position my cutter is at now, and another position which is 10 inches away at an angle of 14.8 degrees (some nice random numbers there...)

I'm assuming that the controller figures out that for every N steps in the X-direction, there must be 1 step in the Y-direction. But how does it then apply this to the controller? Does it literally move N steps in the X-axis, then 1 step in the Y, repeat until we arrive at our destination? If N is not a whole number, presumably it keeps track of the remainder & occasionally moves 1 step in the Y axis at N-1 steps, or N+1, or whatever.

OK, so next question... This time we need to move in an arc. I can't remember exactly what my machine requires to machine an arc (in polar coords), but let's say it takes the distance around the arc, and the radius - and the start point, which is the current cutter position. I'm assuming(!) that the controller, in this case, "chops" the arc into hundreds or thousands of little straight lines, then applies the same logic as above (N X-steps, 1 Y-step, or 1-X step, N Y-steps, whatever), would that be correct?

So... my final question... but first, a bit of setup...

Imagine an upside-down "V" shaped pair of identical length arms. Linked together a bit like a pantograph, but in the vertical axis. As the angle between arm "A" and the bed changes from zero (flat) and 90 degrees (dead upright), the angle between arm "A" and arm "B" changes from 180 degrees to zero degrees. i.e. the joint between the arms is always at the exact mid-point of the distance between the arms.

With me so far? Then I shall continue...

Imagine arm "A" is mounted at the centre of a rotary table. It can be rotated between 0 and 180 degrees, where 0 points due south, and 180 points due north.

If the arms were 1 meter long, therefore, at maximum extension the far end of arm "B" would describe a semicircle some 2 meters in radius. Depending on how close in one could get, this gives us a reasonable working rectangle of 1.5 x 2.5 meters, with a little reserve left in the tank.

Anyway, assuming you've got this far.... does anyone have any idea of what the maths would be to convert that straight line, or (worse) the arc, into the 2x angles needed to drive such a contraption?



Postscript: This is the sort of thing that happens when you've got all day to yourself, and no workshop to play in... I've been following Andrew Mawson's CNC plasma adventures with much tool envy... but, with the best will in the world, I just don't have room for a flat-bed CNC plasma cutter, even a home made one. Well, unless I can hang it on the wall maybe...  So. my hyperactive mind thinks: Robot arms... if you made it compact enough, in theory it would take up very little space when "parked", and could be more or less bolted to a regular bench when in use. Yes, you still need the space when it's actually being operated; but that can usually be arranged. For storage, it all folds up and out of the way...  With this in mind, I figured if it were accurate to the nearest 1mm, that's probably close enough for plasma work; in fact, in the "distance" angle, a resolution of 0.01 degrees allows precision no worse than 0.3mm per step at the full 2m stretch. I haven't figured the rotation accuracy yet, but I'm assuming it'd be similar. This would be fairly easy to achieve using a 10:1 driver & 36-position rotary encoder. And beyond that... I haven't thought any further yet. Thought I ought to get some knowledge about how CNC systems actually work first. Hence, the question :)

awemawson:
Ade,

Cutting straight to the end of your post - GRAVITY is your issue with a vertical table - the bits need to fall away from the cut without snagging on your expensive plasma torch and breaking it. I went through this thought process when I actually HAD a professional welding hardened robotic arm, but discounted it due to Newtons Apple.

I have seen a design for a tilting table - used horizontal and folds like a Z-Bed into the upright position to take less storage space, but I suspect it wouldn't be very rigid  :scratch: You need a table that is pretty stiff and firm to cut reasonable detail.

philf:
Ade,

I assume that you're describing something like:



Any point within a 2m rad circle will have (or I think they will have) coordinates as follows:

X = 2 * A * COS(V) * COS(R)
Y = 2 * A * COS(V) * SIN(R)

You wouldn't get away with just specifying the two end points of your straight line and expecting the end of arm B to describe a straight line.

Phil.

mc:
It all depends on the controller.

Something like Mach 3 which doesn't have any kind of built in non-linear kinematics, you would need some method to generate the required G-code to generate the required motion, whereas something like a KFlop you can program to handle the non-linear kinematics internally, and simply provide it with your usual Cartesian coordinates (XYZ) for the movement.
I think LinuxCNC and Mach 4 are also able to handle non-linear kinematics, but you'd have to check.

To given an example of the KFlop doing it, here's a video of Dynomotion's Geppetto 6-axis demonstration robot-

If you run full screen, you'll see the g-code being run only contains XYZ moves. The moves get transferred to the KFlop, which then handles all the kinematic calculations before moving the required motors/axes to achieve the movement. I think the hardest part of these kind of setups is making sure the required kinematic calculations are correct, but philf has already provided the basics.

This video may be a bit more suitable for what you're thinking, but it only shows the movement, not the code being run -

PK:

--- Quote ---Something like Mach 3 which doesn't have any kind of built in non-linear kinematics,
--- End quote ---
I've used mach3 to control a mates scara arm with a grab on the end. You can key in formula that compute output positions for real axii (usually the rotary ones) based on X and Y.
Might have a pic somewhere....

Navigation

[0] Message Index

[#] Next page

Go to full version