- Hardware & Machines
- Driver Boards
- [SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?
[SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20200
- Thank you received: 6874
21 Apr 2022 23:33 #240838
by tommylight
Replied by tommylight on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
There is nothing pertaining to spindle.1 in hal.
Not sure how to set that, so i will leave the reply to other members.
Not sure how to set that, so i will leave the reply to other members.
Please Log in or Create an account to join the conversation.
- Nest
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 10
22 Apr 2022 06:37 #240855
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
hello, the spindle.1 configuration is in custom.hal file
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20200
- Thank you received: 6874
22 Apr 2022 09:26 #240870
by tommylight
Replied by tommylight on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
No it is not:This needs to be set in hal for spindle 1 also.
#*******************
# 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
Please Log in or Create an account to join the conversation.
- Nest
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 10
22 Apr 2022 15:22 - 22 Apr 2022 15:27 #240891
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Yes.. I configured that in the custom.hal file or is essential that configuration is in the CNC3040Z-DQ.hal?
# 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
Last edit: 22 Apr 2022 15:27 by Nest.
Please Log in or Create an account to join the conversation.
- Nest
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 10
28 Apr 2022 06:36 #241437
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Hello, can someone help me?
thansk you
thansk you
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23320
- Thank you received: 4946
28 Apr 2022 12:14 #241468
by andypugh
Replied by andypugh on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
What isn't working? are there any error messages?
Please Log in or Create an account to join the conversation.
- Nest
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 10
28 Apr 2022 13:07 - 28 Apr 2022 22:46 #241477
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
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
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
Last edit: 28 Apr 2022 22:46 by Nest.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23320
- Thank you received: 4946
02 May 2022 19:29 #241866
by andypugh
Replied by andypugh on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
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.
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.
The following user(s) said Thank You: Nest
Please Log in or Create an account to join the conversation.
- Nest
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 100
- Thank you received: 10
08 May 2022 13:35 - 08 May 2022 17:24 #242299
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
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
Thanks you so much
I upload the files of my configuration in case someone helps
Attachments:
Last edit: 08 May 2022 17:24 by Nest.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
- Hardware & Machines
- Driver Boards
- [SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?
Time to create page: 0.082 seconds