Help with esp32?

More
07 Dec 2023 17:08 - 07 Dec 2023 19:22 #287462 by OneMyr
Help with esp32? was created by OneMyr
Hello there

I was looking for a way to run Linux cnc with a esp32 working as a step generator like i saw in a fórum with jzolee work. But when i finished installing and doing The halcompile, when i tried to run The Program, this is What i got
drive.google.com/file/d/1Lx-7ENpbt4-lK1O...sy/view?usp=drivesdk

This erro shows before The Program status, and
​​​​​

drive.google.com/file/d/1L_EdgUyE28wN9fU...AD/view?usp=drivesdk

The Axis was in a strange position and i Just can't press The Estop Button.

I really don't know How to fix this, maybe i am kinda dumb, but cant anyone give a little help.

Thanks, and Sorry for taking yout time 
Last edit: 07 Dec 2023 19:22 by OneMyr.

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

More
09 Dec 2023 18:24 #287702 by andypugh
Replied by andypugh on topic Help with esp32?
This looks like an unusually self-explanatory error message. I commend the programmer :-)

Maybe this will help you decipher what it is trying to tell you?

linuxcnc.org/docs/html/config/ini-config...sub:ini:sec:rs274ngc
The following user(s) said Thank You: OneMyr

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

More
11 Dec 2023 17:52 - 11 Dec 2023 17:56 #287872 by OneMyr
Replied by OneMyr on topic Help with esp32?
Thanks, after a few tries The error disappeared, and yeah just like i said, i feel a little dumb because it was simple haha. but i still cannot turn The machine on, The e stop Button looks like If its pressed, Just like in The video bellow

drive.google.com/file/d/1PgCSohU4uwKuCqE...O7/view?usp=drivesdk

Id put a example gcode and tried to run, but without any sucess
Last edit: 11 Dec 2023 17:56 by OneMyr.

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

More
11 Dec 2023 23:16 #287890 by andypugh
Replied by andypugh on topic Help with esp32?
This looks like a HAL configuration problem. Something is triggering the E-stop. Can you attach the HAL and INI files from your config?

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

More
12 Dec 2023 11:09 #287932 by OneMyr
Replied by OneMyr on topic Help with esp32?
of course i can. i will let both below, i am a little lost here, cuz i dont really know how to handle the hal file. also thanks again!
 
Attachments:

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

More
12 Dec 2023 11:31 #287933 by andypugh
Replied by andypugh on topic Help with esp32?
I think that the problem is somewhere in these lines:
loadrt  and2                        names=no-estop
...
addf    no-estop                    servo-thread
...
net     no-estop-a      iocontrol.0.user-enable-out no-estop.in0
net     no-estop-b      udp.ready                   no-estop.in1
net     no-estop-out    no-estop.out                iocontrol.0.emc-enable-in

Normally there is a very short loop:
net     e-stop-loop     iocontrol.0.user-enable-out iocontrol.0.emc-enable-in

Yours is set up to additionally depend on the "udp.ready" pin going true.

You can check if it does with the "halmeter" tool, available from the "machine" menu in the axis gui, other places in other guis, or with the command "halcmd loadusr halmeter" at the command line. You can load as many as you need to watch multiple pins. Or use "halshow" to "watch" multiple pins.

However, I also noticed:
loadrt  [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt  threads name1=udp-thread period1=[EMCMOT]UDP_PERIOD fp1=1
...
addf    udp                         udp-thread

Which is unusual. In fact I just tried loading an extra thread after loading emcmot and it caused a segfault.

As your udp-thread is the same speed as your servo thread, try removing the udp-thread. (remove or comment-out the loadrt thread.... line) and add the udp component to the servo thread:
addf udp servo-thread
The following user(s) said Thank You: OneMyr

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

More
12 Dec 2023 12:18 #287938 by OneMyr
Replied by OneMyr on topic Help with esp32?
okay... ill try my best, later i return the results back to you. and again, thanks.

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

More
12 Dec 2023 19:07 #287964 by OneMyr
Replied by OneMyr on topic Help with esp32?
After a lot of tries, i coudnt make it work. instead id got a lot of errors, the last one was this report. i also got a lot of different errors before, but the was just for testing.Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.4-1-gb7824717b
Machine configuration directory is '/home/cnc/linuxcnc/configs/UDP2'
Machine configuration file is 'UDP2.ini'
INIFILE=/home/cnc/linuxcnc/configs/UDP2/UDP2.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
twopass:invoked with <> options
twopass:found ./UDP2.hal
twopass: Error in file ./UDP2.hal:
invalid command name "0setp"
Command not found using ::auto_path=
/usr/lib/tcltk/linuxcnc /usr/share/tcltk/tcl8.6 /usr/share/tcltk /usr/lib /usr/local/lib/tcltk /usr/local/share/tcltk /usr/lib/tcltk/x86_64-linux-gnu /usr/lib/tcltk /usr/lib/tcltk/tcl8.6
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
1328
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

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

More
12 Dec 2023 23:37 #287987 by andypugh
Replied by andypugh on topic Help with esp32?

twopass: Error in file ./UDP2.hal:
invalid command name "0setp"


Looks like a typo. "0setp" should probably be "setp"

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

More
13 Dec 2023 13:46 #288033 by OneMyr
Replied by OneMyr on topic Help with esp32?
Okay thanks again, it wasnt just this, but after a few tries i managed to turn the machine on, but when i try to move one of the axis, the program shows an error like in the image
yeah i know the error is in portuguese, but it says  "axis movement calculation error"
and it repeat for every axis
Attachments:

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

Time to create page: 0.068 seconds
Powered by Kunena Forum