What is a cam/Cam/CAM?

Look at Ron's example. How would you keep the feed speed constant? Ron's cam table shows places were the speed increases rapidly. This is because the x scale is indexing at a constant rate.

Another example. An operator has a teaching pendent. He can jog the three axes, x, y, and z to different points and then hit enter. The motion controller will save the points but what is the distance in time between the points? The operator doesn't have control of the speed between points. What ensures that the speed between the points is constant and at the desired speed?


The answer to both queries is (by) controlling the rate of change of M, the master index, i.e. dM/dt:
dx/dM, dy/dM, and dz/dM are all known as a function of M,
and
speed = |dV/dt| = sqrt((dx/dM dM/dt)**2 + (dy/dM dM/dt)**2 + (dz/dM dM/dt)**2)
where V = vector with Cartesian components [x,y,z].


Solve for dM/dt:
dM/dt = Target_speed / sqrt(dx/dM**2 + dy/dM**2 + dz/dM**2)
I thought that was obvious. The rest is bookkeeping (mostly multiplying by unity) and dealing with divby0 events.
 
Last edited:
Actually a better solution would be to generate the x(M), y(M), and z(M) profiles to generate constant velocity magnitude (speed) for fixed dM/dt, then any constant dM/dt rate will generate a constant speed profile in 3-D.

It could even use the inverse square root hack for speed (modified here slightly):

Code:
float Q_rsqrt( float number )         // Calculate 1/sqrt(number)
{
  long i;
  float x2, y;
  const float th = 1.5F;              // three halves
  x2 = number * 0.5F;
  y  = number;
  i  = * ( long * ) &y;               // evil floating point bit level hacking
  i  = 0x5f3759df - ( i >> 1 );       // what the ...?
  y  = * ( float * ) &i;
  return y * ( th - ( x2 * y * y ) ); // 1st iter and out
} 
//y  = y * ( th - ( x2 * y * y ) );   // 1st iter
//y  = y * ( th - ( x2 * y * y ) );   // 2nd iter; disabled
//return y;
 
I see you found the square root hack. We use that. However, we do the extra iterations to get more precision.
I verified the magic number by trying many magic numbers to see which one works best over a range of numbers to take the square root of.

My feed speed example only shows the velocity. Actually the chain rule must be used because the master position, velocity and acceleration are necessary for computing feed forwards for the slave. Many motion controllers only gear to the master position so there is no feed forwards for the slave.
 

Similar Topics

Hello all, I'm looking for ideas or solutions on having a industrial webcam or IP camera that we could use on our equipment to help monitor and...
Replies
4
Views
1,183
Kindly, I was trying to use the Motion Arm Output Cam (MAOC) instruction on a Rockwell plc, but I need to have it in a general AOI function. So, I...
Replies
1
Views
1,009
If a polynomial is used in a cam-profile for motion control, you normally have the option to displace the inflection point from the standard 0.5...
Replies
1
Views
1,417
I have submitted this tread to a magazine and it got rejected by the editor that obviously has never done motion or used cam tables.
Replies
6
Views
2,089
Hello to everyone. There is an inductive sensor to control the angle on the "Balluff bsw 819" rotary cam switch in a 1000 ton mechanical press...
Replies
0
Views
1,113
Back
Top Bottom