Welcome, Guest. Please login or register.
Did you miss your activation email?
December 15, 2017, 11:00:28 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Brains Development
| | |-+  Brains - Creating a button that sequences through various modes when pushed ?
Pages: 1   Go Down
Print
Author Topic: Brains - Creating a button that sequences through various modes when pushed ?  (Read 970 times)
0 Members and 1 Guest are viewing this topic.
slow-poke
Active Member

Offline Offline

Posts: 19


View Profile
« on: October 10, 2017, 11:33:57 AM »

I would imagine this is trivial for those that are familiar with creating brains (I'm not, complete newbie)

I'm making a hard button panel (see below), I'm using a Pokeys 57E to capture the key presses. This is working fine, I can jog, etc via the panel.  Setting this up using the pokeys configuration software (Mach3 plug-in) is straight forward, just map one of the 55 input pins to the desired button in mach3 and it works.

Some of the buttons on my panel need to cycle through various modes (bottom left button) for example the SS-CON-MPG. I have this mapped to button call 245 and it works fine, HOWEVER I would like a 4th press of the button to disable jogging, and then if I press again it starts at SS.

Similar situation for the right most blue button, first push MPG is set to Jog speed, 2nd push the MPG controls feed speed and then 3rd push disables the MPG.

Can someone describe how I can create a brain to provide this functionality?


* LC30A-CNCs.png (278.92 KB, 993x734 - viewed 74 times.)
Logged
slow-poke
Active Member

Offline Offline

Posts: 19


View Profile
« Reply #1 on: October 11, 2017, 08:16:38 PM »

I'm starting to get the impression that there are less people using "brains" that I envisioned.

The following almost works, it increments and selects, however I have not had any luck resetting OEMDRO: 1501 to 0 or 1 after I get to the desired roll-over count.  I have tried  MANY methods and they all failed. It seems like if you try to write to OEMDRO:1501 in any other rung after the initial instance that the register refuses to update or be set to 0, 1 etc.
 Huh


* t3.png (19.82 KB, 878x335 - viewed 70 times.)
« Last Edit: October 11, 2017, 08:19:36 PM by slow-poke » Logged
slow-poke
Active Member

Offline Offline

Posts: 19


View Profile
« Reply #2 on: October 12, 2017, 07:05:17 AM »

Working......

I took another (simpler) approach and it works, I just need to add debounce to the inputs


* t4.png (19.25 KB, 575x522 - viewed 86 times.)
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!