Hi Doug.

You bet you can do this.  (working from memory here rather than testing
on a real setup so there may be a few errors)

There are pins in iocontrol that are intended for it.  They are not
named estop any more because of some mental gymnastics/discussions that
I hope we don't want to get into.

iocontrol.0.user-enable-out

This pin is half the picture because you'll need to report back to emc
that the state of estop has changed.  That pin, 

iocontrol.0.emc-enable-in

needs to follow the state of the first if you do not have external estop
state sensing.

You'll see estop loopback lines in many of the sample configs.  One such
is about line 22 in standard_pinout.hal.  You'll find this file in the
stepper config directory.  It reads like this in 2.1.5

# create a signal for the estop loopback
linkpp iocontrol.0.user-enable-out iocontrol.0.emc-enable-in

HAL only allows one signal to write to any pin so rather than the linkpp
command, I'd comment out that line and make a new signal like this.

newsig my-estop bit

Now connect that signal to the user-enable-out and in

linkps iocontrol.0.user-enable-out my-estop
linksp my-estop iocontrol.0.user-enable-in

If you look at the state of the pins using either halcmd or halshow
you'll see that user enable signals go true when the gui asserts estop
off.  That means that all you need to do is connect the signal you made
to the parport pin.

linksp my-estop parport.0.pin-08-out

Now the signal my-estop writes to both emc and parport.

A similar pattern can be setup with halui but let's leave that one for a
later time.

Rayh




On Mon, 2007-06-11 at 22:29 -0700, Doug Metzler wrote:
> I'm a bit of a newb at this so sorry if the answer is obvious, but is there
> a way to attach UI actions to parallel port pin states?  In my case I need
> to have pin8 go high when I release the eStop button in Axis.
> 
> Thanks,
> 
> DougM
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to