Yes, something like that. Currently, if you want to add new functionality to
hal configuration (for example adding And or Or components), you have to go
to the root .hal file, where this components are attached to thread, and
increase the number of this components. If you use some name for signal, you
have to be careful not to use existing names.

But, If every .hal file could be seen as component, you could define its
input and output pins, and attach only components to the thread which this
component needs (without changin other hal configurations), and connect this
elements (define functionality). Names for signals could be only valid
inside this component, so that using same name for signal inside another
component would not cause an error.

I had some sort of problem with THC design, and I solved it by adding option
in pyvcp to disable THC. I done this by adding checkbox in pyvcp, and adding
two AND compnents to the THC hal configuration. One input of this ANDs was
parallel port pin, and second input was from this checkbox in pyvcp.

So, if checkbox is checked, the input signals (UP and DOWN) are routed to
the THC hal and Z axis would move. If checkbox is not checked, then (because
of two ANDs) none of signals (UP und DOWN) are routed to the THC hal.

Problem was that, I had to change THC configruation in order to add two new
AND components. But if subcomponents were supported, I would not have to
change THC.hal. I would just add new hal file, with its own functionality,
disconnect thc from parallel port, connect my component to parallel port and
connect thc with my component.

Even THC configuration could be broken in small components like Ignition
control, Direction control, Motor control etc. After that, changing
configuration inside one component (as long as input and output parameters
are unchanged), would not breake anything at all. Using same name inside two
diffrent component, would not cause an error. One component could be easily
reused.

It hard to express my self becuase English is not my first language. Just
look at http://cvs.linuxcnc.org/cvs/emc2/configs/plasma-thc/thc300.odg. It's
really complicated and changing something on it is really hard. Now imagine
you want to add another system (nearly complicated as THC) to your whole EMC
configuration. How would diagramm look like?

But, if it were made of componets, with well defined input and output pins
(something like interfaces), changing, replacing or reusing some component
would be easy (and of course, debugging would be much easier).

On Wed, Jun 3, 2009 at 7:21 PM, Kirk Wallace <[email protected]>wrote:

> On Wed, 2009-06-03 at 17:10 +0200, Sasa Vilic wrote:
> > Is it possible in EMC to write HAL components which is composed of more
> > basic components like and, not, or, etc.? For example: I want to write
> one
> > component which has input and output pins, and inside of this component I
> > use existing HAL components, to implement functionality. This component
> can
> > be seen as a "Black-Box" and can be used easily again, without writing
> all
> > it's internal structure in config files.
> >
> > I was looking at THC design, and I think that this could be devided in
> > (sub)components, but I don't know if that is supported by EMC. If it's
> not,
> > it would be nice to have that, because writing some HAL configuration
> (like
> > THC) would be much much easier.
>
> This may be above my pay scale (seems to be a current buzz phrase), but
> I think having a way to automatically create a .hal file and update the
> corresponding .ini file is what you might need. I suppose Stepconf does
> something like this. This assumes that you don't really need to place
> comp's inside of comp's, but that you provide enough pins to let a .hal
> file connect them. You would create the custom comp's then have a comp
> "auto-router" that scans the existing .ini and .hal files, creates a new
> supplemental .hal file that links the new comp's and the
> existing .hal's. Then adds the new .hal to the .ini. The auto-router
> would use a script that describes the structure of your super- or parent
> comp (black-box?).
>
> Am I getting close or should I go back to taking my meds?
>
> I wonder if the Eagle comp application would have something to offer?
> --
> Kirk Wallace
> http://www.wallacecompany.com/machine_shop/
> http://www.wallacecompany.com/E45/index.html
> California, USA
>
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to