Schaublin 125-CNC retrofit.

More
11 Dec 2022 16:50 #259199 by RotarySMP
I need some help here guys please. I can't get my drives well tuned. Wout did a couple of calls with me to help me out, which has led me to a better understand the problem.

I am running JMC drives in analog mode.

There are some good videos out there on how to tune them in step/dir, but it seems no one else is using these in analog mode. There is a software provided by JMC to assist in tuning, which has a built in oscilloscope. This brings me to my problem:

The JMC software offers only a limited number of parameters you can select to graph on the osci.  The selection more limited in analog mode. In step/dir you can graph the following error. In analog mode you can't. There appears to be no parameter which I can graph which displays the following error in analog mode.  I contacted JMC, and they came straight back with "what is FError?", and when I explained I need a following error value, they have not replied since.

At one level, I can graph following error in LinuxCNC, but then I am limited to the 1kHz servo thread. It appears that the internal torque/velocity loops are closed in the JMC driver at 6kHz. The guidance I got from Wout is that I need to tune that higher frequency control loop first, before trying to tune the LCNC loop wrapped around it.

The best idea I can come up with to tune the JMC's torque/velocity loop, would be to make up a cable, temporarily set up a single axis of step/dir open loop control from LinuxCNC to the JMC driver/servo system in position mode, and one at a time tune my drives for the reflected inertia. Only once the drives are tuned on open loop STEP/Dir position mode,  then I can reconnect them to the current INI, switch them to analog mode, keeping the same tuning setting internally, and tune the LinuxCNC position loop at 1kHz using the LCNC Halscope.

Or is this a dumb idea? If I understand the cringlisch manual (I really understand much of it), it would seem that the internal values for certain parameters are simply ignored in analog mode, but that the others  would be retained as tuned.

To do this,  I would need a channel of Step/Dir. I am running MESA 7i92 -P2-> 7i85, then SS to 7i83, 7i84, 7i73 on this machine. It looks like I will need to flash my 7i92 with the G540X2D bitfile to activate stepgens, and then wire into P2.
Is there an easier way of doing this, where I don't have to upset my existing wiring by removing the 7i85? So I could access a Stepgen on P1, the 26 pin header of the 7i92?

I would appreciate any suggestions you have. If my whole idea is crap, and there is a better way of doing this, I am all ears.
Thanks,
Mark
ps. I still haven't gotten back to the Lathe macro installation. I dicked around with a couple of other things for the last couple of weeks, as my videos show :/

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

More
11 Dec 2022 17:28 #259202 by spumco
Replied by spumco on topic Schaublin 125-CNC retrofit.
Mark,

Not a drive tuning expert, but is there a function in the JMC software that allows you to directly run the motors (i.e. through RS-232 or 485)? Might be able to tune the internal loop that way and not have to rig up a temporary S&D config through LCNC.

Switch the drive to S&D mode so you can see the internal FError (but command via JMC software), tune internally, then switch to analog and do the outer LCNC loop...?  Just spitballing here.

-Ralph
The following user(s) said Thank You: RotarySMP

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

More
11 Dec 2022 17:42 #259204 by andypugh
Maybe you can set up a very simple config using on a Mesa encoder to measure the position and a siggen to create a command signal, and run that in a 6kHz thread?
The following user(s) said Thank You: RotarySMP

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

More
11 Dec 2022 17:44 #259205 by smc.collins
graph servo analog out in hal scope, open the calibration feature in axis etc. turn the P setting to zero , set ff1 to 1 make sure the other ff settings are zero. 

there 2 potential issues, 1 is gain is to high or low " most likely culprit" or the servo dampening is wrong, usually excessive from my experience. I'd suggest turning down the servo dampening to nearly ZERO, if you start to see oscillation in the motor, turn it back up, that is with ZERO commanded voltage from the mesa card and servo output and the motor in a holding position. Now, put a slight load on the servo motor until it can fight back and hold position. 

I assume your encoders go directly to your drives, so I doubt this is a tach gain issue. 

once you get your dampening settled, no oscillation even when holding TQ with the drive enabled with zero voltage commanded, connect the spindle servo out from the mesa card again, and start tuning gain.  use the jog function to traverse the drive with the carriage load on it. you should see nice square signal edges in your hal scope trace, if you don't, here's where to start. If you sea big spike on the left of the trace, then it ramps down and slowly levels off, the gain is to low, if you see a big oscillation and a ramp trending up, left to right, the gain is to high. I'd start at say 30 ipm, and jog, aggresively, then bump to 50ipm, then 100 ipm etc, each time matching the gain so that the drive output voltage looks like a nice sharp square tooth on both edges with a flat Vout once the acceleration is completed. The accel curve obviously will vary with each drive etc, but I'd expect to see a nice 45-80* climb up and down, near vertical to the held motion voltage. 

while not your drive, they do have a section about adjusting gain and compensation. and the patterns of response are representative of the behavior you need to see from the servo Vout from linuxCNC. I got my drives for 600 ipm using this method, with old brushed DC permanent magnet motors. YMMV 

www.glentek.com/download/smb7230-smb7275-smb72100-rev-c-manual/
 
The following user(s) said Thank You: RotarySMP

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

More
11 Dec 2022 18:44 #259209 by RotarySMP
There should be a way to have it jog back and forwards from within the drive. I tried to program that, bit could not get it to work. That would have been the easiest solution by far. Thanks for reminding me, I will try contacting JMC again, and ask about that function.

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

More
11 Dec 2022 18:46 #259210 by RotarySMP
Thanks for that. You packed a lot of info in there. I will try this first, and see if I can follow it all.
The following user(s) said Thank You: smc.collins

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

More
11 Dec 2022 18:59 - 11 Dec 2022 19:03 #259211 by smc.collins
the issue isn't the drive tuning per say, it's the relationship between what Lcnc is commanding and the drive is giving. That's what watching the Vout to the servo is so helpful. If it isn't generating nice square looking signals, it's obviously adapting, so turning the P down to say 2 or 6 something really low really helps to exagerate the problem in a nice visible way. look towards the bottom of that pdf, they give a nice example of what to look for, under and overshoot, dampened etc.

this is out of my INI file. bring the drive to Lcnc, don't try to pid tune around a gain problem. My machine runs 600ipm rapids 400ipm working with zero following issues. 

X and Z are identical

TYPE = LINEAR
HOME = 16.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 10.00
MAX_ACCELERATION = 40.00

P = 2.5
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0

 
Last edit: 11 Dec 2022 19:03 by smc.collins.

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

More
11 Dec 2022 20:07 #259214 by mwc
Replied by mwc on topic Schaublin 125-CNC retrofit.
Just to clarify, with any drive in Analogue mode, the drive is completely unaware of following error, which is why it doesn't get shown in any tuning software.
In Analogue mode, the drive only receives a voltage signal from the controller, and it only uses the encoder feedback as a modern replacement for a tacho feed (and possibly initial phase timing, depending on motor/drive specifics). The drive is completely unaware of where the motor should be, so it can't calculate any following error.

Personally given the choice, I wouldn't voluntarily use analogue mode now.
Step/Dir (or even better, quadrature) is far easier to setup and tune, will give as good performance as a well setup analogue system, and out perform a less than ideal setup analogue system.

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

More
11 Dec 2022 20:10 #259215 by tommylight
Do some scope plots of f-error and post them here, i did tune two machines today, one with velocity drives, the other seem more like torque drives.
The following user(s) said Thank You: RotarySMP

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

More
12 Dec 2022 20:08 #259263 by RotarySMP
"graph servo analog out in hal scope,"
By that you mean joint.x.vel-cmd right?

Starting with X axis:
Drive automatic rigidity = 18 (Scale 0-31)

My starting point was a P of 15. with a bit of FF. This was what I have been using to machine with the Schaublin, which is not a perfect tuning, but the machine basically worked.

"turn the P setting to zero , set ff1 to 1 make sure the other ff settings are zero"
Done.
Tiny move and following error.

Set drive automatic rigidity = 1
Larger move, and following error.

Not sure how to get started from this point. As I cant start tuning , until I have stable motion again.

Thanks for the explanation why there is no Following error parameter in the drive Osci. In hindsight I probably should have used a Step/card rather than the 7i83.
 

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

Moderators: piasdom
Time to create page: 0.107 seconds
Powered by Kunena Forum