Re: [Emc-developers] hal_port

2022-11-29 Thread Curtis Dutton
I submitted a pull request #2166 that has Raster components.

It also includes a sim config to demonstrate how these components can be
integrated.


On Mon, Nov 21, 2022 at 4:58 PM Curtis Dutton  wrote:

> I will get a pull request together for this.
>
> On Mon, Nov 21, 2022 at 2:12 PM Rod Webster 
> wrote:
>
>> Andy,
>> The component is indeed in 2.9. But the sample code  mentioned in the
>> hal_port doc you list aren't.
>> See:
>>
>> https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html#SAMPLE%20CODE
>> <
>> https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html#SAMPLE%20CODE
>> >
>> So the poor user has no clue on how to use it. Specifically these files
>> were promised to be sent in a  separate Pull request which has not
>> eventuated.
>>
>> https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
>>
>> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp
>>
>> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp
>> It would be great to finish the job off.
>>
>> Rod Webster
>> *1300 896 832*
>> +61 435 765 611
>> Vehicle Modifications Network
>> www.vehiclemods.net.au
>>
>>
>> On Tue, 22 Nov 2022 at 00:18, andy pugh  wrote:
>>
>> > On Mon, 21 Nov 2022 at 12:10, Rod Webster 
>> wrote:
>> >
>> > > Could the examples and tests discussed here and in the docs find their
>> > way
>> > > into the 2.9 release?
>> >
>> > I think that they are already in the prerelease:
>> >
>> > https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html
>> >
>> >
>> > --
>> > atp
>> > "A motorcycle is a bicycle with a pandemonium attachment and is
>> > designed for the especial use of mechanical geniuses, daredevils and
>> > lunatics."
>> > — George Fitch, Atlanta Constitution Newspaper, 1912
>> >
>> >
>> > ___
>> > Emc-developers mailing list
>> > Emc-developers@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/emc-developers
>> >
>>
>> ___
>> Emc-developers mailing list
>> Emc-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-developers
>>
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2022-11-21 Thread Curtis Dutton
I will get a pull request together for this.

On Mon, Nov 21, 2022 at 2:12 PM Rod Webster  wrote:

> Andy,
> The component is indeed in 2.9. But the sample code  mentioned in the
> hal_port doc you list aren't.
> See:
>
> https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html#SAMPLE%20CODE
> <
> https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html#SAMPLE%20CODE
> >
> So the poor user has no clue on how to use it. Specifically these files
> were promised to be sent in a  separate Pull request which has not
> eventuated.
>
> https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
>
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp
>
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp
> It would be great to finish the job off.
>
> Rod Webster
> *1300 896 832*
> +61 435 765 611
> Vehicle Modifications Network
> www.vehiclemods.net.au
>
>
> On Tue, 22 Nov 2022 at 00:18, andy pugh  wrote:
>
> > On Mon, 21 Nov 2022 at 12:10, Rod Webster 
> wrote:
> >
> > > Could the examples and tests discussed here and in the docs find their
> > way
> > > into the 2.9 release?
> >
> > I think that they are already in the prerelease:
> >
> > https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html
> >
> >
> > --
> > atp
> > "A motorcycle is a bicycle with a pandemonium attachment and is
> > designed for the especial use of mechanical geniuses, daredevils and
> > lunatics."
> > — George Fitch, Atlanta Constitution Newspaper, 1912
> >
> >
> > ___
> > Emc-developers mailing list
> > Emc-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-developers
> >
>
> ___
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2022-11-21 Thread Rod Webster
Andy,
The component is indeed in 2.9. But the sample code  mentioned in the
hal_port doc you list aren't.
See:
 https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html#SAMPLE%20CODE

So the poor user has no clue on how to use it. Specifically these files
were promised to be sent in a  separate Pull request which has not
eventuated.
https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp
https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp
It would be great to finish the job off.

Rod Webster
*1300 896 832*
+61 435 765 611
Vehicle Modifications Network
www.vehiclemods.net.au


On Tue, 22 Nov 2022 at 00:18, andy pugh  wrote:

> On Mon, 21 Nov 2022 at 12:10, Rod Webster  wrote:
>
> > Could the examples and tests discussed here and in the docs find their
> way
> > into the 2.9 release?
>
> I think that they are already in the prerelease:
>
> https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html
>
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> ___
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2022-11-21 Thread andy pugh
On Mon, 21 Nov 2022 at 12:10, Rod Webster  wrote:

> Could the examples and tests discussed here and in the docs find their way
> into the 2.9 release?

I think that they are already in the prerelease:

https://linuxcnc.org/docs/2.9/html/man/man3/hal_port.3hal.html


-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2022-11-21 Thread Rod Webster
On Sun, 14 Mar 2021 at 04:29, Curtis Dutton  wrote:

> In tests/pyhal there is a python test that manipulates hal ports. It should
> help give you an idea about how to manipulate them.


Could the examples and tests discussed here and in the docs find their way
into the 2.9 release? That would be amazing

 http://linuxcnc.org/docs/devel/html/man/man3/hal_port.3hal.html
Rod Webster
*1300 896 832*
+61 435 765 611
Vehicle Modifications Network
www.vehiclemods.net.au


On Sun, 14 Mar 2021 at 04:29, Curtis Dutton  wrote:

> In tests/pyhal there is a python test that manipulates hal ports. It should
> help give you an idea about how to manipulate them.
>
> On Sat, Mar 13, 2021 at 1:18 PM Curtis Dutton  wrote:
>
> > Let me know if you have any questions. I'm still working on getting my
> > rastering pull request together.
> >
> > On Wed, Mar 10, 2021 at 7:43 PM Peter C. Wallace 
> wrote:
> >
> >> On Wed, 10 Mar 2021, andy pugh wrote:
> >>
> >> >> Date: Wed, 10 Mar 2021 23:57:28 +
> >> >> From: andy pugh 
> >> >> Reply-To: EMC developers 
> >> >> To: EMC developers 
> >> >> Subject: Re: [Emc-developers] hal_port
> >> >>
> >> >> On Wed, 10 Mar 2021 at 23:56, andy pugh  wrote:
> >> >>
> >> >> On Wed, 10 Mar 2021 at 23:55, andy pugh  wrote:
> >> >>
> >> >>
> >>
> https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
> >> >
> >> > And
> >>
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp
> >> >
> >> >
> >>
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp
> >>
> >>
> >> Thanks for digging that up!
> >>
> >>
> >>
> >> Peter Wallace
> >> Mesa Electronics
> >>
> >> (\__/)
> >> (='.'=) This is Bunny. Copy and paste bunny into your
> >> (")_(") signature to help him gain world domination.
> >>
> >>
> >>
> >> ___
> >> Emc-developers mailing list
> >> Emc-developers@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-developers
> >>
> >
>
> ___
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-13 Thread Curtis Dutton
In tests/pyhal there is a python test that manipulates hal ports. It should
help give you an idea about how to manipulate them.

On Sat, Mar 13, 2021 at 1:18 PM Curtis Dutton  wrote:

> Let me know if you have any questions. I'm still working on getting my
> rastering pull request together.
>
> On Wed, Mar 10, 2021 at 7:43 PM Peter C. Wallace  wrote:
>
>> On Wed, 10 Mar 2021, andy pugh wrote:
>>
>> >> Date: Wed, 10 Mar 2021 23:57:28 +
>> >> From: andy pugh 
>> >> Reply-To: EMC developers 
>> >> To: EMC developers 
>> >> Subject: Re: [Emc-developers] hal_port
>> >>
>> >> On Wed, 10 Mar 2021 at 23:56, andy pugh  wrote:
>> >>
>> >> On Wed, 10 Mar 2021 at 23:55, andy pugh  wrote:
>> >>
>> >>
>> https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
>> >
>> > And
>> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp
>> >
>> >
>> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp
>>
>>
>> Thanks for digging that up!
>>
>>
>>
>> Peter Wallace
>> Mesa Electronics
>>
>> (\__/)
>> (='.'=) This is Bunny. Copy and paste bunny into your
>> (")_(") signature to help him gain world domination.
>>
>>
>>
>> ___
>> Emc-developers mailing list
>> Emc-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-developers
>>
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-13 Thread Curtis Dutton
Let me know if you have any questions. I'm still working on getting my
rastering pull request together.

On Wed, Mar 10, 2021 at 7:43 PM Peter C. Wallace  wrote:

> On Wed, 10 Mar 2021, andy pugh wrote:
>
> >> Date: Wed, 10 Mar 2021 23:57:28 +
> >> From: andy pugh 
> >> Reply-To: EMC developers 
> >> To: EMC developers 
> >> Subject: Re: [Emc-developers] hal_port
> >>
> >> On Wed, 10 Mar 2021 at 23:56, andy pugh  wrote:
> >>
> >> On Wed, 10 Mar 2021 at 23:55, andy pugh  wrote:
> >>
> >>
> https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
> >
> > And
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp
> >
> >
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp
>
>
> Thanks for digging that up!
>
>
>
> Peter Wallace
> Mesa Electronics
>
> (\__/)
> (='.'=) This is Bunny. Copy and paste bunny into your
> (")_(") signature to help him gain world domination.
>
>
>
> ___
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-10 Thread Peter C. Wallace

On Wed, 10 Mar 2021, andy pugh wrote:


Date: Wed, 10 Mar 2021 23:57:28 +
From: andy pugh 
Reply-To: EMC developers 
To: EMC developers 
Subject: Re: [Emc-developers] hal_port

On Wed, 10 Mar 2021 at 23:56, andy pugh  wrote:

On Wed, 10 Mar 2021 at 23:55, andy pugh  wrote:

https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser


And 
https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp

https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp



Thanks for digging that up!



Peter Wallace
Mesa Electronics

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



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-10 Thread andy pugh
On Wed, 10 Mar 2021 at 23:56, andy pugh  wrote:
>
> On Wed, 10 Mar 2021 at 23:55, andy pugh  wrote:
>
> > https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser
>
> And 
> https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp

https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/raster.comp



-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-10 Thread andy pugh
On Wed, 10 Mar 2021 at 23:55, andy pugh  wrote:

> https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser

And 
https://github.com/DuttonIndustrial/linuxcnc/blob/29127782da2da3e26b8d5e9c233cbaa9fea653a4/src/hal/components/laserpower.comp



-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-10 Thread andy pugh
On Wed, 10 Mar 2021 at 23:28, Peter C. Wallace  wrote:

> Is there any example code for hal_port?

It took some digging, but
https://github.com/DuttonIndustrial/linuxcnc/tree/29127782da2da3e26b8d5e9c233cbaa9fea653a4/configs/sim/axis/laser

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port

2021-03-10 Thread Chris Morley
I believe I saw one in the pull request. You may need to look at closed pull 
requests


 Original message 
From: "Peter C. Wallace" 
Date: 2021-03-10 3:30 p.m. (GMT-08:00)
To: EMC developers 
Subject: [Emc-developers] hal_port


Is there any example code for hal_port?
I would like to try writing a driver for the DataPainter
and PktUART modules.

(and by write I mean copy and hack)


Peter Wallace
Mesa Electronics



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


[Emc-developers] hal_port

2021-03-10 Thread Peter C. Wallace



Is there any example code for hal_port?
I would like to try writing a driver for the DataPainter
and PktUART modules.

(and by write I mean copy and hack)


Peter Wallace
Mesa Electronics



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port with documentation

2019-08-08 Thread Curtis Dutton
Ok I have created a pull request for hal_port pin type to master.

This request only includes hal_port related things. The laser and raster
components will be a different pull request that I will make after this one
gets in.


Thanks all,
   Curtis

On Tue, Aug 6, 2019 at 12:03 PM Curtis Dutton  wrote:

> I can fix the indenting on hal_lib.c
>
> I'm not opposed to separate changes however I did use the pyhal.py to
> create tests for testing hal_port code. pyhal.py is not actually required
> for hal_port to function. (Assuming hal_port functions properly)
>
> The halcompile.g doesn't strictly become a requirement until someone wants
> to generate a .comp using hal_ports.
>
>
> I can't say if pyhal.py should replace halmodule.cc.  My first approach
> was to try to modify halmodule.cc but it was quite difficult to wrap my
> head around which is why I wrote pyhal.py. pyhal.py could potentially
> replace halmocdule.cc but I don't know exactly how that would effect
> existing components. Is there a performance penalty? Can everything that
> halmodule.cc do be done with pyhal.py? I don't know yet.
>
> The remapping of M codes are part of a sample config only. It is an
> example to show how I integrated the raster programmer component with the
> raster realtime component. There are I'm sure many other ways to do this.
>
>
> Right now the raster component is a software only version. My actual laser
> machine has mesa hardware so I ultimately want to use datapainter instead
> of the raster component. I'm sure that the ultimate driver for datapainter
> will work in much the same fashion and share some code with the software
> raster implementation.
>
>
>
> It may be easier to understand if we did this as 2 separate commits.
>
> hal changes
> halcompile.g
> hal_port tests
> pyhal.py
>
>
> then
>
> laserpower.comp
> raster.comp
> rasterprogrammer.py
> raster tests
> as well as the sample config
>
>
>
>
>
>
> On Tue, Aug 6, 2019 at 8:35 AM andy pugh  wrote:
>
>> My opinion only: (I am not sure who has the final say on what goes in to
>> Master)
>>
>> On Mon, 5 Aug 2019 at 15:38, Curtis Dutton  wrote:
>>
>> A HAL_PORT pin allows for a writer component to send many bytes in one
>> > operation to a reader component in real time. The PORT pins behave just
>> > like any other pin in HAL and can be linked, unlinked etc...
>> >
>> > In addition to the modifications to make hal ports some other
>> modifications
>> > and new parts were required.
>> >
>> > halcompile.g - added port type. Also added (pin,param,variable)_ptr
>> macros
>> > to allow access to the actual pointer to those values.
>>
>>
>> I think that these should go in together, as two commits in the same pull
>> request.
>>
>> pyhal.py - similar to the other python component pyhal.py uses the ctypes
>> > python library to interface with hal, which is significantly less code
>> than
>> > the halmodule.cc python wrapper that currently exists.
>> >
>>
>> Is this necessary for the hal_port code to work? Is this a replacement for
>> halmodule.cc or do we end up with both?
>> I think that, unless it is an integral part of your hal_port, this should
>> be a separate pull request and discussion.
>>
>> laserpower.comp - allows vector control of a laser, scaling power during a
>> > move and has no limitations of number of joints a machine can have.
>> >
>> > raster.comp along with a python raster.py programming module to control
>> the
>> > raster, this allows control of the raster component from user space.
>> >
>>
>> Standalone .comps should be no problem, I would roll these in with the
>> main
>> pull request, along with the tests.
>>
>> remapping of M codes to control the raster.py raster programming
>> component.
>>
>>
>> is this part of the sample configs? Or are you saying that you have made
>> more M-codes remappable?
>>
>> Is this an enabler for, or an alternative to, the Mesa "datapainter"?
>>
>> --
>> atp
>> "A motorcycle is a bicycle with a pandemonium attachment and is designed
>> for the especial use of mechanical geniuses, daredevils and lunatics."
>> — George Fitch, Atlanta Constitution Newspaper, 1916
>>
>> ___
>> Emc-developers mailing list
>> Emc-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-developers
>>
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port with documentation

2019-08-06 Thread Curtis Dutton
I can fix the indenting on hal_lib.c

I'm not opposed to separate changes however I did use the pyhal.py to
create tests for testing hal_port code. pyhal.py is not actually required
for hal_port to function. (Assuming hal_port functions properly)

The halcompile.g doesn't strictly become a requirement until someone wants
to generate a .comp using hal_ports.


I can't say if pyhal.py should replace halmodule.cc.  My first approach was
to try to modify halmodule.cc but it was quite difficult to wrap my head
around which is why I wrote pyhal.py. pyhal.py could potentially replace
halmocdule.cc but I don't know exactly how that would effect existing
components. Is there a performance penalty? Can everything that
halmodule.cc do be done with pyhal.py? I don't know yet.

The remapping of M codes are part of a sample config only. It is an example
to show how I integrated the raster programmer component with the raster
realtime component. There are I'm sure many other ways to do this.


Right now the raster component is a software only version. My actual laser
machine has mesa hardware so I ultimately want to use datapainter instead
of the raster component. I'm sure that the ultimate driver for datapainter
will work in much the same fashion and share some code with the software
raster implementation.



It may be easier to understand if we did this as 2 separate commits.

hal changes
halcompile.g
hal_port tests
pyhal.py


then

laserpower.comp
raster.comp
rasterprogrammer.py
raster tests
as well as the sample config






On Tue, Aug 6, 2019 at 8:35 AM andy pugh  wrote:

> My opinion only: (I am not sure who has the final say on what goes in to
> Master)
>
> On Mon, 5 Aug 2019 at 15:38, Curtis Dutton  wrote:
>
> A HAL_PORT pin allows for a writer component to send many bytes in one
> > operation to a reader component in real time. The PORT pins behave just
> > like any other pin in HAL and can be linked, unlinked etc...
> >
> > In addition to the modifications to make hal ports some other
> modifications
> > and new parts were required.
> >
> > halcompile.g - added port type. Also added (pin,param,variable)_ptr
> macros
> > to allow access to the actual pointer to those values.
>
>
> I think that these should go in together, as two commits in the same pull
> request.
>
> pyhal.py - similar to the other python component pyhal.py uses the ctypes
> > python library to interface with hal, which is significantly less code
> than
> > the halmodule.cc python wrapper that currently exists.
> >
>
> Is this necessary for the hal_port code to work? Is this a replacement for
> halmodule.cc or do we end up with both?
> I think that, unless it is an integral part of your hal_port, this should
> be a separate pull request and discussion.
>
> laserpower.comp - allows vector control of a laser, scaling power during a
> > move and has no limitations of number of joints a machine can have.
> >
> > raster.comp along with a python raster.py programming module to control
> the
> > raster, this allows control of the raster component from user space.
> >
>
> Standalone .comps should be no problem, I would roll these in with the main
> pull request, along with the tests.
>
> remapping of M codes to control the raster.py raster programming component.
>
>
> is this part of the sample configs? Or are you saying that you have made
> more M-codes remappable?
>
> Is this an enabler for, or an alternative to, the Mesa "datapainter"?
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is designed
> for the especial use of mechanical geniuses, daredevils and lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1916
>
> ___
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port with documentation

2019-08-06 Thread andy pugh
My opinion only: (I am not sure who has the final say on what goes in to
Master)

On Mon, 5 Aug 2019 at 15:38, Curtis Dutton  wrote:

A HAL_PORT pin allows for a writer component to send many bytes in one
> operation to a reader component in real time. The PORT pins behave just
> like any other pin in HAL and can be linked, unlinked etc...
>
> In addition to the modifications to make hal ports some other modifications
> and new parts were required.
>
> halcompile.g - added port type. Also added (pin,param,variable)_ptr macros
> to allow access to the actual pointer to those values.


I think that these should go in together, as two commits in the same pull
request.

pyhal.py - similar to the other python component pyhal.py uses the ctypes
> python library to interface with hal, which is significantly less code than
> the halmodule.cc python wrapper that currently exists.
>

Is this necessary for the hal_port code to work? Is this a replacement for
halmodule.cc or do we end up with both?
I think that, unless it is an integral part of your hal_port, this should
be a separate pull request and discussion.

laserpower.comp - allows vector control of a laser, scaling power during a
> move and has no limitations of number of joints a machine can have.
>
> raster.comp along with a python raster.py programming module to control the
> raster, this allows control of the raster component from user space.
>

Standalone .comps should be no problem, I would roll these in with the main
pull request, along with the tests.

remapping of M codes to control the raster.py raster programming component.


is this part of the sample configs? Or are you saying that you have made
more M-codes remappable?

Is this an enabler for, or an alternative to, the Mesa "datapainter"?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port with documentation

2019-08-05 Thread itai
there seems to be some editor issue (tabs/spaces/tab size) with
src/hal/hal_lib.c in your branch.
pretty much the whole file's been modified with changed indentation.

On Mon, Aug 5, 2019 at 12:33 AM Curtis Dutton  wrote:

> Hi all I know it has been a long time, but I finally finished up
> documentation for the hal_port pin type changes that I have been working
> on.
>
> I initially added this for performing raster work with my laser engraver.
> But the port could be used for a lot of things.
>
>
> Anyhow I'm hoping to get this merged into master now.
>
> What is my next step.
>
> https://github.com/OKComputers/linuxcnc
>
> I just performed a merge of the latest from master this morning.
>
>
> Thanks,
>Curtis
>
> ___
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port with documentation

2019-08-05 Thread Curtis Dutton
Here is the rundown from when I started the work.


I retrofitted my laser engraver with linuxcnc. I do both
rastering and vector cutting on my laser, and it is a 4 axis laser as I do
complicated raster and vector cutting on 3D objects.

I found existing solutions out on the web but they weren't quite adequate
for my needs. Because I have a 4 axis laser (XYZA), controlling vector
power using the Z axis was out.  Also my raster files are sometimes 200Mb
and streaming raster data at the servo period rate via gstreamer takes
quite a long time. I also did not want to have a separate raster data file
alongside the gcode file.

To solve these and some other problems I needed a way to pipe data through
the HAL at a rate much greater than what could be achieved with 1 data
point per servo cycle. Thus the HAL_PORT pin type was born. The idea was
taken from machine kit ring buffers.

A HAL_PORT pin allows for a writer component to send many bytes in one
operation to a reader component in real time. The PORT pins behave just
like any other pin in HAL and can be linked, unlinked etc...

In addition to the modifications to make hal ports some other modifications
and new parts were required.

halcompile.g - added port type. Also added (pin,param,variable)_ptr macros
to allow access to the actual pointer to those values.

pyhal.py - similar to the other python component pyhal.py uses the ctypes
python library to interface with hal, which is significantly less code than
the halmodule.cc python wrapper that currently exists.

laserpower.comp - allows vector control of a laser, scaling power during a
move and has no limitations of number of joints a machine can have.

raster.comp along with a python raster.py programming module to control the
raster, this allows control of the raster component from user space.

remapping of M codes to control the raster.py raster programming component.


Included is also some tests
/tests/pyhal   - also tests hal_port implementation
/tests/raster - tests the rastering component and raster.py programming
interface

Included is also a sim config detailing how to implement a laser engraver
with vector and raster support. In /configs/sim/axes/laser


I have been using this in production for about 18 months now. I am open to any
and all suggesstions on how to structure, features, functions, etc.

I also think that the HAL_PORT can be used as a primitive to build or
replace a lot of code. Maybe even NML and other forms of shared memory
magic.

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] hal_port with documentation

2019-08-05 Thread andy pugh
On Sun, 4 Aug 2019 at 22:33, Curtis Dutton  wrote:

> Hi all I know it has been a long time, but I finally finished up
> documentation for the hal_port pin type changes that I have been working
> on.
>
>
https://github.com/OKComputers/linuxcnc/blob/4a6dc038a00d2bc490b50f96877421d35ebce768/docs/man/man3/hal_port.3hal
 ?

Can you give a quick precis on what it does and what it is for?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


[Emc-developers] hal_port with documentation

2019-08-04 Thread Curtis Dutton
Hi all I know it has been a long time, but I finally finished up
documentation for the hal_port pin type changes that I have been working on.

I initially added this for performing raster work with my laser engraver.
But the port could be used for a lot of things.


Anyhow I'm hoping to get this merged into master now.

What is my next step.

https://github.com/OKComputers/linuxcnc

I just performed a merge of the latest from master this morning.


Thanks,
   Curtis

___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers