Servo tuning with voltage control

More
7 years 10 months ago #121953 by tommylight

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

More
7 years 10 months ago #121954 by PCW
Yes, normally E-Stop should power down the drives, and
LinuxCNCs joint.N.amp-enable-out (2.8) or axis.N.amp-enable-out (2.7)
should enable/disable the drives.
The following user(s) said Thank You: tommylight

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

More
7 years 10 months ago #121989 by alan_3301
I have a little experience with those drives if you need help with anything. I am not an expert, but I may be able to offer a little help if you need it.

If you don't already have it, the asdasoft software is very helpful, and much easier than setting parameters through the panel buttons.
The following user(s) said Thank You: Vitran

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

More
7 years 10 months ago #122645 by Vitran
Odd, I posted a reply a few weeks ago but it seems it didn't post. I have the magic touch when it comes to internet.

I got the servos working inside the software. I found that I needed to reverse each encoder direction. I also limited the maximum voltage output from 10V to 0.1V so the maximum rpm is 20rpm down from 2000. I had to increase the FError to ~.08" to remove the errors before setting the PID to 20,0,0. I will tune the PID once I have the motors in place. I also checked the direction and made sure it was rotating the right way and that the home position was in the right direction. Also checked the axis hitting the end switches too.

I replaced the spindle motor yesterday. I am also changing the spindle drive from the 0 to the 6 output. I originally had it on 0, but seeing that 6 has an isolated enable is much much better.

Got a new monitor, routed wires to the front. I am waiting on some hex bolts for the belt connections before I can mount the motors. Machined a new mounting plate for the X axis and some bolts along with it.

imgur.com/a/O9cLVxZ

Checked E-Stop circuit. I faulted some equipment on purpose and it shuts everything down. I believe the old power contacter for the spindle and servos are or were always on for some reason. I have a new contacter to put in, but I believe the spindle will fault and disable the E-Stop circuit from turning on if it does not have power. The spindle enable is tied to the 7i77 and the E-Stop circuit. The relay I close to enable the spindle is the same as the old circuit and I have not changed the circuit to the spindle in any way.

The servos have power all the time as is, and, as with the spindle, enable is tied to the E-Stop and cannot run without the E-Stop circuit on.

I am unsure about killing power to the servos and spindle. I do not know what I am achieving killing power compared to killing enable. Enable is tied to E-Stop, and if any of the equipment or the spindle or servos fault, they do kill the E-Stop. I know there are what look like contacters on the main power lines to the spindle and servos, but they conduct even when the power to the machine is off.

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

More
7 years 9 months ago #123445 by Vitran
Great news overall. I have the XZW moving and within a very tight control. The PID values were:
P 150
I 0
D 0
FF0 0
FF1 1.5
FF2 0.005

I was having challenges with enabling the spindle, but I now have it going. I can spin the spindle using an open loop of:
Code:
addf scale.0 servo-thread setp scale.0.gain 0.0025 net spindle-speed-scale motion.spindle-speed-out => scale.0.in net spindle-speed-DAC scale.0.out => hm2_5i25.0.7i77.0.1.analogout5

However, the challenge is how to close the loop. The old code on the machine did not seem to let me change the speed.

It is likely the amount of code I have uploaded/recycled/repaired in the .hal file that is causing the issue. I will next try to make a new configuration using the PNCCONFIG to make the control loop for me.

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

More
7 years 9 months ago #123450 by Vitran
I figured out some, but not all, of how to make it work. If I click spin forward it will give an output voltage of 1, then if I click the +, it will go to 10V. Same in reverse.

I do not think it is doing any form of PID control now. It only has a P of 1. Is there a tuning process for spindles? The Calibration window doesn't seem to let me control the spindle inputs. I suppose I could renumber the spindle to _8 so that it would show up. I will try that tomorrow.

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

Time to create page: 0.238 seconds
Powered by Kunena Forum