On Fri, 20 Sep 2019, John Dammeyer wrote:

Date: Fri, 20 Sep 2019 11:08:51 -0700
From: John Dammeyer <[email protected]>
Reply-To: "Enhanced Machine Controller (EMC)"
    <[email protected]>
To: "'Enhanced Machine Controller (EMC)'" <[email protected]>
Subject: Re: [Emc-users] MESA 7i92H Power

Perhaps I'm really just missing something obvious here.


Ah, if you just need to _swap_ pwm and dir with each other, then that is
actually easy.
set the output-type to 4, and they get swapped:

http://linuxcnc.org/docs/2.7/html/man/man9/hostmot2.9.html#pwmgen

That information is for the 7i43 not the 7i92 and I don't believe the 7i92 can
be swapped around like that. The pin file for the 7i92 only allocates two PWM
logic modules, one to each port.  The 7i43 is probably more versatile and they
can be allocated differently.

John


All HostMot 2 modules (like PWM) are the same regardless of the hardware
so anything a 7I43 can do a 7I92 can also do.

Peter, I don't believe that and I've been pretty clear about which pin file I'm using thoughout this entire conversation.

It is true, all hm2 modules are the same regardless of the hardware

_pinouts_ and which modules are instantiated differ on a per
configuration basis



Here's the 7i92_C11Gx2D  HAL file information.  Notice that I'm accessing 
pwmgen.00 which is listed in the pin file as coupled to I/O 1  which is DB-25 
pin 14.   And I'm attaching the spindle-cw to gpio.005 which is DB-25 pin 16.

# PWM gen signals/setup
setp   hm2_7i92.0.pwmgen.00.scale  [SPINDLE_9]PWM_SCALE
setp   hm2_7i92.0.pwmgen.00.output-type  1
setp   hm2_7i92.0.gpio.005.is_output true

net spindle-enable          =>  hm2_7i92.0.pwmgen.00.enable
net spindle-vel-cmd-rps     =>  hm2_7i92.0.pwmgen.00.value
net spindle-cw              =>  hm2_7i92.0.gpio.005.out

As I understand it the pin file defines which pins are used for the pwmgen.00.

So what Andy andn you are saying is if I set output-type to 4 instead of one the pwmgen.00 will magically appear on DB-25 pin 16? And then I can set spindle-cw to gpio.001.out?

No, that will only work if the configurations pinout has PWM PWM-Out and DIR
pins


Only one tiny problem with that. I'd have to also change then to a pin file that actually allocates a PWM DIR like 7i92_R990x2D. Otherwise for the existing pin file (7i92_C11Gx2D) how in the heck does it know that I want to swap pins?

And Peter, you stated previously that it's more versatile to not use a pin file with the PWM DIR allocated. So which is it?

It is better (because if you dont want the pin to be spindle
DIR you have no choice if you enable PWM but if its plain GPIO
it can funtion ad DIR or just a normal output)
but you do need PWM on the proper pin

What breakout do you have and where is its PWM pin?

(The PMDX126 has PWM on pin 16 not 14 )


John






_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.



_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to