[gnea/grbl-Mega Issue#10] 2 Y axis motors, one as inverted slave

未分类 bolang 1周前 (10-15) 9次浏览 0个评论

Issue #10 | 状态: 已关闭 | 作者: markwbrown | 创建时间: 2016-11-15


I’m looking at the code and realized it doesn’t seem to natively support two motors on one axis without using something like an external hex inverter.

I’m thinking that adding a Y2STEPBIT & Y2DIRECTION_BIT on the ports would work, as long as the step direction is inverted, right?

i.e. in cpu_map.h:
#define XDIRECTIONBIT 7 // MEGA2560 Digital Pin 30
#define YDIRECTIONBIT 6 // MEGA2560 Digital Pin 31
#define Y2DIRECTIONBIT 5 // MEGA2560 Digital Pin 32
#define ZDIRECTIONBIT 4 // MEGA2560 Digital Pin 33
#define DIRECTIONMASK ((1<DIRECTIONBIT)|1<DIRECTIONBIT)|(1<DIRECTIONBIT)|(1<DIRECTION_BIT))

To get the Y direction inverted for Y2, that seems a bit trickier as I’m not super familiar with the code base. Setting NAXIS in nutsbolts.h to 4 and modifying getdirectionpin_mask() in settings.c to:

if ( axisidx == YAXIS ) { return((1<DIRECTIONBIT)|(1<<~YDIRECTIONBIT)); }

seems like it might work, but I wanted to see if anyone had some thoughts or sees a glaring deficiency in my approach.


评论 (1)

#1 – chamnit 于 2016-11-15

@markwbrown : The easiest way to make a second y axis stepper to move the opposite direction of the first is to flip the leads on one of the windings. So if one coil is wired + to -, the other motor would be – to +. This will make the second stepper rotate in the opposite direction.

True. Having a setting to do this for you would be nice but I’m a little busy and this method has worked for years. It’s standard wiring practice on all Grbl-based machines.


原始Issue: https://github.com/gnea/grbl-Mega/issues/10

喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址