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)
#2 – AndreasEpp 于 2020-12-30
Thank you for your fast reply!
They are moving now ![]()
I’ve got the wrong define from the template file
A small problem remains though. It looks like the limits are not set correctly:
““
[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:X Axis RC Servo Pin:13 Pulse Len(3276,6553) Limits(60.000,180.000)]
[MSG:Y Axis RC Servo Pin:27 Pulse Len(3276,6553) Limits(60.000,180.000)]
[MSG:Z Axis RC Servo Pin:26 Pulse Len(3276,6553) Limits(-60.000,60.000)]
[MSG:A Axis RC Servo Pin:25 Pulse Len(3276,6553) Limits(-60.000,60.000)]
[MSG:B Axis RC Servo Pin:33 Pulse Len(3276,6553) Limits(-60.000,60.000)]
[MSG:C Axis RC Servo Pin:32 Pulse Len(3276,6553) Limits(-60.000,60.000)]
Is it possible to set them all to 0…120 or -60…60 ?
60…180 is odd to handle.
Otherwise it works like a charm! The Connection over Telnet is stable and no crashes so far.
#3 – bdring 于 2020-12-30
Here is a good reference on machine range.
https://github.com/bdring/Grbl_Esp32/wiki/Machine-Space-and-Homing
#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!
#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.