[SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?

More
4 years 6 months ago #240838 by tommylight
There is nothing pertaining to spindle.1 in hal.
Not sure how to set that, so i will leave the reply to other members.

Please Log in to join the conversation.

More
4 years 6 months ago #240855 by Nest
hello, the spindle.1 configuration is in custom.hal file

Please Log in to join the conversation.

More
4 years 6 months ago #240870 by tommylight
No it is not:
Code:
#******************* # SPINDLE #******************* setp pid.s.Pgain [SPINDLE_0]P setp pid.s.Igain [SPINDLE_0]I setp pid.s.Dgain [SPINDLE_0]D setp pid.s.bias [SPINDLE_0]BIAS setp pid.s.FF0 [SPINDLE_0]FF0 setp pid.s.FF1 [SPINDLE_0]FF1 setp pid.s.FF2 [SPINDLE_0]FF2 setp pid.s.deadband [SPINDLE_0]DEADBAND setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT setp pid.s.error-previous-target true net spindle-index-enable <=> pid.s.index-enable net spindle-enable => pid.s.enable net spindle-vel-cmd-rpm => pid.s.command net spindle-vel-fb-rpm => pid.s.feedback net spindle-output <= pid.s.output # ---setup spindle control signals--- net spindle-vel-cmd-rps <= spindle.0.speed-out-rps net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs #net spindle-vel-cmd-rpm <= spindle.0.speed-out net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs #net spindle-enable <= spindle.0.on net spindle-cw <= spindle.0.forward net spindle-ccw <= spindle.0.reverse net spindle-brake <= spindle.0.brake net spindle-revs => spindle.0.revs net spindle-at-speed => spindle.0.at-speed net spindle-vel-fb-rps => spindle.0.speed-in net spindle-index-enable <=> spindle.0.index-enable # ---Setup spindle at speed signals--- sets spindle-at-speed true
This needs to be set in hal for spindle 1 also.

Please Log in to join the conversation.

More
4 years 6 months ago #240891 by Nest
Yes.. I configured that in the custom.hal file or is essential that configuration is in the CNC3040Z-DQ.hal?

Code:
# Include your custom HAL commands here # Este archivo no se sobrescribirá cuando vuelva a ejecutar PNCconf # ********************* # PWM TIPE 0 CUSTOM # ********************* loadrt pwmgen output_type=0,0 addf pwmgen.update servo-thread addf pwmgen.make-pulses servo-thread addf pid.l.do-pid-calcs servo-thread addf abs.laser servo-thread # ********************** # SPINDLE PWM # ********************** net spindle-speed-cmd <= spindle.0.speed-out => pwmgen.0.value net spindle-on <= spindle.0.on => pwmgen.0.enable net spindle-pwm <= pwmgen.0.pwm => hm2_7i96.0.ssr.00.out-00 # Establecer la velocidad máxima del husillo en RPM setp pwmgen.0.scale 11000 # ******************* # LASER PWM # ******************* setp pid.l.Pgain [SPINDLE_1]P setp pid.l.Igain [SPINDLE_1]I setp pid.l.Dgain [SPINDLE_1]D setp pid.l.bias [SPINDLE_1]BIAS setp pid.l.FF0 [SPINDLE_1]FF0 setp pid.l.FF1 [SPINDLE_1]FF1 setp pid.l.FF2 [SPINDLE_1]FF2 setp pid.l.deadband [SPINDLE_1]DEADBAND setp pid.l.maxoutput [SPINDLE_1]MAX_OUTPUT setp pid.l.error-previous-target true net laser-index-enable <=> pid.l.index-enable net laser-enable => pid.l.enable net laser-vel-cmd-rpm => pid.l.command net laser-vel-fb-rpm => pid.l.feedback net laser-output <= pid.l.output # ---setup spindle control signals--- net laser-vel-cmd-rps <= spindle.1.speed-out-rps net laser-vel-cmd-rps-abs <= spindle.1.speed-out-rps-abs #net laser-vel-cmd-rpm <= spindle.1.speed-out net laser-vel-cmd-rpm-abs <= spindle.1.speed-out-abs #net laser-enable <= spindle.1.on net laser-cw <= spindle.1.forward net laser-ccw <= spindle.1.reverse net laser-brake <= spindle.1.brake net laser-revs => spindle.1.revs net laser-at-speed => spindle.1.at-speed net laser-vel-fb-rps => spindle.1.speed-in net laser-index-enable <=> spindle.1.index-enable # ---Setup spindle at speed signals--- sets laser-at-speed true net laser-speed-cmd <= spindle.1.speed-out => pwmgen.1.value net laser-on <= spindle.1.on => pwmgen.1.enable net laser-pwm <= pwmgen.1.pwm => hm2_7i96.0.ssr.00.out-01 # Establecer la velocidad máxima del husillo en RPM setp pwmgen.1.scale 11000

 

Please Log in to join the conversation.

More
4 years 6 months ago #241437 by Nest
Hello, can someone help me?

thansk you

Please Log in to join the conversation.

More
4 years 6 months ago #241468 by andypugh
What isn't working? are there any error messages?

Please Log in to join the conversation.

More
4 years 6 months ago #241477 by Nest
Yes, the message it gives me when i type M3 S1000 $1 is:
invalid spindle number ($) in spindle speed command

 
but i don't understand this error because I think i have configure well the spindle 2
in the custom.hal file I made the configuration the new spindle

Please Log in to join the conversation.

More
4 years 5 months ago #241866 by andypugh
You need "num_spindles" in the "loadrt motmod" line of the HAL, and also a setting in [TRAJ]

To quote the docs:
"[TRAJ]
...
SPINDLES = 3 - The number of spindles to support. It is imperative that this number matches the "num_spindles" parameter passed to the motion module."

You can't configure the number of spindles in custom.hal. It needs to be in the main HAL where motmod is loaded.

Please Log in to join the conversation.

More
4 years 5 months ago #242299 by Nest
Hi, all I needed was to add SPINDLES = 2 to the [TRAJ] section Now it is working fine
Thanks you so much

I upload the files of my configuration in case someone helps

 

Attachment not found

 

Attachment not found

 

Attachment not found

 

Attachment not found

 

Attachment not found

 

Attachment not found

 

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.119 seconds
Powered by Kunena Forum