Rotary axis scale units 7i77. pid output minimum too large.

More
24 Oct 2018 04:24 #119315 by alan_3301
Do these numbers sound right, or did I misread the docs? Currently the pid output won't go close to zero. It will jump between -2.5 and +2.5. I have adjusted the P gain from 500 (that won't output enough to counter drift), to 5000, which moves to commanded position slowly, then buzzes back and forth as described above.

hm2_5i25.0.encoder.02.scale is set to 200. Servo encoder outputting 9000 PPR (36000 counts) geared 2:1 to the axis. I calculate 72,000 counts per revolution, or 200 counts per degree.

hm2_5i25.0.7i77.0.1.analogout5-scalemax is set to 9000. The axis speed at 10V is 1500rpm = 25rps = 9000 degrees/s

The ini has [TRAJ] ANGULAR_UNITS = degree. But maybe I'm not supposed to use degrees? Maybe scale should be set to 72000? and scalemax set to 1500 or 25?

I will try those numbers tomorrow to see if it makes any difference. In the meantime, can anyone say if this is the cause of the large minimum pid output?

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

More
24 Oct 2018 04:38 #119317 by alan_3301
Here is my ini and hal files

Warning: Spoiler!


Warning: Spoiler!
Attachments:

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

More
24 Oct 2018 11:58 #119329 by alan_3301
I noticed that the output scale in axes_5 is commented out. This made me realize I was setting that parameter in the spindle_9 section. In my testing I may have been confusing those two, and making changes that didn't do anything.

I am going to spend some time cleaning up the hal file to make it more readable, then continue on in the hal meter to find the problem.

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

More
24 Oct 2018 14:30 - 24 Oct 2018 14:34 #119337 by PCW
5000/200 = 25
So thats the smallest possible PID output step with a P term of 5000 and a encoder scale of 200 counts/degree

That also sounds really high

P= 5000 means a velocity correction of 5000 degrees per second with a 1 degree error, this cannot possibly be stable at a 1 KHz servo thread. This means a 1 degree error would cause a 5 degree correction at a 1 ms servo thread (5000 degrees/sec for 1 ms) this cant end well...

i would try again at 500 gain, if you have slow drift, this can be corrected with the I term
Last edit: 24 Oct 2018 14:34 by PCW. Reason: corrections/clarify

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

More
25 Oct 2018 16:03 #119396 by alan_3301
Thank you. It makes more sense now. I have set encoder scale to 72000 and output scale to 25. This gives me a hm2_5i25.0.encoder.02.position in revolutions, instead of degrees. But I can scale this as needed. This Along with a PID P of 40 is much closer to usable.

I still need to figure out the tuning. The X and Z seeemed really easy. Just a P of 500 to get rid of the springiness, and they are rock steady and silent. The C motor is stiff at P of 40, but very noisy. I feel like it's going to need a very small window of P to find the balance. The other motors seemed to have a very wide range of acceptable P values.

Thanks again! It's very nice to have someone that supports their products so well, even for inexperienced users with basic questions.

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

More
26 Oct 2018 11:45 #119436 by andypugh
Go back to degrees, but cut the P gain by a factor of 360.

P gain is floating-point, it can be any value at all, so 0.11 is perfectly valid. As is 0.00000054321

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

More
26 Oct 2018 12:04 #119440 by alan_3301
Thanks for the advice. It turns out I never ran the tuning software on the spindle servo drive. I lowered the bandwidth setting from 80hz to 20hz, and it responds much better to linuxcnc input, and sounds much happier.

I will go back to degrees to see how my old settings work. Is there a simple reason this is preferable? Thanks.

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

More
26 Oct 2018 12:12 #119441 by andypugh
G-code generally expects to work in degrees.
Though I had missed the fact that this is a spindle. Spindles work better scaled in revs, for tapping and speed feedback

So, if it's a spindle, don't change it to degrees, that is bad advice from an untrustworthy source.

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

More
26 Oct 2018 14:33 #119449 by alan_3301
Thanks. It is a spindle, but also a c axis. Would degrees or revs matter for either, as long as all the units are scaled correctly?

I thought I was being smart by scaling the encoder output to give around 1.8 million counts per second at max speed, as I read the 7i77 could read the encoders at 2 mhz, but it starts losing the spindle speed reading after about 250 rpms (300khz)

Default multiplexing rate withHostMot2 firmware is ClockLow / 8,or approximately 4 MHz with 5I25 or 6I25 FPGA hostinterface cards, giving a resolvable count rate of 2 MHz.


Does this mean 2Mhz split up between 6 encoder channels being 333K counts/s per channel? If that is the case I think I will set the servo drive to output 150,000 counts per rev, which should give a safe max speed of 120 rpm (60 rpm spindle speed), with 0.0024 spindle degrees per count.

Then I will get another lower count encoder for the spindle itself. I found one with 2000PPR should give me 2250 rpms at 300khz.
That would let me have c axis encoder scaled in degrees, and spindle encoder scaled in revs. Best of both right?

Thanks for the help.

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

More
26 Oct 2018 15:10 #119452 by alan_3301
And totally unrelated, but hopefully PCW or anyone that knows will see this... I found an omron E6B2-CWZ6C encoder, and I'm hoping to power it from the 7i77. The specs says it has an 80mA max current draw, but inrush current is listed as 9A for 0.3ms. Is this within the limits of the PC/5i25/7i77? The other 3 encoder inputs used are simulated outputs from the servo drive, and not connected to encoder 5v. If that won't work, the encoder has a max input voltage of 24V which is the voltage of my field power, but it is a switching supply, a meanwell mdr-20-24 with a 1 amp rating. Ripple/Noise listed as 150mv. Would this be a problem?

Sorry for the endless questions.. just trying to get it right.

Thanks again.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum