[Grbl_Esp32 Issue#725] Problem with 6 axis servo machine

未分类 bolang 6个月前 (10-14) 53次浏览

Issue #725 | 状态: 已关闭 | 作者: AndreasEpp | 创建时间: 2020-12-30


Hello,
I can’t get my 6 axis servo machine (all 6 axis are servos) running. The servos don’t move no matter which g-code I send.
The Hardware is okay I think, because all 6 servos move with a simple Arduino sketch with ledcWrite and so on.
The controller itself is also okay because I can access it via serial, telnet and the webpage.
My machine file looks as follows and is included in the Machine.h file.


#define MACHINE_NAME "6AxisRobot"

#define N_AXIS 6

#define SERVOXPIN GPIONUM13
#define DEFAULTXMAX_TRAVEL 120.0
#define DEFAULTXHOMING_MPOS 60.0
#define XSERVOCAL_MIN 1.0
#define XSERVOCAL_MAX 1.0

#define SERVOYPIN GPIONUM27
#define DEFAULTYMAX_TRAVEL 120.0
#define DEFAULTYHOMING_MPOS 60.0
#define YSERVOCAL_MIN 1.0
#define YSERVOCAL_MAX 1.0

#define SERVOZPIN GPIONUM26
#define DEFAULTZMAX_TRAVEL 120.0
#define DEFAULTZHOMING_MPOS 60.0
#define ZSERVOCAL_MIN 1.0
#define ZSERVOCAL_MAX 1.0

#define SERVOAPIN GPIONUM25
#define DEFAULTAMAX_TRAVEL 120.0
#define DEFAULTAHOMING_MPOS 60.0
#define ASERVOCAL_MIN 1.0
#define ASERVOCAL_MAX 1.0

#define SERVOBPIN GPIONUM33
#define DEFAULTBMAX_TRAVEL 120.0
#define DEFAULTBHOMING_MPOS 60.0
#define BSERVOCAL_MIN 1.0
#define BSERVOCAL_MAX 1.0

#define SERVOCPIN GPIONUM32
#define DEFAULTCMAX_TRAVEL 120.0
#define DEFAULTCHOMING_MPOS 60.0
#define CSERVOCAL_MIN 1.0
#define CSERVOCAL_MAX 1.0
`

My boot message

`
ets Jun 8 2016 00:22:57

rst:0x1 (POWERONRESET),boot:0x13 (SPIFASTFLASHBOOT)
configsip: 0, SPIWP:0xee
clkdrv:0x00,qdrv:0x00,ddrv:0x00,cs0drv:0x00,hddrv:0x00,wpdrv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8

[MSG:Grbl_ESP32 Ver 1.3a Date 20201124]
[MSG:Compiled with ESP32 SDK:v3.2.3-14-gd3e562907]
[MSG:Using machine:6AxisRobot]
[MSG:Axis count 6]
[MSG:RMT Steps]
[MSG:Init Motors]
[MSG:No spindle]

[MSG:Client Started]
[MSG:Connecting MYROUTER]
[MSG:Connecting.]
[MSG:Connecting..]
[MSG:Connecting...]
[MSG:Connecting....]
[MSG:Connecting.]
[MSG:Connected with 192.168.178.74]
[MSG:Start mDNS with hostname:http://grblesp.local/]
[MSG:SSDP Started]
[MSG:HTTP Started]
[MSG:TELNET Started 23]

Grbl 1.3a ['$' for help]

As for my use case:
I am trying to get one of these cheap chinese 6 dof robot arms to work with grbl_esp32.

Thanks in advance!


评论 (4)

#1 – bdring 于 2020-12-30

Change like this on all servos. #define SERVOXPIN to #define XSERVOPIN

It should, work, but this has never been tested before. It was not optimized to do this. Each servo uses an RTOS task that takes up memory.

If you have crashes we could rewrite it to only use one task for any amount of servos.




#4 – AndreasEpp 于 2021-01-01

Hi,
that did the trick, thank you!

For anyone searching:
$23=0
will change the homing direction and thus change where the axis “starts”
=> all axis report from -60 to 60 now

Thank you for your help and your work on grbl_esp32!


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/725

喜欢 (0)