Servo tuning: checking out drives
18 Nov 2017 22:19 #101981
by Machinen
Servo tuning: checking out drives was created by Machinen
Hi,
I have begun testing out my servo system. It is based on 7i77 with encoder input and analog output to velocity commanded servo drives powering DC motors with tacho feedback to the drive.
So far I have been doing only mock-up configuration with motor and encoder connected shaft to shaft on my table. Before I will mount it on the machine, I wanted to test it if it works. (It is new old stock of mid 80s system.) I have just pushed P constant enough to spin the motor and it is able to move to one, two counts.
However, it presented question if there is a way in LinuxCNC to simply check the PID (PI - I think -in the case of my servos) loop inside the servo driver - i.e. the linearity of commanded/actual velocity?
Thanks.
I have begun testing out my servo system. It is based on 7i77 with encoder input and analog output to velocity commanded servo drives powering DC motors with tacho feedback to the drive.
So far I have been doing only mock-up configuration with motor and encoder connected shaft to shaft on my table. Before I will mount it on the machine, I wanted to test it if it works. (It is new old stock of mid 80s system.) I have just pushed P constant enough to spin the motor and it is able to move to one, two counts.
However, it presented question if there is a way in LinuxCNC to simply check the PID (PI - I think -in the case of my servos) loop inside the servo driver - i.e. the linearity of commanded/actual velocity?
Thanks.
Please Log in or Create an account to join the conversation.
19 Nov 2017 00:49 #101985
by PCW
Replied by PCW on topic Servo tuning: checking out drives
You could temporarily disconnect the 7i77 analog out pin(s) from the pid output
( say by commenting out the net statement that connects them in the hal file )
and then you can just set the analog out by hand:
halcmd setp hm2_5i25.0.7i77.0.1.analogout0 5
(for 5V with the default +- 10V scaling)
and then reading the encoder velocity
The encoder velocity will be in machine units per second if the encoder scaling is correct
( say by commenting out the net statement that connects them in the hal file )
and then you can just set the analog out by hand:
halcmd setp hm2_5i25.0.7i77.0.1.analogout0 5
(for 5V with the default +- 10V scaling)
and then reading the encoder velocity
The encoder velocity will be in machine units per second if the encoder scaling is correct
Please Log in or Create an account to join the conversation.
19 Nov 2017 19:55 #102033
by Machinen
Replied by Machinen on topic Servo tuning: checking out drives
Thanks,
I tried that and it went reasonably well. I had to set up the f-error to some big number because it was easier than disconnecting enable from the loop.
Based on plotted command voltage in V on actual velocity in mms^-1 I would say that it is not so bad:
But I discovered that I haven't had zeroed input gain properly. And I don't know if I will ever be able to completely zero it for motor to stop. It is still moving one count in couple seconds. How big problem it is going to be?
I tried that and it went reasonably well. I had to set up the f-error to some big number because it was easier than disconnecting enable from the loop.
Based on plotted command voltage in V on actual velocity in mms^-1 I would say that it is not so bad:
But I discovered that I haven't had zeroed input gain properly. And I don't know if I will ever be able to completely zero it for motor to stop. It is still moving one count in couple seconds. How big problem it is going to be?
Please Log in or Create an account to join the conversation.
19 Nov 2017 20:40 #102035
by PCW
Replied by PCW on topic Servo tuning: checking out drives
Slow drift on analog velocity mode drives is normal and harmless
Once the PID loop is closed the drives cannot drift
Also the drives should not be enabled unless LinuxCNC is running
and in control of the position loop (except for this kind of testing)
Once the PID loop is closed the drives cannot drift
Also the drives should not be enabled unless LinuxCNC is running
and in control of the position loop (except for this kind of testing)
Please Log in or Create an account to join the conversation.
20 Nov 2017 23:01 #102113
by Machinen
Replied by Machinen on topic Servo tuning: checking out drives
The motor seems to be a lot stiffer than before because of the zeroing of the input gain. Before I was able to move the shaft about 20 counts out of position, but now I can only about 2 counts before the system will put enough force to overpower me. I probably zeroed it when PID calculation was running with nonzero P which caused faulty "base" zero. To actually turn off PID is good advice and I think should be included servo tuning howtos.
Please Log in or Create an account to join the conversation.
Time to create page: 0.085 seconds