There are 2 HAL examples (a small and not as small) in the integrator's
manual that  cover the basics of HAL.  I think you even write a very small
component because I had taken a very simple example and modified it
slightly.  The examples will help you connect the pins, setup parameters,
and load the components and functions.  The tutorials will help your HAL
understanding.  When you run through a pncconf or the other setup feature,
it writes a hal file, but with a lot more connections, etc. than the
tutorials.

Just a thought and hats off to whomever put those tutorials together and
John K for editing that manual at the LinuxCNC fest in Houston last year.

Mark



>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 15 May 2015 09:57:11 +0100
> From: andy pugh <bodge...@gmail.com>
> Subject: Re: [Emc-users] How to delay spindle-at-speed
> To: "Enhanced Machine Controller (EMC)"
>         <emc-users@lists.sourceforge.net>
> Message-ID:
>         <CAN1+YZXEjk+JtAwYd81E3ptRkeo0oTQrqyHTuLb+2ZS=
> hpw...@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On 15 May 2015 at 07:26, alex chiosso <achio...@gmail.com> wrote:
>
> > And when an where the logic elaboration should be ?
>
> There isn't any HAL logic elaboration as you seem to be describing it.
>
> All the HAL logic is handled by individual components. Those
> components read their inputs and update their outputs one by one in
> the order they are placed in the thread.
>
> (Some components have more than one "function" and strictly-speaking
> it is the functions that execute in the order they are added to the
> thread)
>
> What I am saying is that there is that the sequence that things appear
> in the HAL files has little bearing on the sequence in which they
> happen.
> When LinuxCNC starts it reads through all the HAL files in sequence
> and sets up all the HAL connections. This is a one-time process at
> startup, and from that point on the HAL file is not looked at again.
> It is a mistake to imagine that the HAL file is somehow "interpreted"
> every cycle as some people seem to. This is why it isn't a programming
> language.
>
> If there are two HAL files, and the first contains:
>
> addf parport.0.read thread1
> addf and2.0  thread1
> addf parport.0.write
>
> and a the second contains
>
> addf or2.0
>
> Then the sequence is that the parport is scanned and the
> parport.0.pin-in-NN pin values are updated
> Then the and2.0 funsction runs, reading its inputs and updating the outputs
> Then the parport.0.write function runs, updating the voltages on the
> parport output pins.
> Then the or2.0 function runs, reading its inputs and writing its outputs.
>
> I rather worry that my original intention of trying to make HAL
> simpler to understand has just become subverted by discussion of
> technical details that were not part of the original question at all.
>
>
> --
> atp
> If you can't fix it, you don't own it.
> http://www.ifixit.com/Manifesto
>
>
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to