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 <ghesk...@shentel.net>
> > Reply-To: "Enhanced Machine Controller (EMC)"
> >     <emc-users@lists.sourceforge.net>
> > To: "Enhanced Machine Controller (EMC)"
> > <emc-users@lists.sourceforge.net> 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
>
> > 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
>
> > 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
>
I think you told me that once before Peter. But the gpio pins don't match 
the cable pins, so it takes a whole bunch of cross references to find 
it.  According to my understanding of the 7i76 man pages, the pwm signal 
from pwmgen.00 is on pin 6 of the db25 headed to the 7i76, and that 
should show up on the 7i76D's step-4 outputs in whatever polarity you 
need. If thats correct?, I'm off to the races.

Or I can use the 2nd pwmgen, which feeds the same pins on p2, and that 
should come out as pin 6 on the Bob. But I didn't want to drag my new 
gigahertz sampler scope 6+ feet up in the air to verify it.  These 
IRF520 kits don't have mounting screw holes in the pcb, so I  need to 
find a way to box them for insulation in that rats nest of the interface 
box.

Thanks Peter, take care now. 

> > 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
> > Emc-users@lists.sourceforge.net
> > 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
> Emc-users@lists.sourceforge.net
> 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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to