CNC milling machine recrofit (pid tuning with analog servo) + digital servo

More
09 Nov 2019 02:46 #149959 by kavindu1
hi everyone
during project im struck with some problems.
I tell what i done ,write my experience. im new to linux cnc.
I'm retrofit cnc milling maching with linux cnc it has analog servo drive module with Z 18 NM , X 5.6 NM ,Y 5.6 NM servo motors (teco feed back get in to drive and motor has incrimantal encoder connect to controller)

i using 5i25+7i77 mesa cards.
this is drive module


in this module x drive card dead and we repair it replase igbt and some control circuit components

I Earth the machine properly with separate Earth rod wit 7 ft.

I wire drive module power cut off by series limit switch and emergency.
and remove motor from load.
wire the encoder, and make encoder calibrate with linux cnc system(encoder ppr 2500 / ball screw pitch 10 mm and direct couple to motor

first i tune motors from drive side remove the analog out and ground connector from drive and enable drive module with linux cnc
motor are rotate slowly.
drive has scale and offset (variable resistors) rotate them and make motor to stop.stable


I put pid Value P=0 / I=0 / D=0 /FF1 = 0.01 / ff2 = 0 in all axis
connect analog out and ground connector to drive, and power up and enable drive module with linux cnc
but motor are running again I try to again rotate scale and offset (variable resistors) to stop rotate the motors Y is stop and other motor are not stop I rotate to max position to scale and offset (variable resistors) they are rotate very slow.
I remove analog out and ground connector to drive again make motor to stop at drive enable.
connect analog out and ground connector to drive, and power up and enable drive module with linux cnc motors rotate again I put PID value in P=1 ta all axis. then motor stop rotate and hold but motors are oscillating . I decrease P value but nothing happen
I put Pgain to X P=5 / Y P=7 / Z P=1.1 this are ok. higher than these value motor are highly vibrate and trying to jump not stable


I disable drive and enable drive it motors move little bit and hold and oscillating (it like steady state error)
I zero the machine (home limit are not wire to system) it not come to 0.000 position X in 0.012 Y in 0.008 Z 0.058
in hall scope show that like that


I move the X motor he not goes right position
EG ; i give comand in MDI X 20.000 motor goes to 20.015 and oscillating i give comand in MDI X 0.000 motor goes to 0.014
and oscillating

Tuning with I value put I=1 I zero the machine it with 0.014 and after few seond it came near to 0.000 but not in to 0.000 oscillating between -0.007 to 0.006
I move to motor to 20.000 it goes to 20.012 and try to come to 20.000 position. but oscillating between 19.993 to 20.006

Y is same like this Z error greater than X and Y

i try make this position from D but it is not work.


AND I TRY another way Put I=0 and D=0 P is same value. I tell motor to move 0.000 , it goes 0.013 I zero machine it value in 0.013
rotate offset (variable resistor) in each driver zero position came near 0.000 but oscillating is same .now it oscillate between -0.003 t0 0.004

we move motor to 20.000 it goes 20 .000 but oscillate between 19.993 to 20.004
hall scope chart show

Z is oscillating largely it position error cant get in near 0.000 by drive
I try lot but oscillating in same

3)And i try another way

remove X drive card and Z drive card from drive module and drive Module on with Y drive enable the drive Y Motor hold without
oscillation I ZERO the machine motor come 0.000 and move without position error
I connect the Z drive card on Drive module with Y and Z then problem came again Z and Y oscillating again
Z torque is very low

I power up drive module X drive card X little bit oscillate 0.001 to 0.000 some time goes -0.001

I on drive module with X and Z ,, Z and X oscillating again
Z torque is very low

I CANT THINK WHY THIS HAPPEN (in old system Y and Z work ok )


***I remove x and y drive card from drive module and power up with Z drive card then Z motor is stop oscillating and motor stable
Z torque is good now,

In MDI mode i run Z (g1 f 400 z-100) position is ok ,, motor moving with following error ( 0.018) use FF1 and FF2 low the followin
to 0..004
hall scope show like that


I connect motor to load power up and enable drive it hold Z axis without oscillate move very smooth position is ok I ZERO the machine axis in 0.000 position I move axis to 100.000 axis move to 100.000 I check movement in using dial gauge it ok with position

I again connect Y drive card enable drive Z fall -0.078 position error is also come and oscillating again 0.000 to 0.002 value
I remove Y motor power cables and enable drive module , then Z is working with out position error

I cant think what happen


@@ I have new 2 servo drive with motors im planing to run them in puls and direction

i have another 5i25 mesa card and write (5i25_prob_rfx2.bit) firmware to that card


and i connect 2 mesa card to pc mesa 0 with 5i25+7i77
mesa 1 step direction

i configure pncconf wizard with like that



open this cnc file, i enable the machine with linux cnc my Z analog servo motor moving slowly.

i make another configure pncconf wizard for 1 mesa card (5i25=7i77) and enable machine from linux cnc Z analog servo is ok
motor is not moving.

then i open 2 mesa card cnc file and enable machine z moving slowly I Change P value of Z ,, put P=2 / P=10 / P=20
P=50 P=100 for p gain and nothing change.

are we cant use 2 mesa card to 1 pc
or power issue of pc
or other reason

i cant think what to do im struck in hear
Attachments:

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

More
09 Nov 2019 04:07 #149961 by PCW
If those are metric numbers, that's not bad.
Small dithering can be reduced by adding some deadband
at the expense of following error

If reducing the P value (and D and I) to 0 doesn't stop the dithering, that
suggests a noise issue

If you need more output zero adjust you can set the PID bias pin to a small value

Note the you typically need rather large values of I for relatively quick response
( Caution! too high I values can result in slow large amplitude oscillations so set reasonable ferror values when tuning)

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

More
09 Nov 2019 11:44 #149978 by tommylight
When tuning the drives ( no Mesa, nothing else ) you have to short the analogue input to it's ground, adjust it so it slowly moves in one direction.
When tuning the system ( with Mesa, after the above is tuned ), wire it properly so it will disable the drives if the motors move ( it has to cause a joint error ).
forum.linuxcnc.org/10-advanced-configura...ning-detailed-how-to
Read this very carefully and do not do anything without fully understanding what it going on.

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

More
09 Nov 2019 14:43 #149987 by kavindu1
hi pcw
thanks for your reply

today i try with power up Y drive card and Z drive card together ..
I put Y P = 1,
I = 0
D =0
ff1= 0.01

And Z values are not change and leave last time value

i enable drive through linux cnc Z not oscillating Y is also not oscillating
but z is move Z = -0.057 down direction in Y is also Y= 0.013 value .I ZERO the machine but position is not set in 0.000 it set Z for -0.057 Y for 0.013 .
in both axis with small oscillating change value between -0.057 to -0.058

I move Z in MDI (g1 f400 Z-20) it goes Z= 20.058 I move machine in MDI(g1 f400 Z0.000) machine came to Z=0.057 not came to 0.000

I change PID bias value and set ZERO to Z= 0.001

then i move machine it goes right position and came to 0.001

Then i start tune Y axis

I increase P value of Y P=2 P=3 like that
my Z axis Zero position is change again it came to -0.015 ( im not change any value of Z )

I set Y axis p gain to P=5
my Z axis zero position change to -0.042

Z position error is came again.

I again remove Y drive card from drive module and power up and Z pid bias to bias=0 problem solved .

With one drive card module is ok.

is this happen in some fault in drive module or some other thing.

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

More
09 Nov 2019 15:36 #149989 by kavindu1
hi tommylight thanks for your reply

i tune the drive ( no Mesa, nothing else ) I short analog input to its ground but i adjust motor at stop not slowly move ( i done mistake in hear),

I will read your post and try again . and give you to feedback

in my drive variable resistors scale and offset that offset can adjust motor moving slow and high and turn direction
i have no idea about scale what for it.

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

More
09 Nov 2019 17:58 - 09 Nov 2019 18:03 #149996 by Dinuka_Shehan
Hi Anushka ayya,
mesa boards tika awada?
Mn oyata dawasak katha kala.office eken katha kale.
Mokada wenne dan?
Hope to see you.
Last edit: 09 Nov 2019 18:03 by Dinuka_Shehan.

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

Time to create page: 0.283 seconds
Powered by Kunena Forum