Set up using AMC AB15A100 drives, brushed DC motor Prototrak Plus with Encoders

More
14 Jun 2022 18:01 - 14 Jun 2022 18:10 #245142 by new2linux
Todd, Many thanks! (I removed some pics that were not good) The 1 thing that has changed is the x axes (the one, I am working with) has started to travel, very slow, need to have F2 up to stop. I tried adj POT4, ever so small amount of POT4 & it will slow and barely stop (not really, real slow) & revere direction, but never really stop. All SW1 are OFF, BUT sw1-5 will change this, or not? Just to clarify DRO, at the Linuxcnc logo screen DRO reads the positive in the x & y axes as to match direction on screen of logo & as I stand in front of mill with the logo & mill table seem to move same way, I have underhand need to place yourself in the mill column location of the mill to view DRO to see if direction proper or not.

Edit: If the axes is homed it will stop motion, y axes seems to osculated some (wonders) but not full revolution.
Last edit: 14 Jun 2022 18:10 by new2linux.

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

More
14 Jun 2022 18:25 - 14 Jun 2022 19:13 #245143 by new2linux
Todd, Many Thanks!! The attached pic are (FF1=1.0) POT 1 at 5.0 CW & 4.75 CW. Any suggestions welcomed. Many thanks.

Edit: Add pic (FF1=1.0) with POT 1 as high as 5.75CW turn; see name of file.
Many thanks
Last edit: 14 Jun 2022 19:13 by new2linux.

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

More
15 Jun 2022 14:18 #245196 by Todd Zuercher
When all of the PID terms except FF1 are 0, some drifting when the drive is enabled is to be expected. Once you start tuning the P in Linuxcnc all of the drifting will stop. It drifts because Linuxcnc is not performing any correction, it is running pure open loop. Minimizing this drift with pot-4 is the correct thing to do, but isn't always nessisary.

With that info from your images, I think if 5-5/8 turns looks about the best.

I think at this point I would try tuning in Linuxcnc, and try to see how good of results you can get. But If it still has trouble tuning because of the response delay, you might have to look into further tuning in the drive (by experimenting with the dip switches inside the drive or asking AMC for help.)

Are your encoders mounted directly on the motors, or do you have some other setup? If the encoder isn't on the motor, (say for example it is a linear scale on the table) if there is any lost motion between the motor and the feedback device, that could explain the delay in response and no amount of tuning can fix that.
The following user(s) said Thank You: new2linux

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

More
15 Jun 2022 15:21 - 15 Jun 2022 17:25 #245206 by new2linux
Todd, many thanks!! Encoders are on the back of motor (shaft both ends of motor), I have made several traces but this is with the 5.625 turn on POT 1. The traces run up hill, not horizontal, nothing seems to change this.

many thanks

Edit: add pic Edit2: add pic of low P & FF1
Attachments:
Last edit: 15 Jun 2022 17:25 by new2linux.

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

More
15 Jun 2022 18:07 #245213 by Todd Zuercher
Keep adding more P at this point.

Also on your traces in Halscope "axis-0.motor.pos.cmd" isn't particularly useful, replace it with "axis.0.joint-vel-cmd". That will then show a trace of what you are trying to get the velocity feedback to match. Then you can adjusts the P, FF1, and FF2 to get as close as you can.
The following user(s) said Thank You: new2linux

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

More
15 Jun 2022 19:09 - 15 Jun 2022 19:50 #245215 by new2linux
Todd, Many thanks!! The source channel should be "axis.0.joint-vel-cmd" or ref the original axis-0.motor.pos.cmd? Attached is a example Many thanks!

Edit: 2nd pic shows higher "P", much more and it will oscillate & cause joint error. The values are the file name.
Attachments:
Last edit: 15 Jun 2022 19:50 by new2linux.

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

More
16 Jun 2022 14:37 - 16 Jun 2022 15:58 #245270 by Todd Zuercher
You are trying to get the purple (encoder velocity) trace to match the red (commanded vel) trace as closely as possible. You said that much more P causes it to become unstable? The traces don't look unstable at all and look like a lot more P would be possible.

Why did you reduce FF1 so much? You definitely need more FF1, and a little FF2. Add more FF1 until the cruise velocity feedback matches the commanded velocity. Similarly add more FF2 to improve the error during the acceleration and deceleration phases. Be careful a little FF2 goes a long way, and will be difficult to find the right amount due to the delay in your drive Look at the f-error during both the acceleration and deceleration phases of the move while tuning this. (Choose the setting that gives the best average for both.)

Finally if you are able to gather the tools to attempt tuning the current loop of your drives. Attached is a small test configuration with a hal file set up for your x-axis motor with a simple user interface for Siggen to create a square wave output to your drive.  There is a button to enable/disable the drive and inputs to set the freq, and amplitude of the wave. AMC has a video tutorial for doing this to your drive on their website.  You will have to change a number of settings on the drive for the test (don't forget to change them back after you're done.) And the tests should probably be done with the motor disconnected from the machine.
The test config will open Halscope but, it won't be much use, because it doesn't have enough useful resolution at the frequencies required, and you don't have a way of reading the current output to the motor with it, but I included it anyway for looking at the Siggen frequencies and encoder feedbacks.  Beware this is untested on real hardware I won't guarantee the hal connections are right. Run it by copying the dir to your Linuxcnc configs dir.  Then make the "test.demo" file executable, and run it (while no other Linuxcnc apps are running.)

 
Attachments:
Last edit: 16 Jun 2022 15:58 by Todd Zuercher.
The following user(s) said Thank You: new2linux

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

More
16 Jun 2022 19:28 #245281 by new2linux
Todd, Thank you!! I have tried higher "P" in the pic attached, the file name is the settings or view in the pic. If I go higher "P" as I use the test and the arrow keys, the oscillation will start, the purple trace will have large hi/lows that will cause "joint error out" or just jittery. The "P" is around 40. As you see the traces there is a small amount of this wave (hi to low about 1/3 the div.), higher "P" makes the hi to low more than a division. All the traces the purple trace does not get in to the upper left (hi at the starting) area. I have not been able to increase feed rate above 50"/min.

As I use the arrow key to start the trace, the moving pointer, needs to be in the sliding rectangle box (this is to the left of the word "IDLE") at the top of the screen to start to record the trace. It seems that I need to be careful to not click too soon, for if I do the axes will start to oscillate ever time. The ideal location/spot to start, is at least 1 division (wide distance, this is almost 1/3 of the total distance) from grid below from the very left edge of the sliding trigger box. This could be my imagination, but leave all the same settings & be a bit slower to start trace & it will record the trace, just will not be very long trace.

Many thanks, all suggestions are welcomed.
Attachments:

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

More
16 Jun 2022 19:51 #245284 by Todd Zuercher
I can't read what your scaling in Halscope is for the encoder velocity feed back and the commanded velocity. My guess is that they are not the same, that is why your following error is so large even though those traces mostly line up.

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

More
16 Jun 2022 20:24 #245285 by new2linux
Todd, thanks!
The axis.0.joint-vel-cmd = 100m/div
axis 0 f-error = 5m/div
pid.x.output = 200m/div
hm2_5i25.0.encoder.00.velocity = 100m/div

Many thanks

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

Moderators: piasdom
Time to create page: 0.271 seconds
Powered by Kunena Forum