Step or velocity control for servo gantry
03 Oct 2014 19:50 - 03 Oct 2014 19:50 #51754
by andypugh
if you usethen you get pid.0.Pgain, pid.1.Pgain, pid.3.Pgain etc
If you instead usethen you get pid.x.Pgain etc.
It is up to you to choose sensible names, you could useif you wanted to make your HAL file utterly impenetrable
Replied by andypugh on topic Step or velocity control for servo gantry
setp pid.x.Pgain [AXIS_0]P
shouldnt this be pid.0.Pgain?
in the docs <loopnum> is a number, don't know if a letter works?
if you use
loadrt pid count=3
If you instead use
loadrt pid count=3 names=pid.x,pid.y,pid.z
It is up to you to choose sensible names, you could use
loadrt pid count=3 names=encoder.0,and2.3,bladerunner
Last edit: 03 Oct 2014 19:50 by andypugh.
Please Log in or Create an account to join the conversation.
- crisiacuf@yahoo.com
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
04 Oct 2014 14:29 #51779
by crisiacuf@yahoo.com
Replied by crisiacuf@yahoo.com on topic Step or velocity control for servo gantry
I am now using a 7i77+7i85s setup with encoder feedback from my MR-J2S40A virtual encoder and things start to get crazy.
My servo is getting Al 20 wich is an encoder communication error or excessive acceleration according to the manual.
Funny thing is this happens at linuxCNC startup with either of the two bus connections to the servo(encoder abz signals OR speed command with voltage and enable). So as long as I don't feed +/-10V to the servo this can't be accelearation error which lefts me with encoder communication error.
This only happens at Linux CNC startup.
What's even funnier, I somehow got past the startup.In pncconf I got to the axis test but I get AL20 after I move the axis a couple of mm with only around 0,5V(from 10V max speed) speed command.
Even if it's offline because of this bellowed AL-20, the amplifier still sends the virtual encoder signal and Linux CNC correctly displays my axis movement. So the position is correctly read by the amplifier and correctly sent to the 7i77.
I'll check every wire and shield connection and get back.
My servo is getting Al 20 wich is an encoder communication error or excessive acceleration according to the manual.
Funny thing is this happens at linuxCNC startup with either of the two bus connections to the servo(encoder abz signals OR speed command with voltage and enable). So as long as I don't feed +/-10V to the servo this can't be accelearation error which lefts me with encoder communication error.
This only happens at Linux CNC startup.
What's even funnier, I somehow got past the startup.In pncconf I got to the axis test but I get AL20 after I move the axis a couple of mm with only around 0,5V(from 10V max speed) speed command.
Even if it's offline because of this bellowed AL-20, the amplifier still sends the virtual encoder signal and Linux CNC correctly displays my axis movement. So the position is correctly read by the amplifier and correctly sent to the 7i77.
I'll check every wire and shield connection and get back.
Please Log in or Create an account to join the conversation.
04 Oct 2014 22:00 #51784
by PCW
Replied by PCW on topic Step or velocity control for servo gantry
If you get errors with no commands (analog input disconnected)
it sounds like a noise/ground loop issue
I would check that the drives and the PC running the 7I77 are grounded to the same point,
that the motors are mounted and have secure ground returns to the drive
(large HF currents flow in the motor ground return to the drive due to the HV
square wave PWM signal driving the stator winding to ground capacitance)
it sounds like a noise/ground loop issue
I would check that the drives and the PC running the 7I77 are grounded to the same point,
that the motors are mounted and have secure ground returns to the drive
(large HF currents flow in the motor ground return to the drive due to the HV
square wave PWM signal driving the stator winding to ground capacitance)
Please Log in or Create an account to join the conversation.
- crisiacuf@yahoo.com
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
08 Oct 2014 19:52 #51894
by crisiacuf@yahoo.com
Replied by crisiacuf@yahoo.com on topic Step or velocity control for servo gantry
Yes, that's what I suspect also. I am now rewiring everything to make sure there is no ground loop and everything is nice and tidy.
Please Log in or Create an account to join the conversation.
- crisiacuf@yahoo.com
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
14 Oct 2014 00:53 #52056
by crisiacuf@yahoo.com
Replied by crisiacuf@yahoo.com on topic Step or velocity control for servo gantry
Ok, I separated the logic ground used by mesa and PC from the amplifiers, motors and main box ground shield.
I am now experimenting on the Z axis instead of X. Z has a belt 1:2 multiplication X is direct drive.
I am now using feedback from the amplifiers virtual encoders @ 25000 pulses/rev so 10000 pulses/mm and things are working much better.
I got a max Ferror of around 0.01mm @ < 6000mm/s speed. Around 6000 something happens and Ferror rises to 1mm instantly. I dont know why,yet, but It,s not my main problem for the moment.
I am now changing the X direct drive to belt drive and trying to setup the gantry mode(2 joint Y axis).
Could someone guide me to the git link for the 2.7 pre version with improved TP of LinuxCNC please?
I am now experimenting on the Z axis instead of X. Z has a belt 1:2 multiplication X is direct drive.
I am now using feedback from the amplifiers virtual encoders @ 25000 pulses/rev so 10000 pulses/mm and things are working much better.
I got a max Ferror of around 0.01mm @ < 6000mm/s speed. Around 6000 something happens and Ferror rises to 1mm instantly. I dont know why,yet, but It,s not my main problem for the moment.
I am now changing the X direct drive to belt drive and trying to setup the gantry mode(2 joint Y axis).
Could someone guide me to the git link for the 2.7 pre version with improved TP of LinuxCNC please?
Please Log in or Create an account to join the conversation.
14 Oct 2014 01:01 #52058
by andypugh
Alternatively you might be running into encoder count-rate limits. How many counts per second is that?
Replied by andypugh on topic Step or velocity control for servo gantry
That is possibly as fast as the motor is able to go. How many RPM is that?Around 6000 something happens and Ferror rises to 1mm instantly.
Alternatively you might be running into encoder count-rate limits. How many counts per second is that?
buildbot.linuxcnc.org is the easy way.Could someone guide me to the git link for the 2.7 pre version with improved TP of LinuxCNC please?
Please Log in or Create an account to join the conversation.
14 Oct 2014 01:03 - 14 Oct 2014 01:03 #52059
by PCW
Replied by PCW on topic Step or velocity control for servo gantry
Master has the improved TP so
git checkout master
should be enough
on your speed issue, you may be running into the encoder max count rate
(you can try turning off the filter bit in the encoders if its currently set)
git checkout master
should be enough
on your speed issue, you may be running into the encoder max count rate
(you can try turning off the filter bit in the encoders if its currently set)
Last edit: 14 Oct 2014 01:03 by PCW.
Please Log in or Create an account to join the conversation.
12 Nov 2014 02:09 #53026
by crisiacuf
Replied by crisiacuf on topic Step or velocity control for servo gantry
I have been configuring my gantry in the past few weeks. I took the hal file and edit it by hand.
I now have movement in all axis using both rotary and linear encoder.
The dual joint Y axis works ok. I am using one as a master and the other as slave but I have an awkward problem in inverting the axis direction.
My working .ini file looks like this:
TYPE = LINEAR
MAX_VELOCITY = 125.0
MAX_ACCELERATION = 300.0
BACKLASH = 0.000
FERROR = 5
MIN_FERROR = 1
INPUT_SCALE = 10000
INPUT_SCALE_LINEAR = 200
OUTPUT_SCALE = 125
OUTPUT_SCALE_NEG = -125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 125
MIN_LIMIT = 0
MAX_LIMIT = 1100.0
HOME = 0.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 2.0
HOME_LATCH_VEL = -2.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
DEADBAND = 0.001
P = 450
I = 12
D = 0.2
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
SCALE_P = 0
SCALE_I = 100
SCALE_DEADBAND = 0.006
SCALE_MAXCORR = 0.2
With this config axis works ok, no feed error.
To change axis direction I modified:
INPUT_SCALE = -10000
INPUT_SCALE_LINEAR = -200
OUTPUT_SCALE = -125
Now I get Feed error.
Any idea why?
I now have movement in all axis using both rotary and linear encoder.
The dual joint Y axis works ok. I am using one as a master and the other as slave but I have an awkward problem in inverting the axis direction.
My working .ini file looks like this:
TYPE = LINEAR
MAX_VELOCITY = 125.0
MAX_ACCELERATION = 300.0
BACKLASH = 0.000
FERROR = 5
MIN_FERROR = 1
INPUT_SCALE = 10000
INPUT_SCALE_LINEAR = 200
OUTPUT_SCALE = 125
OUTPUT_SCALE_NEG = -125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 125
MIN_LIMIT = 0
MAX_LIMIT = 1100.0
HOME = 0.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 2.0
HOME_LATCH_VEL = -2.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
DEADBAND = 0.001
P = 450
I = 12
D = 0.2
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
SCALE_P = 0
SCALE_I = 100
SCALE_DEADBAND = 0.006
SCALE_MAXCORR = 0.2
With this config axis works ok, no feed error.
To change axis direction I modified:
INPUT_SCALE = -10000
INPUT_SCALE_LINEAR = -200
OUTPUT_SCALE = -125
Now I get Feed error.
Any idea why?
Please Log in or Create an account to join the conversation.
12 Nov 2014 05:47 #53030
by DaBit
Replied by DaBit on topic Step or velocity control for servo gantry
Keep these the same:
OUTPUT_SCALE = 125
OUTPUT_SCALE_NEG = -125
MAX_OUTPUT = 125
OUTPUT_SCALE = 125
OUTPUT_SCALE_NEG = -125
MAX_OUTPUT = 125
Please Log in or Create an account to join the conversation.
- crisiacuf@yahoo.com
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
12 Nov 2014 17:31 #53040
by crisiacuf@yahoo.com
Replied by crisiacuf@yahoo.com on topic Step or velocity control for servo gantry
Using PNCconf I made 2 configurations, one with motor and encoder inverted and one with motor and encoder non inverted.
The ONLY difference between the 2 .ini and .hal files are changed signs for ENCODER_SCALE and OUTPUT_SCALE.
"+" for non-inverted and "-" for inverted.
Keeping
OUTPUT_SCALE
OUTPUT_SCALE_NEG
MAX_OUTPUT
and
changing signs for
INPUT_SCALE
INPUT_SCALE_LINEAR
returns following error.
Any other ideas? The last resort would be to inverse the command signal for the servos.
PS
I used the SNS-mill configuration mostly and added linear scales for Y and servo for Z.
Thank you DaBit
The ONLY difference between the 2 .ini and .hal files are changed signs for ENCODER_SCALE and OUTPUT_SCALE.
"+" for non-inverted and "-" for inverted.
Keeping
OUTPUT_SCALE
OUTPUT_SCALE_NEG
MAX_OUTPUT
and
changing signs for
INPUT_SCALE
INPUT_SCALE_LINEAR
returns following error.
Any other ideas? The last resort would be to inverse the command signal for the servos.
PS
I used the SNS-mill configuration mostly and added linear scales for Y and servo for Z.
Thank you DaBit
Please Log in or Create an account to join the conversation.
Time to create page: 0.243 seconds