On Thursday 24 October 2019 22:24:10 Peter C. Wallace wrote:

> On Thu, 24 Oct 2019, Gene Heskett wrote:
> > Date: Thu, 24 Oct 2019 21:44:36 -0400
> > From: Gene Heskett <[email protected]>
> > Reply-To: "Enhanced Machine Controller (EMC)"
> >     <[email protected]>
> > To: "Enhanced Machine Controller (EMC)"
> > <[email protected]> Subject: [Emc-users] hal syntax
> > maybe?
> >
> > Greetings all;
> >
> > I have added two pwmgen's to the config strings of my 6040's 5i25
> > config strings, and they show up in the dmesg as
> >
> > hm2/hm2_5i25.0:     IO Pin 008 (P3-05): PWMGen #0, pin Out1 (Dir or
> > Down) (Output)
> > hm2/hm2_5i25.0:     IO Pin 009 (P3-06): PWMGen #0, pin Out0 (PWM or
> > Up) (Output)
> >
> > These two above with a straight thru cable would show up on the
> > 7i76D as dir4 and step4, which would be pretty handy using step4 to
> > drive an IRF520 based motor switch.
> >
> >
> > hm2/hm2_5i25.0:     IO Pin 025 (P2-05): PWMGen #1, pin Out1 (Dir or
> > Down) (Output
> > hm2/hm2_5i25.0:     IO Pin 026 (P2-06): PWMGen #1, pin Out0 (PWM or
> > Up) (Output)
> >
> > And they now show in a halconfig as:
> > 12  bit   IN          FALSE  hm2_5i25.0.pwmgen.00.enable
> >    12  float IN              0  hm2_5i25.0.pwmgen.00.value
> >    12  bit   IN          FALSE  hm2_5i25.0.pwmgen.01.enable
> >    12  float IN              0  hm2_5i25.0.pwmgen.01.value
> > which surprises me as there is not any associated addf's. And any
> > attempt to add them is an error  Can I assume they are ready to rock
> > and roll?
>
> The PWM is a hardware device, not a component so no addf is needed
>
If a hardware, its not limited to servo-thread rep rate then.  My 
thoughts are, because there is a certain amount friction, a lower 
frequency pulseing would tend to shake it out of the stiction better, 
giving a more linear delivery at low speeds. Might not, but thats my 
thinking. I had in mind perhaps a starting frequency of 50 or 100 hz for 
that just to make it vibrate against the built-in stiction by giving a 
longer on time.  I'll write a pyvcp slider to be able to mouse its 
speed.

> > Now I see its default type=1, when I would rather its zero and not
> > wasting a pin. where do I set that??
>
> Its a parameter (listed in the hostmot2 man page), but the PWM gen
> will always use the dir pin unless the firmware is changed

I still have pins to spare so its not a big deal until I'm out of pins. I 
want to make a tool carousel eventually. And that will gobble up pins 
for sure.
>
> > So I arrive at setting the first pwmgen.00.enable=true, its
> > frequency to 10 hz, and its input value to .5, scale is default at
> > 1.0
> >
> > But now I can't find an output to watch with the halscope to see if
> > its running.
>
> You can by finding the GPIO pin associated with the PWM output
>
> > Am I supposed to be able to?
> >
> > Thanks.
> >
> > Cheers, Gene Heskett
> > --
> > "There are four boxes to be used in defense of liberty:
> > soap, ballot, jury, and ammo. Please use in that order."
> > -Ed Howdershelt (Author)
> > If we desire respect for the law, we must first make the law
> > respectable. - Louis D. Brandeis
> > Genes Web page <http://geneslinuxbox.net:6309/gene>
> >
> >
> > _______________________________________________
> > 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


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


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

Reply via email to