Mori MVJR Build Log

More
08 Nov 2011 17:16 #14681 by schmidtmotorworks
Thanks now i know what to do about PID I think.

In regards to tuning the velocity pots on the servo boards, I am wondering if there is a similar way to do that using halscope so I can avoid removing the drive motors (removing the Y motor looks rather difficult)

I'm thinking maybe I can make a program like you described (with longer travel) track velocity and adjust the pot.

Does this make sense or am I off track?

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

More
09 Nov 2011 07:20 #14711 by schmidtmotorworks
Today I tried to set the velocity of the X axis drive motor.

If I tried to set the following above 0.52 the motor turned off. It seemed like there was a limit set in the servo board, I has to restart the machine to test it again.

setp hm2_5i23.0.pwmgen.00.value

I originally had the following settings and the rpm was at 0.5 pwmgen was about 1/2 the goal of 1500 rpm.

OUTPUT_SCALE = 1
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 10

I tried

OUTPUT_SCALE = 10

The motor spun much faster.

Perhaps OUTPUT_SCALE should be set to 2?

I tried to figure out what to do by reading the OUTPUT_SCALE and OUTPUT_OFFSET section here but I don't even know what the voltage to the motor is supposed to be.

linuxcnc.org/docs/html/config_ini_config...ub:%5BHAL%5D-section
(And this was way over my head)

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

More
09 Nov 2011 12:42 #14713 by andypugh
Replied by andypugh on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

Today I tried to set the velocity of the X axis drive motor.


I am not entirely sure what you mean by this.

What are you adjusting? What is the voltage at the servo drive command inputs?

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

More
09 Nov 2011 15:31 #14715 by schmidtmotorworks
andypugh wrote:

schmidtmotorworks wrote:

Today I tried to set the velocity of the X axis drive motor.


I am not entirely sure what you mean by this.

What are you adjusting?


This was my planned procedure, maybe i am doing something wrong.

Disconnect X drive motor from screw.
1. Unlink the pwmgen for the axis "unlinkp hm2_5i23.0.pwmgen.00.value"
2. "setp hm2_5i23.0.pwmgen.00.value 1.0" (would only accept up to 0.52 or so)

3. Measure rpm of motor, should be 1500 rpm to = rapid 15000mm/min (590"/min)

4. Adjust the 1st potentiometer on the drive until it yields the desired RPM.
5. Adjust the 2nd potentiometer so the servo is stationary at 0V.

So I couldn't complete step 2 since any value I tried above 0.52 stopped the motor.

andypugh wrote:

What is the voltage at the servo drive command inputs?


I'm not sure what to measure to answer that, I am using a 7i48 to control the drives. if I understand correctly it outputs a range of -10 to 10. I am not sure about that and haven't tested it.

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

More
09 Nov 2011 16:39 #14717 by PCW
Replied by PCW on topic Re:Mori MVJR Build Log
You would read this at the 7I48 analog output (relative to ground)

I would set up the velocity like this:

First you cannot set the maximum velocity to exactly your maximum traverse rate (1500 RPM) as this gives the PID loop no headroom to work with during rapids I would leave at least 20% headroom (1800 RPM or 30 RPS)

So the first thing to do is set your drives so that full scale analog output (10V) gives you 1800 RPM
This either needs a accurate power supply or the 7I48 output

For example you could set the 7I48 output to 5V by setting hm2_5i23.0.pwmgen.00.value to 1/2 of hm2_5i23.0.pwmgen.00.scale and set the motor speed to 900 RPM (1/2 of full scale)
I am using 1/2 scale here so you dont cause a motor fault

After this is done I would set both the hm2_5i23.0.pwmgen.00.scale and PID max output value to the traverse rate in machine units per second when the motor is turning 1800 RPM

This makes the PIDs output units commensurate with its inputs (which are in machine units (P) and machine units per second (FF1) and machine units per second^2 (FF2))

Having commensurate units means that the correct FF1 should be quite close to 1

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

More
09 Nov 2011 17:45 #14721 by schmidtmotorworks

For example you could set the 7I48 output to 5V by setting hm2_5i23.0.pwmgen.00.value to 1/2 of hm2_5i23.0.pwmgen.00.scale and set the motor speed to 900 RPM (1/2 of full scale)
I am using 1/2 scale here so you dont cause a motor fault


Thanks for the help, so if I understand correctly, this is the proceedure.

1. Unlink the pwmgen for the axis "unlinkp hm2_5i23.0.pwmgen.00.value"
2. "setp hm2_5i23.0.pwmgen.00.value 0.5"
3. Adjust the pot to get 900 RPM

After this is done I would set both the hm2_5i23.0.pwmgen.00.scale and PID max output value to the traverse rate in machine units per second when the motor is turning 1800 RPM


The screw has a 10mm pitch so 1800 RPM = 11.81inches

So If I understand correctly I should make the following settings:

MAX_VELOCITY = 9.842 (because this would be 1500 RPM)
OUTPUT_SCALE = 11.81
OUTPUT_OFFSET = 0.0? No idea what this should be, the docs are over my head.
MAX_OUTPUT = 11.81

Is that right?

If so, I'm wondering if when a rapid is commanded, wouldn't the hm2_5i23.0.pwmgen.00.value go to 1.0 and cause it turn off the same as it does when I input 1.0?

This makes the PIDs output units commensurate with its inputs (which are in machine units (P) and machine units per second (FF1) and machine units per second^2 (FF2))

Having commensurate units means that the correct FF1 should be quite close to 1


So then I will start with:

FF0 = 0
FF1 = 1.0
FF2 = 0

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

More
09 Nov 2011 17:55 - 09 Nov 2011 17:57 #14722 by PCW
Replied by PCW on topic Re:Mori MVJR Build Log
"If so, I'm wondering if when a rapid is commanded, wouldn't the hm2_5i23.0.pwmgen.00.value go to 1.0 and cause it turn off the same as it does when I input 1.0?"

No, at the max rapid rate the PIDs FF1 term should supply about 8v which should be what needed to run the motor at 1500 RPM (after the pot is adjusted)

I am guessing (but not sure) that the reason the motor turns off is some kind of over speed fault so this suggests that the speed range is way out of adjustment. You _should_ be able to use full +-10V once the speed range is adjusted (POT 1?)

Once the pot its adjusted you should be able to have full PWM (10V) or 1800 RPM equivalent but this will only be requested if the position is far enough behind that its required for a ms or two
Last edit: 09 Nov 2011 17:57 by PCW. Reason: Spelling

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

More
09 Nov 2011 21:28 #14729 by schmidtmotorworks
OK thanks a lot for the explanation, I look forward to trying it tonight.

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

More
10 Nov 2011 05:46 - 10 Nov 2011 06:32 #14733 by schmidtmotorworks
OK here is what I found:

pwmgen = 0.5
output scale = 10
pot range min max
voltage 0.8v to 26.3v
rpm 1 to 321

pwmgen = 1
output scale = 10
pot range min max
voltage 0.8v to 51.7v
rpm 1 to 637

pwmgen = 1
output scale = 1
pot range min max
voltage 0.8v to 145v
rpm 1 to 1950 (cuts off somewhere above that)

No setting of MAX OUTPUT made any difference

So I decided to use the following settings: (I hope it is OK)

output scale = 1
pot range set rpm = 1825 (couldn't get any closer to 1800)
Last edit: 10 Nov 2011 06:32 by schmidtmotorworks.

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

More
10 Nov 2011 14:47 - 10 Nov 2011 14:49 #14742 by PCW
Replied by PCW on topic Re:Mori MVJR Build Log
"No setting of MAX OUTPUT made any difference"

This is because you are bypassing the PID loop. MAX OUTPUT limits the maximum output of the PID loop

It is _VERY_ important once you re-connect the PID loop

I still suggest that you normalize the PID numbers by setting both PWM scale and MAX OUTPUT to machine units/sec at 1825 RPM. This has the advantage that the FF1 number is now known (close to 1)
and also makes it easier for people to help you with PID tuning

(If you change one, change the other it normally makes no sense to have PWM scale different than MAX OUTPUT)
Last edit: 10 Nov 2011 14:49 by PCW. Reason: missing text

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

Moderators: cncbasher
Time to create page: 0.145 seconds
Powered by Kunena Forum