How to configiure the b axis correct?

More
30 Sep 2022 15:01 #253103 by geostein8888
I have an A and B axis as rotation axis defined. This works so far fine, except when i want to turn the A axis, i want to set B to 0, so nothing can touch somewhere wjile turning A. Here it will to turn B from 90° to 360° instead of 90° to 0.
At the beginning i defined the B axis with the limit -90 to 90 degree, but then i get most of the time that it tries to turn the axis over the limit, even, when its at 0 and has to turn to 90 or back.

perhaps somebody can help me out with his configuration to have a sample
B is driven by a Belt 20 to 72 teeth, 800 microsteps

here my B configuration:
[AXIS_B]
TYPE = ANGULAR
UNITS = degree
WRAPPED_ROTARY = 1
MAX_VELOCITY = 23.9898989899
MAX_ACCELERATION = 50
MIN_LIMIT = -9999
MAX_LIMIT = 9999
TYPE = ANGULAR
UNITS = degree

[JOINT_4]
TYPE = ANGULAR
UNITS = degree
WRAPPED_ROTARY = 1
HOME = 0.0
MIN_LIMIT = -9999
MAX_LIMIT = 9999
MAX_VELOCITY = 23.9898989899
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 90
SCALE = 4
OUTPUT_SCALE = 1.000
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.0

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

More
30 Sep 2022 16:05 - 30 Sep 2022 16:12 #253108 by Aciera
Not sure I entirely understand your problem but I think SCALE = 4 might be wrong.



If I presume you have the 20 teeth on the stepper motor and the 72 teeth on the rotary axis then one revolution (360°) of the rotary axis requires:

800 * 72/20 = 2880 microsteps

for 1° of the rotary axis you would thus need:

2880 / 360 = 8 microsteps.

So in my opinion you need to set STEP_SCALE = 8

edit: I'm not clear on the difference between SCALE and STEP_SCALE but reading this:

  • SCALE = 4000 - in Sample configs
  • STEP_SCALE = 4000 - in PNCconf built configs Specifies the number of pulses that corresponds to a move of one machine unit as set in the [TRAJ] section. For stepper systems, this is the number of step pulses issued per machine unit. For a linear joint one machine unit will be equal to the setting of LINEAR_UNITS. For an angular joint one unit is equal to the setting in ANGULAR_UNITS. For servo systems, this is the number of feedback pulses per machine unit. A second number, if specified, is ignored.

from linuxcnc.org/docs/html/config/ini-config...lt_letter_gt_section
you might want to use STEP_SCALE. Which is what I have always used but might actually not matter.
\edit

Also note that with WRAPPED_ROTARY= 1 in the [AXIS_B] section (it has no effect in the [JOINT_4] section) you set the rotation direction by the sign before the value in the command:

If the B axis is at 90°

G0 B0 (should turn the axis in the positive direction to 360°)

G0 B-0 (should turn the axis in the negative direction to 0°)
Last edit: 30 Sep 2022 16:12 by Aciera.

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

More
30 Sep 2022 16:22 #253110 by geostein8888
Hello,
thanks for your help, scale = 8 was what i calculated also but with this table tried to toen almost 180° when i set b90

the wrapped_rotary look likemy problem, will try what happens when i remove this

Georg

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

More
01 Oct 2022 09:27 #253155 by geostein8888
i've just counted the teeth on the motor pulley, is 18
means scale maust be 8.8889, but the ts rotating almost 180°

the pitch of the pulleys is 3mm, do i ahve to take this into the calculation?

Georg

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

More
01 Oct 2022 10:26 - 01 Oct 2022 10:27 #253158 by Aciera
The pitch is not relevant. What is actually relevant is the diameter of the pulleys and since both pulleys are the same profile you should be able to just use the number of teeth in your calculations. In any case to be off that much (ie. 180° instead of 90°) would indicate that it is not (just) the gear ratio that is wrong. First thing that comes to mind would be that the motordrive is not set correctly.
Usually single stepping has 200 steps/rev
to get 800 steps/rev you would set the drive to 4x microstepping
maybe you have only set it to 2x microstepping?


edit: do you only have this problem with the B axis or also on the A axis?
Last edit: 01 Oct 2022 10:27 by Aciera. Reason: Typo

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

Time to create page: 0.067 seconds
Powered by Kunena Forum