For me this was a good example.  I wanted to write a userspace
pendent interface.  Assuming you have created a pin object as "h", the
pin's input is read as h.in and you can set h.out to set the output.   The
link below is a sample program that copies a pin's input to its output.  So
it shows both reading and writing.
http://linuxcnc.org/docs/html/hal/halmodule.html#_driving_bidirectional_hal_io_pins

On Wed, Dec 16, 2020 at 3:41 PM <ken.stra...@gmail.com> wrote:

> With the great help on list and off I'm having some progress.
>
> When debugging it is very convenient to be able to run a program in a
> terminal window. Doing so immediately shows syntax errors. The program can
> talk to an Arduino listening on a USB simulated serial port and can create
> pins that can be displayed or set in halcmd. A ctrl-C closes things. The
> only remaining problem is that I have not found a way to read values from
> existing HAL pins in order to get axis positions and other useful
> information. Halcmd and other programs can display the value of any pin. Is
> reading pins created by another program not supported in python or am I
> just missing a vital incantation?
>
>
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 

Chris Albertson
Redondo Beach, California

_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to