4th Axis rotation angle limit problem

More
14 years 7 months ago #18728 by billooms
OK. Thanks for the additional information.

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

More
14 years 7 months ago #18740 by ArcEye
Hi

For example C-90.0 goes 3/4 of a turn to the equivalent position of 270 degrees (but turns in the opposite direction). This is really counter-intuitive -- I'm thinking that C-90.0 should give only 1/4 of a turn.

I hit something very similar to this when implementing a toolchanger routine using G Code some while back.

The ATC would try to take the shortest route to the commanded rotary position, which sometimes would mean it trying to rotate backwards against the pawl when the commanded movement angle was over 180 degrees.

Think I solved it by making all moves incremental from the current position.

May not be wholly useful for your situation as no move would be > 315 degrees ish for an eight station turret.

regards

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

More
14 years 6 months ago #19240 by SvenH
I am also trying to get my 4th axis to spin continuously.

Here is what I have found so far:

www.linuxcnc.org/docs/2.5/html/hal/rtcomps.html
linuxcnc.org/docs/html/man/man9/stepgen.9.html

seem to say I should add the following
Code:
ctrl_type=p,p,p,v

to .hal ->

Code:
loadrt stepgen step_type=0,0,0,2 ctrl_type=p,p,p,v

At line 8 (in my case)


I have changed the bottom section from:
Code:
Code:
setp stepgen.3.position-scale [AXIS_3]SCALE setp stepgen.3.steplen 1 setp stepgen.3.stepspace 1 setp stepgen.3.dirhold 35500 setp stepgen.3.dirsetup 35500 setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb net astep <= stepgen.3.step net adir <= stepgen.3.dir net aenable axis.3.amp-enable-out => stepgen.3.enable

In to:

Code:
setp stepgen.3.velocity-cmd [AXIS_3]SCALE setp stepgen.3.maxvel 7200 setp stepgen.3.steplen 1 #setp stepgen.3.stepspace 1 #setp stepgen.3.dirhold 35500 #setp stepgen.3.dirsetup 35500 setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL #net apos-cmd axis.3.motor-vel-cmd => stepgen.3.velocity-cmd net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb #net astep <= stepgen.3.step #net adir <= stepgen.3.dir net aenable axis.3.amp-enable-out => stepgen.3.enable

there is some more code below that that I have not touched about estop and toolchange.

After these changes the emc actually starts up, which is already something.

But when I turn the machine on I get a joint 3 following error.

The .ini file looks like this:
Code:
[AXIS_3] TYPE = ANGULAR #HOME = 0.0 MAX_VELOCITY = 120.0 MAX_ACCELERATION = 1200.0 STEPGEN_MAXACCEL = 1500.0 SCALE = 19.2585459798 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -99999999.0 MAX_LIMIT = 99999999.0 HOME_OFFSET = 0.0

Now when I turn the emc on the a-axis immediately starts to move and stops at what seems to be just after the MIN_FERROR

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

More
14 years 6 months ago #19241 by andypugh
SvenH wrote:

Code:
setp stepgen.3.velocity-cmd [AXIS_3]SCALE setp stepgen.3.maxvel 7200 setp stepgen.3.steplen 1 #setp stepgen.3.stepspace 1 #setp stepgen.3.dirhold 35500 #setp stepgen.3.dirsetup 35500 setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL #net apos-cmd axis.3.motor-vel-cmd => stepgen.3.velocity-cmd net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb #net astep <= stepgen.3.step #net adir <= stepgen.3.dir net aenable axis.3.amp-enable-out => stepgen.3.enable


I don't see any reason not to set the stepspace and other parameters, so I would uncomment those lines.

You have commented out the line which gives a position command to the stepgen:
#net apos-cmd axis.3.motor-vel-cmd => stepgen.3.velocity-cmd
So it may be that the stepgen command pin is pointing to uninitialised memory. You need to uncomment this line.
commenting out the stepgen.step and stepgen.dir lines _ought_ to stop the motor moving at all... so uncomment those lines too.

If you still have the problem, try:
Code:
setp stepgen.3.velocity-cmd [AXIS_3]SCALE setp stepgen.3.maxvel 7200 setp stepgen.3.steplen 1 setp stepgen.3.stepspace 1 setp stepgen.3.dirhold 35500 setp stepgen.3.dirsetup 35500 setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL net avel-cmd axis.3.motor-vel-cmd => stepgen.3.velocity-cmd net apos-fb axis.3.motor-pos-cmd => axis.3.motor-pos-fb net astep <= stepgen.3.step net adir <= stepgen.3.dir net aenable axis.3.amp-enable-out => stepgen.3.enable

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

More
14 years 6 months ago - 14 years 6 months ago #19251 by SvenH
Thanks Andy,
I am very happy to have something new to try!

Should I use a different g-code to set speed and turn the 4th axis to "on"?

On a side note, would it be possible to use both the angular motion and velocity motion without changing to a different machine configuration by restarting LinC
Last edit: 14 years 6 months ago by SvenH.

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

More
14 years 6 months ago #19253 by andypugh
SvenH wrote:

Thanks Andy,
I am very happy to have something new to try!

Hmm, actually, I am not at all sure that motor-vel-cmd is the right signal to use.
Can you explain what you are trying to achieve? Are you wanting to use the A both as a spindle and as an axis? If that is the case then you might want to run two independent stepgens, and connect/disconnect them from the actual driver (in software) as required.

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

Time to create page: 0.331 seconds
Powered by Kunena Forum