PnCConf and setting up PWM on 7i96
But I'm now struggling with the final step - to set up a PWM output to drive my spindle speed. I have - I believe - the right firmware in my Mesa card, namely 7i96d_1pwm. But when I get to the page in PnCConf where you choose the firmware, it only shows 7i96d as an option. And therefore it won't let me select a PWM output.
Have I done something wrong? Any help gratefully received!
Cheers
Graeme
Please Log in or Create an account to join the conversation.
Pncconf will put in most of the hal/ini boilerplate for spindle control
including spindle enable and direction but you will have to wire the
spindle-output signal to the pwmgen value pin, setup the PWM scaling,
mode and frequency and set the PWMgen enable true
(or wire it to spindle-enable)
Basic PWM setup:
setp hm2_7i96.0.pwmgen.pwm_frequency 10000
setp hm2_7i96.0.pwmgen.00.scale 24000 # full scale is 24000 RPM
setp hm2_7i96.0.pwmgen.00.output-type 1 # standard PWM and direction
net spindle-enable hm2_7i96.0.pwmgen.00.enable
net spindle-speed-out-rpm-abs hm2_7i96.0.pwmgen.00.value
Please Log in or Create an account to join the conversation.
No problem - I can do that!
Many thanks for your help, as ever.
Cheers
Graeme
Please Log in or Create an account to join the conversation.
how direction is handled and the startup
PWM state need to be addressed
Please Log in or Create an account to join the conversation.
But I'm now struggling with the final step - to set up a PWM output to drive my spindle speed. I have - I believe - the right firmware in my Mesa card, namely 7i96d_1pwm. But when I get to the page in PnCConf where you choose the firmware, it only shows 7i96d as an option. And therefore it won't let me select a PWM output.
I have answered your question on the other forum that you posted the question on. Are you UK based?
Please Log in or Create an account to join the conversation.
@PCW - OK. My spindle is forward only, so I presume that removes one issue. When you say the startup PWM state, what do you mean by this? I have been reading the HostMot2 driver manual today, but see no mention of startup state?
Also, can I ask - is it possible to assign the PWM output to specific pins on the 7i96? Or is this fixed in the device configuration? I am presuming the latter from what I've read.
@Clive S - yes, I'm in the UK. I saw and responded to your posting on the other forum, where I was asking some Novamill specific questions. Many thanks for that!
Please Log in or Create an account to join the conversation.
ideally the spindle enable should be a 7I96 SSR output since its guaranteed to be off at
start-up or after a watchdog bite
The PWM output is determined by the firmware loaded, The standard PWM firmware
for the 7I96 replacesSTEP4/DIR4 with PWM/DIR.
You can use the software PWM on almost any I/O pin if you are OK with quite a slow
PWM frequency. For example you could use a SSR output for the software PWM
at say 10Hz PWM frequency and 1% resolution. This would be an easy way to generate
a 0 to 10V signal for a VFD as long as you dont expect fast speed changes.
Please Log in or Create an account to join the conversation.
Thanks also for the clarification regarding the physical 7i96 connections used. It's useful to know about the SW option for PWM too - but for my purposes, using the HW PWM generator on STEP4/DIR4 is ideal. Just wanted to be sure where to put the wires!
As ever, thanks for your fast and detailed assistance.
Cheers
Graeme
Please Log in or Create an account to join the conversation.
I believe I have everything right, because if I use the Halscope, I can see that the inputs into the PWM function are correct. If I adjust the spindle override in AXIS, I can see the PWM "value" moving between 0 and 1 exactly as expected. The other settings (enable, scale, output-type and pwm_frequency) are all just as I I have set them. But I get no output from the 7i96 pin.
I have an oscilloscope on the step4 pin (tried both the + and -) and nothing. All I see is the Step4+ goes from logic 1 to logic 0 when I run LinuxCNC But no pulse train. I checked the firmware version loaded with Mesaflash, and it has PWM. So now I'm really at a loss....
Any thoughts most welcome!
Cheers
Graeme
Please Log in or Create an account to join the conversation.
halcmd show all | grep pwm
When linuxcnc is running and you expect PWM output?
Please Log in or Create an account to join the conversation.