1 Attachment(s)
Re: Acramatic 2100 retrofit
This is the I/O pinout. It looks like the original I/O card was switching a big bank of 24v socket type relays using 24v power brought in through the I/O connectors. Spent a bit of time trying to figure out how the limit and home circuit works, I had assumed they were wired in to the drives logic directly but they don't cut power with the drives powered up and ready. There is no wiring diagram in the machine manual for them unfortunately so more investigating! I have the power ready, drive ready and drive reset outputs hooked up to k-analog successfully so far.
Attachment 441768
2 Attachment(s)
Re: Acramatic 2100 retrofit
Figured out some other stuff by poking around "ProgramWare" on the A2100 control. All of the control logic resides in there, written in something that looks like BASIC, including I/O pins (though to my frustration the output side is not mapped to the physical pins, 16 of the pins are used for +- 24v inputs to the IO card). I located the main power button input pin, lube low alarm pin, the e-stop pin and some other stuff that has me scratching my head (index input?). I will try to write up the C code to make use of the primary power button and e-stop tomorrow .
New I/O pinout and the servo drive/spindle drive connections:
Attachment 442010
Attachment 442008
The servo and spindle drive connections are made via DE-15(VGA) connectors. The spindle appears to be driven via +-10v and has an encoder equivalent output. Assuming negative values are for reverse. The drive also has a synchronized motion mode, I am going to have to read the drive manuals to figure out how that works. I have a C-axis enable output pin and a C-axis acknowledge input pin in addition to spindle enable. The C axis in the control is mapped to the spindle and used in rigid tapping which I absolutely have to have working before pulling the old control out; I'm sure I will have some questions about that!
Re: Acramatic 2100 retrofit
...what zipcode are you at 45223 ?
DJ
Re: Acramatic 2100 retrofit
Quote:
Originally Posted by
machinehop5
...what zipcode are you at 45223 ?
DJ
Columbus, 43227.
Re: Acramatic 2100 retrofit
I got all of the code to emulate the way the A2100 powers up the system and handles the E-STOP, basically just went through programware on the A2100 and made kflop do the same thing in the same sequence. My X axis drifts very slowly when the physical drives get their enable signal even with no input; will have to figure that out. I have the software (motion link) for the drives so hopefully that wont be too hard to fix.
Tomorrow is wiring the limit switches. After that I can start playing with getting the servo motors moving. As the limit switches kill power to the servo motor power bus but aren't directly in the e-stop circuit I am going to have to emulate that directly for the time being, I think the placeholder code I put in will do that once I stick it in the forever loop. I have not programmed in C for a long time so this is all going to get pretty ugly before I am done!
It will be kind of cool to have 2 fully functioning controls temporarily. Just swap the DB50 I/O connectors and the DE-15 connectors from one to the other, power up and go.
This is my temporary C code to make kflop emulate the A2100 power and e-stop process. The e-stop kills the drive and spindle power directly and also feeds in to the control.
Code:
#include "KMotionDef.h"
#define ESTOP 1025
#define POWER 1024
#define PWRRDY 48
#define AXISENABLE 49
#define ZBRAKE 50
#define LUBE 52
/*#define xPos 33
#define xNeg 34
#define yPos 35
#define yNeg 36
#define zPos 37
#define zNeg 38*/
main()
{
InitAux();
AddKonnect_Aux0(0,&VirtualBits,VirtualBitsEx);
for (;;) // loop forever
{
WaitNextTimeSlice(); // execute loop once every time slice
// Handle ESTOP
if (!ReadBit(ESTOP))
{
if (ch0->Enable) DisableAxis(0); // axis still enabled? - Disable it
if (ch1->Enable) DisableAxis(1); // axis still enabled? - Disable it
if (ch2->Enable) DisableAxis(2); // axis still enabled? - Disable it
//Kill servo power
ClearBit(PWRRDY);
//Disable Physical Drive
ClearBit(AXISENABLE);
//Clear Z brake on/off? Relay is off with A2100 Control
ClearBit(ZBRAKE);
//Turn lube off, old control did this
ClearBit(LUBE);
}
if (ReadBit(POWER))
{
if(!ReadBit(PWRRDY))
{
//Turn on power to servos
SetBit(PWRRDY);
}
//enable physical axis, turn on z brake,
SetBit(AXISENABLE);
SetBit(ZBRAKE);
SetBit(LUBE);
//enable kanalog axis
}
} // end of forever loop
}
// limits to emulate A2100 limit switch process for now
// A2100 performs same process as e-stop, hold main power button and jog off limits
// to clear.
void limitKillPower()
{
int xLPos = ReadBit(xPos);
int xLNeg = ReadBit(xNeg);
int yLPos = ReadBit(yPos);
int yLNeg = ReadBit(yNeg);
int zLPos = ReadBit(zPos);
int zLNeg = ReadBit(zNeg);
if(xLPos || xLNeg || yLPos || yLNeg || zLPos || zLNeg)
{
//z brake
//disable physical drive ready
//disable drive power
}
}
Re: Acramatic 2100 retrofit
Hi cwatson1982,
Quote:
My X axis drifts very slowly when the physical drives get their enable signal even with no input; will have to figure that out.
You might read this article on drift in the wiki.
Re: Acramatic 2100 retrofit
Quote:
Originally Posted by
TomKerekes
Thanks!
Unfortunately there should be no voltage at all going to the drive at this point on the +-10v connections I think. They are still plugged in to the old control and it has no power going to it when the drift is happening :)
On that note, I'm not real sure how the original control handles servo tuning. There are parameters in the control for jerk, acceleration, etc but also values directly in the drives (which have a kind of primitive auto tune function built in to them). I played with the drive autotune once and thought my machine was going to explode!
Re: Acramatic 2100 retrofit
Hi cwatson1982,
Quote:
Unfortunately there should be no voltage at all going to the drive at this point on the +-10v connections I think. They are still plugged in to the old control and it has no power going to it when the drift is happening
Well as it says in the article analog signals are inherently imperfect so it is difficult (and unnecessary) to be able to command a speed of exactly zero. Without feedback it is better to disable the drives to assure no motion.
HTH
Re: Acramatic 2100 retrofit
I got the limit switches wired up and coded and got the X axis moving. Unfortunately the servo tuning seems like it's going to be a lot to learn. I can't raise P above .5 without very severe motor resonance even at low velocities/accelerations. At .5 I can move up to (and a bit over) the values from the old control for velocity/accel/jerk. These are relatively big servos, direct driving 10mm pitch ball screws on a box way machine with 40x20x20 travels.
Re: Acramatic 2100 retrofit
Hi cwatson1982,
If you post your settings and the plot data we might be able to help. Also your Axis resolution in counts/inch.
Re: Acramatic 2100 retrofit
Quote:
Originally Posted by
TomKerekes
Hi cwatson1982,
If you post your settings and the plot data we might be able to help. Also your Axis resolution in counts/inch.
If I got it right:
Motors are 32768 counts per revolution (8192 lines), this is what was in the a2100 configuration. The motors have resolvers but the drives have and use an encoder equivalent output.
Ballscrews are 10mm pitch so 0.3937?" per revolution and 0.000012" per encoder count?
I have:
V = 554,871 (~400IPM)
A = 5,000,000 (corresponding to 60in/s in the old control)
J = 104,857,637
P = .6, I=0, D=0
Everything else is default.
Using step over a short distance, anything above that for P causes rapid oscillation at the end of the move. Same with using "move" over a larget distance with values corresponding to 400IPM
I will see if I can get a screen grab when I get home.
2 Attachment(s)
Re: Acramatic 2100 retrofit
Re: Acramatic 2100 retrofit
Hi cwatson1982,
Use the "Move" button not the "Step" button.
Display the Output also.
Include larger moves over longer times.
Also post your Config and IIR Filter Screens.
I get 83230.72 counts per inch. If you do a move of 832307.2 does it move 10inches?
Why the odd Jerk value? Use round numbers like 50e6.
8 Attachment(s)
Re: Acramatic 2100 retrofit
Quote:
Originally Posted by
TomKerekes
Hi cwatson1982,
Use the "Move" button not the "Step" button.
Display the Output also.
Include larger moves over longer times.
Also post your Config and IIR Filter Screens.
I get 83230.72 counts per inch. If you do a move of 832307.2 does it move 10inches?
Why the odd Jerk value? Use round numbers like 50e6.
Thanks! I believe I just copied and pasted out of the calculator for the jerk value (used the old control value). The count appears to be correct with what I have available to measure with.
here are a lot of screen caps. I loaded a backup file for the drive parameters which let me get up to .75 P
P=.75
Attachment 442184
Attachment 442186
Attachment 442188
Attachment 442190
P=1.2
Attachment 442192
Position error
Attachment 442194
Attachment 442196
Attachment 442198
1 Attachment(s)
Re: Acramatic 2100 retrofit
Attachment 442200
I haven't changed anything on the IIR screen yet.
Re: Acramatic 2100 retrofit
Hi cwatson1982,
Please post the IIR Screen otherwise we have no idea what it is configured as.
If you do a move of 832307.2 does it move 10inches?
I see from your big moves of 600000 counts/sec about 60% of the output is used. So you could probably go up to 1000000 counts/sec.
The data appears somewhat noisy. If you save and attach the raw data we could zoom in and such as we wish. I suspect that is because of being based on resolvers and highly interpolated to simulate an encoder?
Overall things look reasonable for this stage so far in the tuning. You appear to be at Step 4 here.
4 Attachment(s)
Re: Acramatic 2100 retrofit
Thanks Tom.
1000000 works if I turn the error limit up to 4000, it peaks at about 1800 for output there. I picked the other value just as it was the rapid limit from the factory.
Here are the data files and the IIR screen.
Attachment 442202
1 Attachment(s)
Re: Acramatic 2100 retrofit
Hi cwatson1982,
ok no filters so far.
Encoder data actually seems smooth and clean not noisy. Some ringing either do to shock to system or borderline stable system. You might try turning down P gain a bit more to see if it is reduced. But it is small, several encoder counts ~ +/- 0.00004 inches
Attachment 442210
If you do a move of 832307.2 does it move 10inches?
6 Attachment(s)
Re: Acramatic 2100 retrofit
Quote:
Originally Posted by
TomKerekes
Hi cwatson1982,
ok no filters so far.
Encoder data actually seems smooth and clean not noisy. Some ringing either do to shock to system or borderline stable system. You might try turning down P gain a bit more to see if it is reduced. But it is small, several encoder counts ~ +/- 0.00004 inches
Attachment 442210
If you do a move of 832307.2 does it move 10inches?
Yes, it moves 10 inches. I turned P down some like you suggested. Raised D until I got resonance again and then started playing with I and VFF. I also added the 2nd order low pass filter per the documentation.
I'm not real sure if this is "good" or not but it's as little position error as I could get while keeping slow motion smooth and not having the system start oscillating. Any higher "I" and it seems good at max velocity but feels very rough at slow speeds. I'm not real sure what kind of position error I should be aiming for as I don't really have any kind of reference. I didn't try to get anything too much higher as the machine can get pretty aggressive when oscillating starts.
Attachment 442258
Attachment 442260
Attachment 442262
Attachment 442264
1 Attachment(s)
Re: Acramatic 2100 retrofit
2 Attachment(s)
Re: Acramatic 2100 retrofit
Hi cwatson1982,
Quote:
Yes, it moves 10 inches
Good now we know the resolution is 83230.72 counts per inch. This can be use to relate errors in counts to errors in inches.
Quote:
Any higher "I" and it seems good at max velocity but feels very rough at slow speeds.
Yes always reduce gains to have smooth stable motion.
Quote:
I'm not real sure what kind of position error I should be aiming for as I don't really have any kind of reference
Use the resolution to relate errors in counts to errors in inches (divide by cpi).
Quote:
I didn't try to get anything too much higher as the machine can get pretty aggressive when oscillating starts.
Now that you have reasonable following you might reduce Max Following Error so that instability will cause the axis to simply disable before becoming too violent.
Your Acceleration setting is crazy high. 60e6 cnts/sec2 / 83230.72 cnts/in = 721 in/sec2 or almost 2G !
However with the Jerk setting of 105e6 cnts/sec3 the acceleration ramps up at a somewhat gradual rate and after ~0.1sec the acceleration reaches ~10e6 cnts/sec2 (123 in/sec2 or 0.32G) it must begin ramping down in order to prevent exceeding the max allowed velocity of 1e6 cnts/sec. So there is no move where the Acceleration limit will ever come into play. Its all pure Jerk limited motion.
A car analogy would be you are told to very gradually depress and release the accelerator and also not to exceed 40mph. After depressing the accelerator like an inch over several seconds, and at 20mph, you must begin gradually releasing the accelerator to avoid exceeding 40mph even though it may be possible to depress the accelerator 6 inches.
Here is an error plot of the large ~5 inch move:
Attachment 442306
Errors are within +/-30 counts or +/- 0.4 thousands of an inch. Probably not bad for a large (5inch), fast (720ipm), aggressive (0.3G) move.
There is some ringing at ~40Hz at the start of the move:
Attachment 442308
Since it happens at the beginning of the move and not at the end this would point to something mechanical and non-linear like stiction. Probably too fast to be corrected by the feedback. So you may need to reduce Acceleration and Jerk to balance performance vs shocking the mechanics depending on your application and requirements.
HTH
Re: Acramatic 2100 retrofit
Quote:
Originally Posted by
TomKerekes
Hi cwatson1982,
Good now we know the resolution is 83230.72 counts per inch. This can be use to relate errors in counts to errors in inches.
Yes always reduce gains to have smooth stable motion.
Use the resolution to relate errors in counts to errors in inches (divide by cpi).
Now that you have reasonable following you might reduce Max Following Error so that instability will cause the axis to simply disable before becoming too violent.
Your Acceleration setting is crazy high. 60e6 cnts/sec2 / 83230.72 cnts/in = 721 in/sec2 or almost 2G !
However with the Jerk setting of 105e6 cnts/sec3 the acceleration ramps up at a somewhat gradual rate and after ~0.1sec the acceleration reaches ~10e6 cnts/sec2 (123 in/sec2 or 0.32G) it must begin ramping down in order to prevent exceeding the max allowed velocity of 1e6 cnts/sec. So there is no move where the Acceleration limit will ever come into play. Its all pure Jerk limited motion.
A car analogy would be you are told to very gradually depress and release the accelerator and also not to exceed 40mph. After depressing the accelerator like an inch over several seconds, and at 20mph, you must begin gradually releasing the accelerator to avoid exceeding 40mph even though it may be possible to depress the accelerator 6 inches.
Here is an error plot of the large ~5 inch move:
Attachment 442306
Errors are within +/-30 counts or +/- 0.4 thousands of an inch. Probably not bad for a large (5inch), fast (720ipm), aggressive (0.3G) move.
There is some ringing at ~40Hz at the start of the move:
Attachment 442308
Since it happens at the beginning of the move and not at the end this would point to something mechanical and non-linear like stiction. Probably too fast to be corrected by the feedback. So you may need to reduce Acceleration and Jerk to balance performance vs shocking the mechanics depending on your application and requirements.
HTH
Thanks again Tom!
I tweaked everything a little more today, including lowering accel and got it smoother at lower speeds with a little less error. I can still feel the servoing a bit more than the old control at ~2-3ipm but I am going to work on getting the Y and Z going and see how coordinated movement feels then adjust from there. I added a little dead band temporarily which seemed to smooth things out at lower speeds considerably without introducing any more position error. (can see the amplitude of the error oscillation shrink about half with dead band at 1-2 range and .25 gain)
The machine has always suffered from some level of stick slip.
I really appreciate the help, I have never tuned servos before and there is a lot to learn + experiment with.
Re: Acramatic 2100 retrofit
Put on hold temporarily; I discovered my X ball screw had dropped 2 return plugs :) going to have to fix it before I make any more headway.
Re: Acramatic 2100 retrofit
I got finally got the X ballnut fixed. The adhesive that was used to hold in the return "plugs" failed on 3 of the 8 circuits and dropped the balls in the saddle. Got it all re-packed and moving again. While I was waiting for things to show up for that I got the spindle moving which was fairly straight forward. It's controlled by +-10v and used to run open loop unless orienting or tapping on the old control. I currently have it set up to run closed loop all the time. Low P and some VFF did the trick. Accel and velocity were converted from degrees a second to counts a second from the old control. I tuned jerk by feel and timing when stopping.
I did some reading on tuning position loops with velocity loops and am probably going to play with the x axis a little more before moving on.