Servo tuning with voltage control

More
06 Dec 2018 00:14 - 06 Dec 2018 00:16 #121913 by Vitran
I am trying to tune servos and a spindle on a 7i77 however I keep finding either the tuning programs crashing/not letting me continue or my program being locked out as the axis are drifting.

I have 3 servos and a spindle that work off of analog -10 to +10VDC control. The servos have a slight drift to them when at 0.00VDC. I have tried to remove this drift by tuning the 0 reference point on the servo drives, however that seems a lost cause.

This machine requires an output signal on a pin (hm2_5i25.0.7i64.0.2.output-01) in order for the machine to power on. Once on the motors will start to drift on the order of 1rpm/min or less.

I am looking to see what tools in the LinuxCNC that I can use. This is what I see when I try to use the tuning wizard in PNCconfig

Is there a way to turn on the output pin, turn on the scope and have me controlling the axis so that I can tune it to stay at one location then work on getting the PID control values? This is as clean of an install of the LinuxCNC on Debian 9 from BigJohnT's post here.

Link of photos of the machine so far
Last edit: 06 Dec 2018 00:16 by Vitran.

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

More
06 Dec 2018 00:58 #121915 by Vitran
Talking with Andypugh the error can be fixed and will be fixed in future versions of linuxcnc. I am using 2.7.14.

1. Open a terminal
sudo gedit /usr/bin/pncconf
or
sudo nano /usr/bin/pncconf

2. Change line 1641 from
elif hal.is_rt and not hal.kernel_version == actual_kernel:
to
elif hal.is_kernelspace and hal.kernel_version != actual_kernel:

As well, for turning on the e-stop circuit pin when in pncconf, open a terminal and type:
halcmd setp hm2_5i25.00.7i64.0.2.output-01 TRUE

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

More
06 Dec 2018 01:39 #121916 by PCW
I would use the calibrate tool in Axis rather than pncconfs tuning page

Also its is expected that analog servos will drift if the loop is not closed

This should be prevented by the drive enables. The drive enables should be off until LinuxCNC is controlling the drives, that is the drive enables should be connected in hal to LinuxCNCs drive enable pins. This is also a safety issue since this is how LinuxCNC disables the drives in case of a following error or other fault and how the 7I77 disables the drives on a analog section watchdog timeout.

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

More
06 Dec 2018 04:03 #121922 by Vitran
I can change that wiring. Currently the emergency stop circuit controls if the servos are on. I will change it so that the servos will only activate if the servo drives are enabled.

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

More
06 Dec 2018 06:09 #121928 by tommylight
It is imperative that you follow the safety and wiring advice from here.
forum.linuxcnc.org/10-advanced-configura...ning-detailed-how-to

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

More
06 Dec 2018 12:44 #121947 by Vitran
The primary wiring for the e-stop circuit right now is that the PLC produces the power to run through the e-stop circuit.

When machine-is-on, the 24V enters the e stop circuit going through the field loss relay, blowers, hydraulic overload, spindle fault, air pressure, oil pressure, then servo fault. I then tied in the e-stop circuit that the enable pin is linked to check that the e-stop circuit has power.

I will move the enable pin from the e-stop circuit to the enable pin on the 7i77. It was my thought that when the machine-is-on pin was on, the plc had the motors enabled. As well, I was worried that if the emergency stop circuit was hit and the enable pin on the 7i77 was still on, the motors would still be enabled after an e-stop scenario.

What I may do is add a relay tied into the e-stop circuit so that if the e-stop circuit is killed the enable is cut.

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

More
06 Dec 2018 15:09 #121953 by tommylight
E-stop should power off the drives.

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

More
06 Dec 2018 15:16 #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
06 Dec 2018 23:39 #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
20 Dec 2018 15:16 #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.

Time to create page: 0.127 seconds
Powered by Kunena Forum