5i25/7i77 config - servos won't jog

More
27 May 2014 06:24 #47371 by green751
Hi, all;

I've been re-working my servo system for a few months using different drives and my new control PC. I'm doing this on a Lagunmatic mill with Ubuntu 10.04 installed from the live CD downloaded from here. Control PC is a GA-E350N with a Mesa 5i25/7i77 combo kit installed. Drives are Aerotech BA20 set up in torque mode using +/- 10V command input (differential).

I'm having some difficulty getting the axes to move in linuxcnc. I've been working on getting the current git master to run, but I've also checked this in 2.5.4 and get the same behavior.

I have them working (and going correct directions) in open loop test in pncconf. I also see feedback from the encoders in the same test, and when I manually move the axes in Linuxcnc I see the encoder counts increase/decrease appropriately. The wiring seems ok, encoders return counts, and the axes are where I think they are.

When I try to start up linuxcnc and jog, the axis I'm trying doesn't move (tried all 3). I just get a following error.

I went through and checked the HAL setup in the running config and it looked ok, everything seems to be connected. I'll attach a zip file (renamed to .bin) with a simple test config (only servo control and home switches included) in case anyone has time to look it over.

One thing I did notice is that in the open loop test I could select the lower value for "slow" movement and get little/no motion one direction and none the other. If I upped the value from the default 0.5 to 0.9 or so it started to move when commanded. The "fast" value always worked.

I suspect this means that the mesa cards are outputting a voltage for jog movement in linuxcnc that's too small to move the axis, IE the drives correctly output a proportional current but the torque produced isn't enough to actually move anything. I did check the trim pots on the drives and they're set to max scale, full -/+ 10 volts.

My questions are:

1) Is this (attached) config ok? I've stared at it long enough that I can't tell any more.. it looks ok from what I can see.

2) Should I try to calibrate the voltage output of the mesa cards to match the servo drives' input scale, or should I look at tuning the PID loop to see if I can get motion to be normal?. Right now I'm using a tiny gain (P) term, not sure it would be enough to get things moving.

Thanks,
Erik

Please Log in or Create an account to join the conversation.

More
27 May 2014 06:46 - 27 May 2014 06:59 #47372 by PCW
This is pretty much expected behavior in torque mode.

You may need 10% of full torque to even break stiction so a lot of
P term (and D term) is needed.

Torque mode drive tuning is quite different than velocity mode drive tuning
(and generally more difficult)

For a torque mode drive, I would run the servo thread as fast as you can since linuxCNC is now running the velocity control part of the position loop

(2 KHz might be possible with the GA350E 4 or 5 KHz is possible with faster CPUs)

Then for starting PID settings I would follow this procedure:

I would add as much D term as you can get until oscillations set in
then use about 1//2 of that value

I would then do the same for P

Then I would add FF2 to tune out the undershoot during accel and overshoot during decel

Finally I would add I until the system becomes unstable

beware: large low frequency oscillations will occur

Then I would reduce the I value to about 1/4 of the value at which oscillations started
Last edit: 27 May 2014 06:59 by PCW.

Please Log in or Create an account to join the conversation.

More
27 May 2014 07:51 #47374 by green751
Okay, thanks.... it's good to know I'm not completely off base and that this is expected.

I'll do some research into torque mode tuning tomorrow, too. With a little luck I can get up and running on this hardware soon... got lots of things to make :)

Erik

Please Log in or Create an account to join the conversation.

More
28 May 2014 08:36 #47430 by green751
Just wanted to report back... I did after some tweaking get reasonable jog motions out of my new setup.. I'm excited to have this working again :)

I did need to remember way back during my initial configuration that some of the initial values from PNCconf are very conservative and others just didn't work with the values I'd been trying. I think I also found a typo/wrong variable in the INI, where pncconf had put MAX_LINEAR_VELOCITY in the [traj] section instead of MAX_VELOCITY... or maybe that's been changed in master to the new name.

Part of the problem with the X axis is that it has/had an intermittent failure somewhere.. a loose connection, maybe. Y and Z jogged nicely but the encoder scales were reversed from what I thought they were... once I added a "-" to the scales they jogged more or less flawlessly. Once I checked/wiggled wires X started working.. oddly, it does not have the encoder scale reversed.

Right now I'm limiting velocity/acceleration on each axis to small numbers (20/2) while I get things working, then I'll do some more tuning.

Next up is figuring out why my home switches aren't working... I think I need a tutorial on the modes the 7i77 card can be put in, I suspect right now I've got an MPG input set up where I'd wired the homes into the board.

Erik

Please Log in or Create an account to join the conversation.

More
28 May 2014 11:19 #47436 by PCW

Next up is figuring out why my home switches aren't working... I think I need a tutorial on the modes the 7i77 card can be put in, I suspect right now I've got an MPG input set up where I'd wired the homes into the board.


The 7I77 I/O modes do not affect the input pins. That is, if you enable
the MPGs or analog inputs, the digital inputs still work normally

Please Log in or Create an account to join the conversation.

More
29 May 2014 02:21 #47478 by green751
Ah, okay. I went from memory when I did my recent HAL file, and I thought for some reason I had wired the home switches on the first three inputs.

Looking at the manual now I see I've got them on inputs 8-10 on TB8, so right now LinuxCNC is looking in the wrong place for them, which is why they don't work :)

Please Log in or Create an account to join the conversation.

More
02 Jun 2014 09:53 #47612 by green751
So.. I've made a lot of progress.

But I wanted to publicly post the most difficult thing I ran into... my own carelessness.

I spent about two days trying to figure out why, when I could move the axes on command, I couldn't get them to limit following error to some reasonable number. I edited the ini file to give me up to 6 inches of following error without faulting out just so I could investigate.

I didn't find much, just two things. First, I re-checked the calculations I did for encoder scale and found out I was off by a few digits for X and Y.

Second, I had specified maximum velocity for each axis in terms of inches (machine units) per minute instead of per second. So effectively I was telling the mill the max speed it could travel on the X axis was as much as 1000 feet per minute.. a bit fast.

I wanted to mention this here so it's searchable for other people to find. Usually when motion parameters for milling machines are discussed in both advertising brochures and manuals they list the max rapid IPM in terms of inches per minute. LinuxCNC uses inches per second for consistency (I'm guessing) throughout the config files.

Even though this is the second time I've written up a running configuration for LinuxCNC and even thought I read through the docs on the INI file about 5 times this go-around it didn't click that the units I was using were wrong.

So, if anyone out there can't get their machine to home without getting following error faults and changing PID values doesn't seem to help, double check the max velocity in your INI file for your axes. It should be in terms of inches per second.

Now that I've got my INI corrected I'm seeing following errors on the order of 5 tenths on slow moves and 15 to 20 tenths on rapids. Max rapid speed is currently about 180 ipm. Time for some servo tuning.

For the record, I'm using a git pull of master as of 6/1/2014 compiled on an Ubuntu 10.04 install off of the downloaded live CD. I've got three 100 volt 40 amp servos running on Aerotech BA20 servo drives and AMT102V encoders in torque mode using a 4khz servo thread.

Erik

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.160 seconds
Powered by Kunena Forum