Discussion:
[Emc-users] Fanuc analog drive & LinuxCNC tuning
Frederic RIBLE
2016-12-08 21:56:02 UTC
Permalink
Hello

At Electrolab hackerspace, we are working on the retrofit of a
Mori-Seiki SL0 CNC lathe.
We are are using a Mesa 6i24/7i48 combination.
The drive is a A06B-6047-H208 (double velocity control unit).
Axis motors are A06B-0641-B011 and A06B-0642-B011 (yellow cap).
The position feedback comes from a 2000ppr encoder.
We use the Mesa board to convert the pulses to an analog feedback
velocity signal.
We have done the HAL cabling as below.
First results are promising : we can control the position.
But we see some oscillations on the velocity (periodic with 33 ms period).
Oscillations start when the position command changes, and never stop,
even when the pos-cmd becomes constant.
Same issue if we disable the PID loop in HAL.
So we believe the problem is coming from the drive.
When we decrease the analog gain in the drive after the error amplifier
(comparison between velocity command and feedback), we can decrease the
oscillation.
As we can see a phase compensation circuit in the drive, we assume this
is to compensate for delay on velocity feedback.
So, we have tried to add some delay on the velocity feedback assuming
original F/V converter from the Fanuc control board may be slower than
what we have with Mesa. Not much success: that changes a little the
oscillation period, but we cannot cancel oscillation.

Anyone knows how we can tune the drive (unfortunately we have not the
documentation for this part number) ?

Thanks
Frederic.


Loading Image...
Peter C. Wallace
2016-12-09 01:21:44 UTC
Permalink
Date: Thu, 8 Dec 2016 22:56:02 +0100
Reply-To: "Enhanced Machine Controller (EMC)"
Subject: [Emc-users] Fanuc analog drive & LinuxCNC tuning
Hello
At Electrolab hackerspace, we are working on the retrofit of a
Mori-Seiki SL0 CNC lathe.
We are are using a Mesa 6i24/7i48 combination.
The drive is a A06B-6047-H208 (double velocity control unit).
Axis motors are A06B-0641-B011 and A06B-0642-B011 (yellow cap).
The position feedback comes from a 2000ppr encoder.
We use the Mesa board to convert the pulses to an analog feedback
velocity signal.
We have done the HAL cabling as below.
First results are promising : we can control the position.
But we see some oscillations on the velocity (periodic with 33 ms period).
Oscillations start when the position command changes, and never stop,
even when the pos-cmd becomes constant.
Same issue if we disable the PID loop in HAL.
So we believe the problem is coming from the drive.
When we decrease the analog gain in the drive after the error amplifier
(comparison between velocity command and feedback), we can decrease the
oscillation.
As we can see a phase compensation circuit in the drive, we assume this
is to compensate for delay on velocity feedback.
So, we have tried to add some delay on the velocity feedback assuming
original F/V converter from the Fanuc control board may be slower than
what we have with Mesa. Not much success: that changes a little the
oscillation period, but we cannot cancel oscillation.
Anyone knows how we can tune the drive (unfortunately we have not the
documentation for this part number) ?
Thanks
Frederic.
Are you sure the PWMGEN output mode is set to mode 2 ?
(you will get very weird and unstable results otherwise)
Note that changing the mode may invert the feedback so beware of runaways


Also since you are closing a velocity loop, you may want to
run the servo thread faster (say 2 to 8 KHz if your PC can do it)
https://forum.linuxcnc.org/media/kunena/attachments/16648/Mauriceservo.jpg
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Emc-users mailing list
https://lists.sourceforge.net/lists/listinfo/emc-users
Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
Frederic RIBLE
2016-12-09 06:53:02 UTC
Permalink
Post by Peter C. Wallace
Are you sure the PWMGEN output mode is set to mode 2 ?
(you will get very weird and unstable results otherwise)
Note that changing the mode may invert the feedback so beware of runaways
I think so, will double check.
We have monitored the analog output of the 7i48 with an oscilloscope:
looks good, both for positive and negative values.
But there is some high frequency noise that may come from the cabling.
Post by Peter C. Wallace
Also since you are closing a velocity loop, you may want to
run the servo thread faster (say 2 to 8 KHz if your PC can do it)
We have tested 1 kHz and 10 kHz: not much difference.

Thank you for your help.
Frederic.
Peter C. Wallace
2016-12-09 16:23:45 UTC
Permalink
Date: Fri, 9 Dec 2016 07:53:02 +0100
Reply-To: "Enhanced Machine Controller (EMC)"
Subject: Re: [Emc-users] Fanuc analog drive & LinuxCNC tuning
Post by Peter C. Wallace
Are you sure the PWMGEN output mode is set to mode 2 ?
(you will get very weird and unstable results otherwise)
Note that changing the mode may invert the feedback so beware of runaways
I think so, will double check.
looks good, both for positive and negative values.
But there is some high frequency noise that may come from the cabling.
Post by Peter C. Wallace
Also since you are closing a velocity loop, you may want to
run the servo thread faster (say 2 to 8 KHz if your PC can do it)
We have tested 1 kHz and 10 kHz: not much difference.
Thank you for your help.
Frederic.
Is the velocity loop gain in LinuxCNC set correctly?

That is, is it set so you get ~+-10V at +-2000 RPM
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Emc-users mailing list
https://lists.sourceforge.net/lists/listinfo/emc-users
Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
Frederic RIBLE
2016-12-10 00:19:13 UTC
Permalink
Post by Peter C. Wallace
Is the velocity loop gain in LinuxCNC set correctly?
That is, is it set so you get ~+-10V at +-2000 RPM
The gain should be ok because we have tuned it to achieve very small
following error when all PID parameters are 0 except FF1=1.
In that way, the axis is running in open loop.
Jon Elson
2016-12-09 20:21:28 UTC
Permalink
Post by Frederic RIBLE
Hello
At Electrolab hackerspace, we are working on the retrofit of a
Mori-Seiki SL0 CNC lathe.
We are are using a Mesa 6i24/7i48 combination.
The drive is a A06B-6047-H208 (double velocity control unit).
Axis motors are A06B-0641-B011 and A06B-0642-B011 (yellow cap).
The position feedback comes from a 2000ppr encoder.
We use the Mesa board to convert the pulses to an analog feedback
velocity signal.
We have done the HAL cabling as below.
First results are promising : we can control the position.
But we see some oscillations on the velocity (periodic with 33 ms period).
Oscillations start when the position command changes, and never stop,
even when the pos-cmd becomes constant.
Same issue if we disable the PID loop in HAL.
So we believe the problem is coming from the drive.
When we decrease the analog gain in the drive after the error amplifier
(comparison between velocity command and feedback), we can decrease the
oscillation.
As we can see a phase compensation circuit in the drive, we assume this
is to compensate for delay on velocity feedback.
So, we have tried to add some delay on the velocity feedback assuming
original F/V converter from the Fanuc control board may be slower than
what we have with Mesa. Not much success: that changes a little the
oscillation period, but we cannot cancel oscillation.
Anyone knows how we can tune the drive (unfortunately we have not the
documentation for this part number) ?
Thanks
Frederic.
https://forum.linuxcnc.org/media/kunena/attachments/16648/Mauriceservo.jpg
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Emc-users mailing list
https://lists.sourceforge.net/lists/listinfo/emc-users
Jon Elson
2016-12-09 20:28:48 UTC
Permalink
Post by Frederic RIBLE
As we can see a phase compensation circuit in the drive, we assume this
is to compensate for delay on velocity feedback.
So, we have tried to add some delay on the velocity feedback assuming
original F/V converter from the Fanuc control board may be slower than
what we have with Mesa. Not much success: that changes a little the
oscillation period, but we cannot cancel oscillation.
No, it is probably FASTER. The Mesa probably is delayed by a ms reading
the encoder position, and then another ms sending the DAC output. The
circuit used by Fanuc was almost time-continuous except for the encoder
positional granularity. It was similar to the ST chip L290, which
decoded quadrature state changes into count-up and count-down pulses,
and fed them into a pair of analog integrators. These were then fed to a
differential summing amp. So, the response to a movement of the encoder
came out in some microseconds.
Post by Frederic RIBLE
Anyone knows how we can tune the drive (unfortunately we have not the
documentation for this part number) ?
You might improve the results by decreasing the period of the servo thread.

Jon
Peter C. Wallace
2016-12-09 20:48:16 UTC
Permalink
Date: Fri, 09 Dec 2016 14:28:48 -0600
Subject: Re: [Emc-users] Fanuc analog drive & LinuxCNC tuning
Post by Frederic RIBLE
As we can see a phase compensation circuit in the drive, we assume this
is to compensate for delay on velocity feedback.
So, we have tried to add some delay on the velocity feedback assuming
original F/V converter from the Fanuc control board may be slower than
what we have with Mesa. Not much success: that changes a little the
oscillation period, but we cannot cancel oscillation.
No, it is probably FASTER. The Mesa probably is delayed by a ms reading
the encoder position, and then another ms sending the DAC output. The
circuit used by Fanuc was almost time-continuous except for the encoder
positional granularity. It was similar to the ST chip L290, which
decoded quadrature state changes into count-up and count-down pulses,
and fed them into a pair of analog integrators. These were then fed to a
differential summing amp. So, the response to a movement of the encoder
came out in some microseconds.
Post by Frederic RIBLE
Anyone knows how we can tune the drive (unfortunately we have not the
documentation for this part number) ?
You might improve the results by decreasing the period of the servo thread.
Jon
There are only some 10s of usec between reading the encoder and writing the
PWM value, assuming the read and write functions are in the proper order in
the hal file. Also Fred said that changing the servo thread from 1 to 10 KHZ
made little difference, so I dont think its a loop bandwith issue

Still waiting to see if they have the velocity scaling right on the velocity
feedback output ( ~10V at max motor speed)




Peter Wallace
Mesa Electronics
Frederic RIBLE
2016-12-10 00:26:02 UTC
Permalink
Post by Peter C. Wallace
There are only some 10s of usec between reading the encoder and writing the
PWM value, assuming the read and write functions are in the proper order in
the hal file. Also Fred said that changing the servo thread from 1 to 10 KHZ
made little difference, so I dont think its a loop bandwith issue
Good idea, we have to check the functions order.
About original Fanuc F/V converter delay comparing to mesa,
unfortunately we cannot measure because it is faulty.
Another clue: we have very similar oscillations at low or high speed.
So the problem is not coming from period/frequency mode switching in the
velocity estimation algorithms.
Peter C. Wallace
2016-12-10 14:34:44 UTC
Permalink
Date: Sat, 10 Dec 2016 01:26:02 +0100
Reply-To: "Enhanced Machine Controller (EMC)"
Subject: Re: [Emc-users] Fanuc analog drive & LinuxCNC tuning
Post by Peter C. Wallace
There are only some 10s of usec between reading the encoder and writing the
PWM value, assuming the read and write functions are in the proper order in
the hal file. Also Fred said that changing the servo thread from 1 to 10 KHZ
made little difference, so I dont think its a loop bandwith issue
Good idea, we have to check the functions order.
About original Fanuc F/V converter delay comparing to mesa,
unfortunately we cannot measure because it is faulty.
Another clue: we have very similar oscillations at low or high speed.
So the problem is not coming from period/frequency mode switching in the
velocity estimation algorithms.
What is the magnitude of the oscillation?

can you plot it and provide a link to the plot?
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Emc-users mailing list
https://lists.sourceforge.net/lists/listinfo/emc-users
Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
Frederic RIBLE
2016-12-13 20:44:05 UTC
Permalink
Post by Peter C. Wallace
What is the magnitude of the oscillation?
can you plot it and provide a link to the plot?
Looks like we have a scaling mismatch somewhere in the drive between
command and feedback.
However, that does not explain everything.
Will come back soon with a plot.

Loading...