On Tue, 7 Feb 2017, Curtis Dutton wrote:

> Date: Tue, 7 Feb 2017 15:28:26 -0500
> From: Curtis Dutton <curtd...@gmail.com>
> Reply-To: "Enhanced Machine Controller (EMC)"
>     <emc-users@lists.sourceforge.net>
> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
> Subject: Re: [Emc-users] calling hm2_<BoardType>.<BoardNum>.write +
>     hm2_<BoardType>.<BoardNum>.read at higher rates
> 
> Ok I did try using the read_gpio and write_gpio.
>
> The raster component reads the stepgen-fb position and then updates its
> output power based up on that, which is wired to a pwmgen.
>
> Would read_gpio and write_gpio affect the pwmgen output?

It should not but that stuff is so seldom used that it may have bitrotted


>
> On Tue, Feb 7, 2017 at 1:43 PM, Peter C. Wallace <p...@mesanet.com> wrote:
>
>>>
>>> As part of my laser engraver implementation that I have been working on,
>> I
>>> have a raster component that needs to vary the pwmgen output at higher
>> rate
>>> than the servo period.
>>>
>>> The math I'm using to determine the speed is the scan speed. So for
>>> instance a 6000mm/min scan speed, with an update rate of 1Khz gives me a
>>> resolution of about 0.1mm.  Thus 10Khz will give me 0.01mm resolution at
>>> that speed, and allows me to bump up the speed without losing resolution.
>>>
>>> 6000 / 60 / 1000 = 0.1mm
>>>
>>>
>>>
>>> For me a base-thread at about 100000 ns will work. So the idea I had was
>> to
>>> put my raster components and the hostmot2 stepgens and pwmgen update
>>> functions to run on the base thread, while normal motion work still
>> occurs
>>> on the servo thread.
>>
>> AFAIK if you have multiple threads, you can only manipulate GPIO at the
>> base
>> thread rate using the hm2_<BoardType>.<BoardNum>.read_gpio and
>> hm2_<BoardType>.<BoardNum>.write_gpio
>>
>> functions
>>
>> Also this only works on PCI interfaced cards (not EPP,SPI,Ethernet)
>>
>> The proper way to do this is probably with motion synchronized data
>> painting
>> firmware/driver/interpreter changes
>>
>>>
>>> I was able to set up the hal properly and assign the write and read
>> methods
>>> to the base thread.
>>>
>>> Now though the steppers now aren't operating properly. When operating
>> they
>>> are jerky and louder. They seem to want to run in one direction but seize
>>> up when running in the other direction.
>>>
>>> I'm not sure where to start to debug this. Any tips are welcome.
>>>
>>>
>>> Thanks!
>>> ------------------------------------------------------------
>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> 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.
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> 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.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to