How to use digital inputs as a start, home keys

More
05 Apr 2011 06:39 #8537 by dzarek
hello
How to use the LPT port inputs as the keys to start, home, etc.
That are configured as digital inputs.
I have free pins and I do not want to attach additional adapted keyboard.

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 11:21 #8547 by Rick G
You should be able to use hal to take the input signal from the lpt to perform a task.
You should also be able to use hal with the pin to preform a MDI command.
www.linuxcnc.org/docs/HAL_User_Manual.pdf

Rick G

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 11:48 #8551 by BigJohnT
You might want to take a look at halui (hal user interface).

www.linuxcnc.org/docview/html/gui_halui.html

John

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 14:33 - 05 Apr 2011 15:31 #8568 by dzarek
ok, I add

in the file. ini
HALUI = halui

in the file. hal
net din-00 => motion.digital-in-00
net din-00 <= parport.0.pin-15-al

Now I want to connect motion.digital-in-00, together with halui.program.step (bit, in) and it is black magic for me:)
I think I need to do it in a file custom.hal, but each time the program does not start

this is my first approach to HALL so please forgiving with us


edit
it`s work :)
Last edit: 05 Apr 2011 15:31 by dzarek.

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 15:29 #8581 by andypugh
dzarek wrote:

net din-00 => motion.digital-in-00
net din-00 <= parport.0.pin-15-al


This might not be what you want. That sends a digital input to a "place" where G-code can see it.

If you want to, for example, link it to program-start then you would use

net startbutton parport.0.pin-15-in => halui.program.run

(or, you can split it onto two lines like you did above, if you like)
I have a feeling that there is more to running a program now than setting program.run to high, you might need

net startbutton parport.0.pin-15-in => halui.mode.auto halui.program.run

To set both auto-mode and program-run from the same button.

There are many other halui pins that might be useful to you.

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 19:33 - 05 Apr 2011 19:39 #8616 by dzarek
Thank you very much for your help
I have one more question, how to change the status of the pin NO <-> NC?
Last edit: 05 Apr 2011 19:39 by dzarek.

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 19:44 #8617 by BigJohnT
Which pin?

John

Please Log in or Create an account to join the conversation.

More
05 Apr 2011 19:50 #8618 by andypugh
If it is a parallel port input pin, use the in-not version of the pin.

eg parport.0.pin-15-in-not

Please Log in or Create an account to join the conversation.

Time to create page: 0.262 seconds
Powered by Kunena Forum