Page 1 of 1

weak servo / maybe commutations off?

Posted: Wed Aug 28, 2019 6:40 pm
by turbothis
i notice my spindle servo does not have the low rpm grunt it did when i first got it working
runs fine at higher speeds
at first i could go 20 RPM and not be able to stop the 6" chuck with my hand
now i can easily stop it.

would CommutationOffset have some control in this?

using 2 DAC channels to drive the servo i should be able to phase find with either one?
DAC_CHAN 4 will act normal but DAC_CHAN 5 will not really even move the servo.

i can change the CommutationOffset by 50 at a time and get much more power out of the servo than what the phase find program says to use. i am about 200 different than it says on the consule

is it best to some how test the servo output in real torque and adjust the CommutationOffset accordingly?
like the most torque output is best CommutationOffset ?
i can put a 1 foot bar in the chuck and a hanging scale on that to read actual torque. lol

i imagine the accuracy of the CommutationOffset will effect the servo tune a lot?

after a lot of testing i have come to the conclusion the dam digital Z index on the expensive CUi piece is drifting. time to order up something better i guess.......................................

Re: weak servo / maybe commutations off?

Posted: Wed Aug 28, 2019 7:59 pm
by TomKerekes
Hi turbothis,

Yes if the commutation is off the motor will not generate optimal torque or not even work at all.

Both DACs are needed to commutate and rotate the motor.

Its ok to determine the CommutationOffset by other means such as trial and error. Pick the one that gives the best performance. You can use the Step Response Screen and increase the acceleration to the point it fails to get a measurent of motor performance. The best CommutationOffset should allow the highest Acceleration (torque).

Note that changing by +/- 8192/3 will shift one complete phase cycle and have the exact same result.

Shifting by +/- 1/4 cycle will shift from maximum torque to zero torque.

But the AutoPhaseFind Program should give a good result if it rotates properly. It energizes coils expecting the motor to snap to a position and stop where that coil generates zero torque (if there was torque it should accelerate assuming low friction). The coil will then generate maximum torque when the rotor is 1/4 cycle away from that position.

You posted some reports where it was not rotating properly and I told you to try increasing the 'ignore' but you seemed to ignore me :D

Re: weak servo / maybe commutations off?

Posted: Wed Aug 28, 2019 8:10 pm
by turbothis
i looked over the phase find program and cant see where i can adjust for the ignore :(
i ordered a new omron 5V incremental encoder for with 2000 counts so it will make some numbers easier and also i have another servo pulley showing up to make the servo/spindle ratio a smooth 50% under drive :D

Image

Re: weak servo / maybe commutations off?

Posted: Wed Aug 28, 2019 8:19 pm
by TomKerekes
i looked over the phase find program and cant see where i can adjust for the ignore
you didn't find:

ignore=

?

Re: weak servo / maybe commutations off?

Posted: Wed Aug 28, 2019 8:42 pm
by turbothis
quite the opposite, i see lots of it!

the omron encoder is saying 160 mA max consumption. can i run this off the 5V on the Kanalog board? or grab 2 of the 5V pins?

Code: Select all

{
		WaitNextTimeSlice();

		k+= dk;
		

		Write3PH_DACs(ch,A, k/1000.0);  // move the pole 

		zmark = ReadBit(Z_BIT_NUMBER);

		if (!zmark && ignore>0) ignore--;

		if (ignore==0 && zmark)  // check for index mark
		{
			p0[m]=ch->Position;  // save position
			kpos[m]=k;           // save phase angle

			if (++m == Ncycles) 
			{
				ch->Position=0;  // set current position to Zero
				break;
			}

			if (m==2) dk = -dk;
			ignore=300;
		}
	}

Re: weak servo / maybe commutations off?

Posted: Thu Aug 29, 2019 2:50 am
by TomKerekes
Hi turbothis,
quite the opposite, i see lots of it!
can you guess where it sets how much to ignore? (Hint it is 300 loops)


the omron encoder is saying 160 mA max consumption. can i run this off the 5V on the Kanalog board? or grab 2 of the 5V pins?
Yes. Kanalog normally gets 5V from the ribbon cable to KFLOP which supplies with 1000ma

Re: weak servo / maybe commutations off?

Posted: Thu Aug 29, 2019 5:05 pm
by turbothis
300 loops. what does this mean though?
the servo only turns a couple revolutions and then is enable
i am waiting to change a setting like like and make some fire off the board! lol :lol:

i read the 5V only has 100Ma each?
"(4) +5V outputs are available to power low current (<100ma) external circuitry such as encoders."

Re: weak servo / maybe commutations off?

Posted: Thu Aug 29, 2019 6:05 pm
by TomKerekes
Hi turbothis,
300 loops. what does this mean though?
the servo only turns a couple revolutions and then is enable
Each time through the loop the phase angle is advanced a tiny amount. It is looping about 5000 times per second. With dk of 0.2 and k/1000 the phase is advanced 0.0002 of a cycle per loop. X 300 loops would be 0.06 cycle or 22 degrees. So if friction causes the rotor to lag behind 11 degrees of a cycle (~4 degrees of a revolution) there can be no motion when reversing direction and AutoPhaseFind may detect the same index twice and fail. The ignore could be set to almost a full motor revolution before the next one would be missed and cause the opposite problem.

How much current is applied to the coils (Amplitude) will change how stiffly the rotor is rotated as well.
i am waiting to change a setting like like and make some fire off the board! lol :lol:
Good to be careful than sorry. Even ignoring the index forever would give a bad measurement but simply rotate forever and not cause any damage.

i read the 5V only has 100Ma each?
"(4) +5V outputs are available to power low current (<100ma) external circuitry such as encoders."
That is just a rule of thumb to avoid everything going over 1000ma.

Re: weak servo / maybe commutations off?

Posted: Thu Aug 29, 2019 6:25 pm
by turbothis
i did play with different amplitude a bunch and it would vary the results quite a bit. i tried from 200 up to 1500

great on the 5V