6i25 7i76 closed loop spindle

More
14 May 2020 12:59 #167733 by PCW
Replied by PCW on topic 6i25 7i76 closed loop spindle
What version of LinuxCNC are you using? I'm pretty sure [SPINDLE_9] has been used for a few versions

( note that for spindle control, FF0 should be 1 not FF1 )

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

More
14 May 2020 13:00 #167734 by Bob654321
Where would add "pid.N.maxerrorI" ? Is it replacing something? I

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

More
14 May 2020 13:12 #167739 by Bob654321
LinuxCNC 2.7.14 . (Thanks for pointing that FF0=1 not FF1) A side note I have a completely separate computer/6i25-7i76 I am using to get the spindle and tool changer up and running. I am simply unplugging from my working set up and plugging into the setup we are looking at. I am more than willing to start over from scratch if there is a version of linuxcnc that will work better for what i am doing.

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

More
14 May 2020 14:01 #167744 by PCW
Replied by PCW on topic 6i25 7i76 closed loop spindle
I'm not sure when the spindle tuning stuff was added to calibrate. I thought is was in 2.7 but I might be wrong. You can do this by hand live halcmd in a terminal

halcmd -fk
halcmd: setp pid.s.Pgain 5

You can do this with halshow but I prefer halcmd because it has command history
(cursor keys allow you to replay/edit previous commands) and command completion
(tab key completes signal, pin, parameter, function names)

as far as the pid maxerror settings, you can do this directly in the hal file with

setp pid.s.maxerrori 123

or

setp pid.s.maxerrori [SPINDLE_9]MAX_ERROR_I

assuming you add a

MAX_ERROR_I = 123

statement in the SPINDLE_9 section of your ini file

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

More
14 May 2020 15:31 - 14 May 2020 15:34 #167755 by dgarrett

I'm not sure when the spindle tuning stuff was added
to calibrate. I thought is was in 2.7 ...


ref: linuxcnc.org/docs/2.8/html/getting-start...bration_emccalib_tcl

commit: github.com/LinuxCNC/linuxcnc/commit/db9740e94
$ git branch --all --contains db9740e94 |grep 2\.
2.8
...
Last edit: 14 May 2020 15:34 by dgarrett.

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

More
14 May 2020 16:39 #167759 by PCW
Replied by PCW on topic 6i25 7i76 closed loop spindle
Thanks dgarrett.
So spindle support in calibrate is relatively new

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

More
14 May 2020 18:25 #167768 by Bob654321
should i switch to 2.8? If it is easier to work with i can change to 2.8.

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

More
14 May 2020 20:14 #167782 by Bob654321
Maybe i am getting off track with the calibrate and 2.8 stuff. Non the less i still get the same exact behavior as I described in my initial post now with FF0 =1.

"When I mess with the spindle PID some interesting things happen. The first is when I make P higher than 1 the spindle runs faster than M3Sxx and when less than 1 spindle runs slower than M3Sxx. I can increase P slowly to a large number and the only thing that happens is spindle speed scaling. Speed oscillates slightly then settles within 5rpm no matter what value of P I use (same as if I unhook the 7i76 and hook a potentiometer to drive). If I is increased spindle speed starts about where you tell it than drifts to the maximum spindle speed. With a low I this happens slowly and with a higher I it happens faster…"

Another thing that i noticed is that a negative I will slow spindle down to 0.

Are my hal and ini files set up for my setup for closed loop? Is the above typical behavior or does it indicate a crossed wire somewhere?

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

More
14 May 2020 20:23 #167784 by PCW
Replied by PCW on topic 6i25 7i76 closed loop spindle
Sound broken, I guess I would run open loop (FF0=1 only) and watch the PID error
pin to get some understanding of what's going on. It sounds like the encoder scaling
is way off for some reason since the PID output should drop if you are above the
setpoint and you have a non zero P or I term

BTW don't use negative PID values, the PID component has some built in assumptions
that these are positive

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

More
15 May 2020 02:57 #167804 by Bob654321
The image attached represents the pid.s.error pin with the spindle going from 0 to 2000rpm. FF0=1,everything else was 0. I would not be surprised if I made a mistake with the scale. I was a little confused when using the pncconf calculator. The encoder is a 1000 p/r differential hooked directly to the motor. Motor spins 2:1 to the spindle. Max rpm of motor/encoder=4,000rpm and spindle=8000. What would be the correct scale/ini values for the spindle?
Attachments:

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

Time to create page: 0.353 seconds
Powered by Kunena Forum