5 axis configuration.

More
23 Mar 2025 03:54 #324612 by Keincncnewbie
5 axis configuration. was created by Keincncnewbie
 
Hi Guys!!

I decide to configure a 5 axis machine for my project, but my knowledge is not as those guy on youtube, but i wish the linuxcnc community could help with their knowledge.

using vismach 5 axis configuration on a mesa board 7c80. Installed linuxcnc on my rasberry 4.   
xyzac-trt.hal keep changing every time i run linuxcnc but I know that they are related with a file *.tcl on hallib but my question can I delete those files and only use *.ini, *.hal only using those files that are essentially need it. 

also do I need to use all the parameters of 7c80 to make the axis to move?
because the I had identified that the linuxcnc only used some of themhm2_7c80.0.stepgen.00.control-typehm2_7c80.0.stepgen.00.countshm2_7c80.0.stepgen.00.dbg_err_at_matchhm2_7c80.0.stepgen.00.dbg_ff_velhm2_7c80.0.stepgen.00.dbg_pos_minus_prev_cmdhm2_7c80.0.stepgen.00.dbg_s_to_matchhm2_7c80.0.stepgen.00.dbg_step_ratehm2_7c80.0.stepgen.00.dbg_vel_errorhm2_7c80.0.stepgen.00.enable               x-enablehm2_7c80.0.stepgen.00.position-cmd         not usehm2_7c80.0.stepgen.00.position-fb          x-pos-fbhm2_7c80.0.stepgen.00.position-reset       not usehm2_7c80.0.stepgen.00.velocity-cmd         x-outputhm2_7c80.0.stepgen.00.velocity-fb                  not use

Trying to configuration with xyzac-trt.ini and xyzac-trt_cmd.hal. without any success on it.
can someone help give some extra info. get the axis moving. 

thanks for your time.
 


 

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

More
23 Mar 2025 07:41 - 23 Mar 2025 07:43 #324631 by Aciera
Replied by Aciera on topic 5 axis configuration.
'LIB:basic_sim.tcl' is used for simulation configs only. Also '..._cmd.hal' files are created automatically in sim configurations those do not exist in configs for real hardware.
Modifiying a simulation config to run real hardware is something I would advise you not to do. Instead I recommend to start out by creating a 4 axis config using pncconf (I don't know if fthe 7c80 is supported but I presume so).
- Get the four axes tuned and running smoothly.
- Add the 5. axis manually by copy/paste/modifying the relevant sections in the hal and ini files and get that also running smoothly.
- At this point you can then use the sim config as a reference on how to change to xyzac-trt kinematics.

Also when asking questions about a config you are working on it is usually a good start to attach your hal/ini files and any error messages you are getting.
Last edit: 23 Mar 2025 07:43 by Aciera.

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

More
24 Mar 2025 02:47 #324719 by Keincncnewbie
Replied by Keincncnewbie on topic 5 axis configuration.
Hi.!!
Aciera, Thanks.
I did what you recommend me but I can make the B axis to move or get home.
also tried to emulate a 5 axis gcode but I didn't works.
my lack of knowledge couldn't make to figure out how to get that issue done.
I tried to the gmoccapy interface.
if there any manual of any info that may help me to figure it out to fix it, I'll love it to hear from you.

thanks for your time.

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

More
26 Mar 2025 15:09 #324969 by Keincncnewbie
Replied by Keincncnewbie on topic 5 axis configuration.
doing some test I got this question. what is wrong with this script ?

# =============================================
# Configuración básica de hardware y componentes
# =============================================
loadrt hostmot2
loadrt hm2_rpspi config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxxxx"
setp hm2_7c80.0.watchdog.timeout_ns 5000000
loadusr -W hal_input -KRAL GreenAsia

# =============================================
# Componentes para control y filtrado
# =============================================
loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.b,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
loadrt mux16 names=jogspeed,mvoincr

# Componentes para cálculo de velocidad/aceleración
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
loadrt hypot names=vel_xy,vel_xyz

# =============================================
# Hilos de ejecución en tiempo real
# =============================================
addf hm2_7c80.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread

# Hilos para PID
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.a.do-pid-calcs servo-thread
addf pid.b.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread

# Hilos para utilidades
addf jogspeed servo-thread
addf mvoincr servo-thread
addf abs.spindle servo-thread
addf lowpass.spindle servo-thread

# Hilos para cálculo de velocidad
addf ddt_x servo-thread
addf ddt_xv servo-thread
addf ddt_y servo-thread
addf ddt_yv servo-thread
addf ddt_z servo-thread
addf ddt_zv servo-thread
addf vel_xy servo-thread
addf vel_xyz servo-thread

addf hm2_7c80.0.write servo-thread

# =============================================
# Configuración de hardware Mesa 7i80
# =============================================
setp hm2_7c80.0.dpll.01.timer-us -50
setp hm2_7c80.0.stepgen.timer-number 1

# =============================================
# Configuración del eje X (ejemplo para servomotor)
# =============================================
# Parámetros PID
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror 0.000500

# Conexiones PID
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output

# Configuración StepGen para servo (modo velocidad)
setp hm2_7c80.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_7c80.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_7c80.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_7c80.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_7c80.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_7c80.0.stepgen.00.step_type 0
setp hm2_7c80.0.stepgen.00.control-type 1 # Modo velocidad
setp hm2_7c80.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_7c80.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL

# Conexiones para control en lazo cerrado
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => hm2_7c80.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_7c80.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_7c80.0.stepgen.00.enable

# =============================================
# Cálculo de velocidad/aceleración con ddt
# =============================================
# Conexiones para eje X
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb ddt_x.in
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
net Xacc <= ddt_xv.out

# Conexiones para ejes Y y Z (similar a X)
net Ypos joint.1.motor-pos-cmd => joint.1.motor-pos-fb ddt_y.in
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
net Yacc <= ddt_yv.out

net Zpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb ddt_z.in
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
net Zacc <= ddt_zv.out

# Ejes rotacionales (sin ddt)
net Apos joint.3.motor-pos-cmd => joint.3.motor-pos-fb
net Cpos joint.4.motor-pos-cmd => joint.4.motor-pos-fb

# Velocidades cartesianas combinadas
net XYvel vel_xy.out => vel_xyz.in1
net XYZvel <= vel_xyz.out

# =============================================
# Habilitar hardware
# =============================================
setp hm2_7c80.0.stepgen.00.enable 1


Do hit the right way to get the 5 axis cnc configure ?
can someone help me with it?

thanks!!

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

More
26 Mar 2025 15:51 #324981 by Aciera
Replied by Aciera on topic 5 axis configuration.
Please share the error report.

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

Time to create page: 0.162 seconds
Powered by Kunena Forum