Wiring and configuration SERVO DRIVES
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2680
- Joined: Mon Dec 04, 2017 1:49 am
Re: Wiring and configuration SERVO DRIVES
Hi Gabriel,
You might read this and this.
The Kanalog Relay Drivers switch to GND they can't source +24V. The opto outputs can be wired to source 24V but they are limited to 25ma.
NP
You might read this and this.
The Kanalog Relay Drivers switch to GND they can't source +24V. The opto outputs can be wired to source 24V but they are limited to 25ma.
NP
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: Wiring and configuration SERVO DRIVES
Tom, the problem that I'm having is that SWE is always connected to ground. (assuming no cable connected)
When i stop the motion in Kmotioncnc or disable drives in step response, the SWE is grounded and when I enable the axis, it's also grounded.
Am I doing something wrong in config maybe?
Thanks.
When i stop the motion in Kmotioncnc or disable drives in step response, the SWE is grounded and when I enable the axis, it's also grounded.
Am I doing something wrong in config maybe?
Thanks.
- TomKerekes
- Posts: 2680
- Joined: Mon Dec 04, 2017 1:49 am
Re: Wiring and configuration SERVO DRIVES
Hi Gabriel,
Did you read the links I sent? The SWE remains off until KFLOP/Kanalog boots up and all the IO is initialized, then SWE turns on and remains on thereafter. As described you can then use a C Program like the example watchenable.c to continuously monitor the axis enables and then do whatever you want such as disable/enable your drives. You will need to use another output or outputs to be able to enable/disable your drives at will.
HTH
Did you read the links I sent? The SWE remains off until KFLOP/Kanalog boots up and all the IO is initialized, then SWE turns on and remains on thereafter. As described you can then use a C Program like the example watchenable.c to continuously monitor the axis enables and then do whatever you want such as disable/enable your drives. You will need to use another output or outputs to be able to enable/disable your drives at will.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: Wiring and configuration SERVO DRIVES
Dear Tom.
Sorry, didn't understood the part about being always on.
Will take a look at the watchenable.c and adapt it to my machine.
Thanks for the support!
Sorry, didn't understood the part about being always on.
Will take a look at the watchenable.c and adapt it to my machine.
Thanks for the support!
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: Wiring and configuration SERVO DRIVES
Hi tom. Wired the SWE and Opto as the wiki and all went together, added the watchenable in the INIT program and all works fine.
Back to servo tuning, can you give me some more help fine tuning?
Attached are configs and plots.
Sorry for too many questions, but I'm already 3 days in this machine, with almost 30 hours and now it's starting to work.
You made me proud of chosing Dynomotion, your support is awesome.
Thanks!
Back to servo tuning, can you give me some more help fine tuning?
Attached are configs and plots.
Sorry for too many questions, but I'm already 3 days in this machine, with almost 30 hours and now it's starting to work.
You made me proud of chosing Dynomotion, your support is awesome.
Thanks!
- Attachments
-
- p1.rar
- (389.38 KiB) Downloaded 105 times
- TomKerekes
- Posts: 2680
- Joined: Mon Dec 04, 2017 1:49 am
Re: Wiring and configuration SERVO DRIVES
Hi Gabriel,
Could you tell us what you tried and what happened?
Have you found the D Limit?
Your move is relatively small so you are only testing 24000 counts/sec even though your limit is 120000.
Could you tell us what you tried and what happened?
Have you found the D Limit?
Your move is relatively small so you are only testing 24000 counts/sec even though your limit is 120000.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
- TomKerekes
- Posts: 2680
- Joined: Mon Dec 04, 2017 1:49 am
Re: Wiring and configuration SERVO DRIVES
Testing Upload. Strange uploads larger than 1MB are allowed for me. Anything unusual you are doing?
- Attachments
-
- p1 - Copy.txt
- (1.46 MiB) Downloaded 105 times
-
- p1.txt
- (1.46 MiB) Downloaded 120 times
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: Wiring and configuration SERVO DRIVES
Hi Tom. Maybe you level in the forum is higher ?
Just went to attachments and selected the files.
So, changed some configurations on the drive and could give more P gain.
Tried more D gain also and it give a lot of noise in the output.
Check more reasonable values.
About the blue line, is it normal to go against the output ?
Lowering the input gain gave better results
Thanks for your attention.
ch1->InputMode=ENCODER_MODE;
ch1->OutputMode=DAC_SERVO_MODE;
ch1->Vel=120000;
ch1->Accel=160000;
ch1->Jerk=650000;
ch1->P=2.4;
ch1->I=-1e-05;
ch1->D=30;
ch1->FFAccel=0;
ch1->FFVel=0;
ch1->MaxI=200;
ch1->MaxErr=2000;
ch1->MaxOutput=2047;
ch1->DeadBandGain=0;
ch1->DeadBandRange=0;
ch1->InputChan0=1;
ch1->InputChan1=0;
ch1->OutputChan0=1;
ch1->OutputChan1=1;
ch1->MasterAxis=-1;
ch1->LimitSwitchOptions=0x10f;
ch1->LimitSwitchNegBit=136;
ch1->LimitSwitchPosBit=136;
ch1->SoftLimitPos=1e+30;
ch1->SoftLimitNeg=-1e+30;
ch1->InputGain0=0.6;
ch1->InputGain1=1;
ch1->InputOffset0=0;
ch1->InputOffset1=0;
ch1->OutputGain=-1;
ch1->OutputOffset=0;
ch1->SlaveGain=1;
ch1->BacklashMode=BACKLASH_OFF;
ch1->BacklashAmount=0;
ch1->BacklashRate=0;
ch1->invDistPerCycle=1;
ch1->Lead=0;
ch1->MaxFollowingError=1000;
ch1->StepperAmplitude=20;
ch1->iir[0].B0=1;
ch1->iir[0].B1=0;
ch1->iir[0].B2=0;
ch1->iir[0].A1=0;
ch1->iir[0].A2=0;
ch1->iir[1].B0=1;
ch1->iir[1].B1=0;
ch1->iir[1].B2=0;
ch1->iir[1].A1=0;
ch1->iir[1].A2=0;
ch1->iir[2].B0=0.010799;
ch1->iir[2].B1=0.0215981;
ch1->iir[2].B2=0.010799;
ch1->iir[2].A1=1.65256;
ch1->iir[2].A2=-0.695754;
Just went to attachments and selected the files.
So, changed some configurations on the drive and could give more P gain.
Tried more D gain also and it give a lot of noise in the output.
Check more reasonable values.
About the blue line, is it normal to go against the output ?
Lowering the input gain gave better results
Thanks for your attention.
ch1->InputMode=ENCODER_MODE;
ch1->OutputMode=DAC_SERVO_MODE;
ch1->Vel=120000;
ch1->Accel=160000;
ch1->Jerk=650000;
ch1->P=2.4;
ch1->I=-1e-05;
ch1->D=30;
ch1->FFAccel=0;
ch1->FFVel=0;
ch1->MaxI=200;
ch1->MaxErr=2000;
ch1->MaxOutput=2047;
ch1->DeadBandGain=0;
ch1->DeadBandRange=0;
ch1->InputChan0=1;
ch1->InputChan1=0;
ch1->OutputChan0=1;
ch1->OutputChan1=1;
ch1->MasterAxis=-1;
ch1->LimitSwitchOptions=0x10f;
ch1->LimitSwitchNegBit=136;
ch1->LimitSwitchPosBit=136;
ch1->SoftLimitPos=1e+30;
ch1->SoftLimitNeg=-1e+30;
ch1->InputGain0=0.6;
ch1->InputGain1=1;
ch1->InputOffset0=0;
ch1->InputOffset1=0;
ch1->OutputGain=-1;
ch1->OutputOffset=0;
ch1->SlaveGain=1;
ch1->BacklashMode=BACKLASH_OFF;
ch1->BacklashAmount=0;
ch1->BacklashRate=0;
ch1->invDistPerCycle=1;
ch1->Lead=0;
ch1->MaxFollowingError=1000;
ch1->StepperAmplitude=20;
ch1->iir[0].B0=1;
ch1->iir[0].B1=0;
ch1->iir[0].B2=0;
ch1->iir[0].A1=0;
ch1->iir[0].A2=0;
ch1->iir[1].B0=1;
ch1->iir[1].B1=0;
ch1->iir[1].B2=0;
ch1->iir[1].A1=0;
ch1->iir[1].A2=0;
ch1->iir[2].B0=0.010799;
ch1->iir[2].B1=0.0215981;
ch1->iir[2].B2=0.010799;
ch1->iir[2].A1=1.65256;
ch1->iir[2].A2=-0.695754;
- Attachments
-
- best.rar
- (385.43 KiB) Downloaded 110 times
- TomKerekes
- Posts: 2680
- Joined: Mon Dec 04, 2017 1:49 am
Re: Wiring and configuration SERVO DRIVES
Hi Gabriel,
The values in your C Program don't match the Screen.
Don't use negative I gains.
The next step would be to increase I gain to see if you can reduce errors and determine how much it can be increased before becoming unstable.
The values in your C Program don't match the Screen.
As you are basically operating with only P gain the output will be proportional to to the error. The more the system lags behind the more output there will be.About the blue line, is it normal to go against the output ?
Probably not noise. Rather instability. Instability is like a bad driver making over corrections too quickly and weaving worse and worse down the road.Tried more D gain also and it give a lot of noise in the output.
I would put that back to 1. You can achieve the exact same result reducing the PID gains.Lowering the input gain gave better results
Don't use negative I gains.
The next step would be to increase I gain to see if you can reduce errors and determine how much it can be increased before becoming unstable.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: Wiring and configuration SERVO DRIVES
Tom, using a positive I make the middle line goes away from the center line (in the middle plot line). I'm away from the machine but will test and report as soon as possible.
Also, I could higher the P gain because there is a P gain I the drive. With older control it was 316, I lowered to 216 and got 1 P, now it's on 116 and I can go to +/-2.5 P, should I lower (like 10) the P in the drive and raise in kanalog?
Thanks
Also, I could higher the P gain because there is a P gain I the drive. With older control it was 316, I lowered to 216 and got 1 P, now it's on 116 and I can go to +/-2.5 P, should I lower (like 10) the P in the drive and raise in kanalog?
Thanks