one button multiple functions

More
02 Jun 2011 18:01 #10272 by fabworx
how does one setup one button to do multiple things. such as, i would like to setup one button as my step button, a button that changes the jog step amount., 1, 0.1, 0.001, 0.0001, and then cycle back to 1 with each press of the button. also i need one button to act as play and pause to cycle start and cycle pause. both of these are momentary buttons on one input pin per button.

would classic ladder be the way to do it or just in hal. any help in the right direction would be greatly appreciated.

also im having trouble figuring out how to make the pc startup with axis in full screen. i have it currently starting up with axis but it is in reduced mode i have to maximize the axis screen and it would be nice to see it startup like a pro machine interface.

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

More
02 Jun 2011 19:11 #10276 by andypugh
You could do it with convoluted HAL, but it would get rather convoluted.
I think it would be easiest in a custom HAL component, written using comp. (which is basically C with a bunch of macros for creating HAL pins etc)
linuxcnc.org/docs/html/hal_comp.html

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

More
02 Jun 2011 19:50 #10278 by BigJohnT
There is an example in the Hal Examples section of using one pushbutton for pause/resume.

There is a program that can make Axis start in full screen mode but I forget the funny name it has...

John

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

More
02 Jun 2011 19:58 #10279 by fabworx
thanx john im still learning how hal works c is way above me for now.

how would i write hal so that each press of the same button would cycle to the next function, also how do i tell axis which step to be in through hal. step meaning, 0.01, or 0.001 or what ever.

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

More
02 Jun 2011 22:27 #10280 by andypugh
fabworx wrote:

how would i write hal so that each press of the same button would cycle to the next function


Lots of And2 functions. And Or2 too. Perhaps some Oneshots and WeightedSums.
Probably a mux4 for the feedrate.
Look at the Realtime Components here:
www.linuxcnc.org/docview/html/

You will need to draw a logic diagram.
I still contend that C is easier, even if you have to learn it.

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

More
03 Jun 2011 11:27 #10285 by ArcEye
BigJohnT wrote:

There is a program that can make Axis start in full screen mode but I forget the funny name it has...
John


You are probably thinking of 'devilspie' which is supposed to work for this.

I have never had a problem just doing 'Alt-Space X' takes longer to say than do.

regards

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

More
03 Jun 2011 11:40 #10287 by BigJohnT
Thanks, keyboard shortcuts are great for programmers but not for operators unfortunately... I knew it was a funny name.

John

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

More
03 Jun 2011 19:47 - 03 Jun 2011 21:15 #10292 by BigJohnT
fabworx wrote:

also im having trouble figuring out how to make the pc startup with axis in full screen. i have it currently starting up with axis but it is in reduced mode i have to maximize the axis screen and it would be nice to see it startup like a pro machine interface.


To start Axis in full screen mode in your ~.axisrc file place the following

maxgeo=root_window.tk.call("wm","maxsize",".")
fullsize=maxgeo.split(' ')[0] + 'x' + maxgeo.split(' ')[1]
root_window.tk.call("wm","geometry",".",fullsize)

To start Axis with a special size use:

root_window.tk.call("wm","geometry",".","1000x600")

John
Last edit: 03 Jun 2011 21:15 by BigJohnT.

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

More
06 Jun 2011 22:50 #10346 by fabworx
thanx john now if i can only find that darn axisrc file here boy come on whered ya go.

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

More
06 Jun 2011 22:59 #10347 by BigJohnT
You will have to add it and it is .axisrc not axisrc the leading dot makes it a hidden file. It goes in your home directory. Open the file manager and click on show hidden files...

John

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

Time to create page: 0.174 seconds
Powered by Kunena Forum