Wiring and configuration SERVO DRIVES

Moderators: TomKerekes, dynomotion

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Wiring and configuration SERVO DRIVES

Post by GabrielR922 » Tue Nov 10, 2020 2:01 pm

Hello.

I'm starting a retrofit in a SCM RECORD 2, from 1996. It is working with the original command and I could test everything on the machine.

I bought the KFLOP and KANALOG boards and they are scheduled to arrive this week.

The machine uses Yaskawa CACR-SR drives, they work with analog +/-10 volt and have differential encoders.

My question is: the encoder has 3 outputs, Phase A B C and they +/- wires.

A+ A- B+ B- I know that I have to connect to KANALOG differential inputs.

Where do I wire phase C+ C- and what configuration I use for it?

And if possible, can someone explain the function of the phase C?

The machine has home switchs in all axes. Can i live cable C without conection?

Thanks for your attetion.

Gabriel Romanzini

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Wiring and configuration SERVO DRIVES

Post by TomKerekes » Tue Nov 10, 2020 3:05 pm

Hi Gabriel,

The C signal sometimes labeled X or Index is a single narrow pulse at some absolute point on the rotation of the encoder. It is not necessary to connect. But if connected it may be able to provide more accurate homing than a home switch. It can be connected to any available A B differential input. Usually it is most logical to use Kanalog JP2. Because the index pulse occurs every revolution of the encoder it is normally necessary to use it in conjunction with a home switch to first locate that axis within one revolution of the encoder then to locate the index pulse. See also here.
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: Wiring and configuration SERVO DRIVES

Post by GabrielR922 » Tue Nov 10, 2020 5:15 pm

Hi Tom!

Now I understand it.

At first I will live it unplugged as I'm in a hurry.

Then I will wire it and configure.

As more questions appear I will be posting here.

Thanks for your reply and amazing support.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: Wiring and configuration SERVO DRIVES

Post by GabrielR922 » Mon Nov 16, 2020 1:14 pm

Dear Tom.

As a complete newbie in tuning servos, i need some help.

Wired it all up, have encoder feedback and can drive they with console and kmotioncnc.

With console i can get really high speeds.

I can't figure out how to tune it exact.
The servos have 8192pulses encoders.

Also they have one pulley and the ballscrew pitch. With about 16000pulses i could get it almost right in kmotionCNC (encoder distance and measured distance).

When I jog the machine, with slow jog all goes well, when i jog with fast jog, it goes some distance and hit the max following error.

Can you give me some help tuning these motors? Also, the encoder seems to be varying a bit, moving the dimension in kmotioncnc from 0.000 to 0.006 and back.

Thanks!!
Attachments
tuning.PNG
step.PNG
poserror.PNG
Filter.PNG
bode.PNG

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Wiring and configuration SERVO DRIVES

Post by TomKerekes » Mon Nov 16, 2020 3:32 pm

Hi Gabriel,

Encoder might be a little noisy. Hard to tell because you didn't post the raw data so we could zoom in. Do you have optical encoders?

D Gain is probably too small to be doing anything.

I prefer not using Feed Forward until feed back is tuned better .

Without any I gain, error limited to 200, and P Gain of 0.75 the servo is only allowed to output 200 x 0.75 = 150 DAC counts (~ 0.7V) so you won't be able to go very fast.

I don't understand your description of the axis resolution.

Have you tried to do the steps listed here?
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: Wiring and configuration SERVO DRIVES

Post by GabrielR922 » Mon Nov 16, 2020 3:46 pm

Thanks for the reply Tom.

Yes, the drivers are yaskawa cacr-sr and have optical differential encoders.

If I don't use feed forward the position error read in the different position from the output.

I tried following the steps in the guide with no improvement. About the P, I can higher it till 1.1 where it starts some very strange movements. Maybe I will try to lower the speed and raise P?

I will try to change some settings and post the data.

Thanks

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Wiring and configuration SERVO DRIVES

Post by TomKerekes » Mon Nov 16, 2020 3:59 pm

Hi Gabriel,
If I don't use feed forward the position error read in the different position from the output.
That's why you should leave FF turned off so it doesn't hide why your feedback isn't working well.

Post the settings and plot of the "strange movements"

Probably main issue is the max error limit.
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: Wiring and configuration SERVO DRIVES

Post by GabrielR922 » Mon Nov 16, 2020 4:29 pm

Tom, here goes both of the plots. with P1.2 (strange) and with P1( ok )

Changed some settings also.

I can't save data and upload as it is 1.4mb and the forum only accepts 1mb.

SETTINGS:
#include "KMotionDef.h"

// Default Initial Configuration for 3 Axis Analog DAC Servo with encoder feedback
//
// Note Low Gains, Limited Max Limits, No Limit Options, No Soft Limits,
// Large allowed Following Error, No Feed Forward, No Filters, etc

void main()
{

//SetBit(152); // enable AMPS
//SetBit(157);
//SetBit(158);

ch0->InputMode=ENCODER_MODE;
ch0->OutputMode=DAC_SERVO_MODE;
ch0->Vel=60000;
ch0->Accel=300000;
ch0->Jerk=250000;
ch0->P=1;
ch0->I=0;
ch0->D=0.2;
ch0->FFAccel=0;
ch0->FFVel=0;
ch0->MaxI=200;
ch0->MaxErr=2000;
ch0->MaxOutput=2047;
ch0->DeadBandGain=0;
ch0->DeadBandRange=0;
ch0->InputChan0=0;
ch0->InputChan1=1;
ch0->OutputChan0=0;
ch0->OutputChan1=1;
ch0->MasterAxis=-1;
ch0->LimitSwitchOptions=0x10f;
ch0->LimitSwitchNegBit=136;
ch0->LimitSwitchPosBit=136;
ch0->SoftLimitPos=1e+30;
ch0->SoftLimitNeg=-1e+30;
ch0->InputGain0=-1;
ch0->InputGain1=1;
ch0->InputOffset0=0;
ch0->InputOffset1=0;
ch0->OutputGain=1;
ch0->OutputOffset=0;
ch0->SlaveGain=1;
ch0->BacklashMode=BACKLASH_OFF;
ch0->BacklashAmount=0;
ch0->BacklashRate=0;
ch0->invDistPerCycle=1;
ch0->Lead=0;
ch0->MaxFollowingError=10000;
ch0->StepperAmplitude=250;

ch0->iir[0].B0=1;
ch0->iir[0].B1=0;
ch0->iir[0].B2=0;
ch0->iir[0].A1=0;
ch0->iir[0].A2=0;

ch0->iir[1].B0=1;
ch0->iir[1].B1=0;
ch0->iir[1].B2=0;
ch0->iir[1].A1=0;
ch0->iir[1].A2=0;

ch0->iir[2].B0=0.00641907;
ch0->iir[2].B1=0.0128381;
ch0->iir[2].B2=0.00641907;
ch0->iir[2].A1=1.76294;
ch0->iir[2].A2=-0.788615;

EnableAxis(0);

DefineCoordSystem(0,1,2,-1);
}
Attachments
p2.PNG
p1.PNG

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Wiring and configuration SERVO DRIVES

Post by TomKerekes » Mon Nov 16, 2020 5:11 pm

Hi Gabriel,
here goes both of the plots. with P1.2 (strange) and with P1( ok )
That is classically unstable.

The next step would be to find max D gain and to see if it then allows higher P gain.

I can't save data and upload as it is 1.4mb and the forum only accepts 1mb.
I don't believe our forum has a 1MByte limit. Did you try it? You can also collect less time or zip to create a smaller file.
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: Wiring and configuration SERVO DRIVES

Post by GabrielR922 » Mon Nov 16, 2020 6:55 pm

Tom, after the last changes the machine run much better and has no problem moving or losing dimensions.

About the SWE.

When I disable axes it keeps connected to ground.

the machine that i'm retrofitting has a series os relay boards that work with 24v.

I need to supply 24v to the input of the relay and it will enable.
Is there a way to do this and when I enable the axis it output 24v?
It also need to be off when the board startup.
And when i stop the axis or disable it stop outputting?

Sorry for tons of questions.

Thanks a lot!!!

Post Reply