Welcome, Guest. Please login or register.
Did you miss your activation email?
October 17, 2017, 11:38:36 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Third party software and hardware support forums.
| |-+  PoKeys (Moderator: NeoTO)
| | |-+  PoKeys 57E buttons, MACH4
Pages: 1   Go Down
Print
Author Topic: PoKeys 57E buttons, MACH4  (Read 1567 times)
0 Members and 1 Guest are viewing this topic.
thosj
Active Member

Offline Offline

Posts: 238


View Profile
« on: March 08, 2017, 06:20:48 AM »

I have a new PoKeys 57E. I need to get 5 buttons working before I can move on with my Mach4 learning experience. Well, actually 5 buttons and two analog pots. I downloaded the script for FRO on a pot with inputs 41/47 on the PoKeys, but out of the box it doesn't work. Someone on the Mach 4 thread is helping me there, so maybe.....

So I need 5 buttons to do:

Cycle Start
Cycle Start
Feed Hold
Coolant on/off (M8/M9)
Mist on/off (M7/M9)

I can't find anything in the documentation for a simple button in Mach4. I guess they think I just know how to do that. I find examples for all the complicated stuff, matrix keyboards, lcd's, but nothing for a simple button and how to make it work in Mach4.

Can anyone help me or point me? I need to get these 5 buttons and two pots working before I can confidently keep my painful transition to Mach 4 going.

Thanks, Tom
Logged
NeoTO
Active Member

Offline Offline

Posts: 488


View Profile WWW
« Reply #1 on: May 19, 2017, 12:16:10 AM »

Look at the blog: http://blog.poscope.com/mach4-tutorial-custom-signal-mapping/
Logged

www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope
CRS
Active Member

Offline Offline

Posts: 61


View Profile
« Reply #2 on: May 19, 2017, 07:02:07 PM »

Hi Tom, I have the Pokeys 57E as well.  Actually maybe we have spoken on previous threads, can't remember, it's been a while since I was head down with my conversion.

Anyway, that same link that NeoTO suggested got me most of the way there a few months ago, so if it solves your question, then all good.

If not let me know as I have the basic things like Cycle Start, Reset, and Feed Hold working very well.  Lua still leaves me totally bewildered, there doesn't seem to be any easy way to learn it for raw beginners with no background in programming.  And from my searching there isnít really any good intuitive help out there. Lots of online tutes, but they mostly change from 1st gear staight into 5th.  What happened to all those other gears?! Most the guys that helped me along the way seem to have some degree of a programming background.

Craig.
Logged
thosj
Active Member

Offline Offline

Posts: 238


View Profile
« Reply #3 on: May 20, 2017, 06:33:00 PM »

Hi Craig, I believe we have conversed before!!

I have Cycle Start, Feed Hold, and Stop working. I can't figure out Coolant on/off or Mist on/off. I want one press of the (momentary) button to turn M8, Coolant ON, and the next press of the button to be M9, Coolant OFF. Same for M7/M9, another button. All I can figure out is read the state of a switch, but I want momentary switches, one press, ON, one press, OFF. I have this working in Mach3, which I've resorted to again because I don't have the time to invest in the summer to trying to get Mach4 working even rudimentarily!!

If you or anyone can tell me how to get a momentary switch to toggle coolant or mist on and off, I'd love it.

I did use the signal mapping tutorial and the built in to Mach4 help files to get what I have working, but I can't find any kind of coolant TOGGLE, just a way to sense a switch, if it's on, coolant ON, if it's OFF, coolant off, but no toggle to use a momentary switch. I don't want to move to on/off switches or I have to re-figure out Mach3 for THAT and I don't have the time or talent to do it this time of year. Too busy riding my bike, doing yard work, enjoying summer. Maybe next winter I'll fiddle with Mach4 again. It moves the 4 axes fine, but soon as you want to customize anything, it gets too hard.

Also not sure why this sat here from March 8 to May 19 for a reply, but it doesn't matter!! I'm sort of short on Mach4, it's always "You're stupid, we're making it simple and you can't figure it out."

Tom
Logged
CRS
Active Member

Offline Offline

Posts: 61


View Profile
« Reply #4 on: May 21, 2017, 02:06:38 AM »

Good Evening Tom,

Looking at the time on your post, if it came straight through, you are about 9 hours east of me. I'm in Melbourne, Australia, where are you?

Interesting about the toggle/momentary thing.  I have my small Hercus mill with an ANCA control that I am slowly converting to Mach4 as well as kind of helping a good friend convert his old Bridgeport with a Bandit control to Mach4.  He was fortunate enough to get a retired friend of his to step in and take over all the electrics, freeing me to go on with life, but every now and then Mike, the chap helping my friend, phones to see if I can help with the software and Lua side of things.  Kind of the blind leading the blind.  AND, one of the latest hurdles, is how to get the spindle toggle button on the screen to emulate a real momentary switch.  Not exactly the same as your issue, but similar.

The Bridgeport has a system of latching relays to simply turn the spindle on, off and reverse.  The speed is set using the pulleys.  So when issuing an M3 or M4 from G code or the Mach screen, he has it all working, but of course itís a constant ON condition either CW or CCW.  So if you push the momentary OFF button on the machine it certainly cuts the latch circuit and stops the machine, but as soon as you take your finger off the stop button the circuit re-latches and the spindle restarts because Mach still has it powered on.

Just as a side, we are both using the ESS with a CNCRoom MB2 beak out board. And I also have the Pokeys 57E for more IO and the analog inputs.

My friend wants to keep the machine switches the way they are.  So yes, how to get a momentary/toggle signal.  I asked this of Rob Gaudette through the Mach support page way back in January.  I think I was asking for the purposes of having external jog buttons.  My question wasnít actually on the response email, so I canít remember.  It wasnít long after that I had to pull the pin and get into house renovations, so I never actually did anything with it YET!  I will post his email to me and the two files he sent.  It still doesnít make sense to me, but if I just follow what he says to do, maybe the penny will drop.

And yes, your last though about how it feels with learning Lua and Mach4 is correct.  However there have been some really helpful guys come to my aid, but I still struggle to understand when they explain.

Below is the email from Rob.

Regards,

Craig.

Craig,

I have attached an emulated toggle button in a screen for your configuration purposes. I know you will be using a physical toggle, but this will be how you could set this up. Look at the button in screen edit. I have it triggered and mapped to output #3. So when you are ready you would wire up your switch to an output, then take a look at the attached code example, I know it is written for inputs, but you can change these. You will have the code in the in the screen load script, and when the output is active, then you will run the ButtonJogModeToggle() function
Logged
thosj
Active Member

Offline Offline

Posts: 238


View Profile
« Reply #5 on: May 21, 2017, 08:01:19 AM »

Craig, I wasn't referring to your post I was referring to NeoTO's post, March 8 for my OP, May 19 for his reply!! NeoTo is a Pokeys person. But, like I said, no big deal.

I am in Wisconsin, USA!!

I don't see any files attached to your post, not sure if you forgot them or they don't show for me, or what.

Like I said, my issue isn't with mapping the signal in Mach4, it's figuring out what internal command TOGGLES the coolant/mist.

Thanks
Tom
Logged
CRS
Active Member

Offline Offline

Posts: 61


View Profile
« Reply #6 on: May 21, 2017, 02:53:01 PM »

Hi Tom, yes I noticed that your original post was back in March after I sent you my first post.  I had only looked at NeoTO's date.  So all good.

We were in the US for a holiday last year in June-July.  Never made it to Wisconsin.  Just the normal tourist things like Disney land, Grand Canyon, Hoover Dam etc..

I have tried several times to get these files uploaded, but something freaks out, tells me there is already a file of that name.  I will rename them with .txt extensions and try that.  So you just change them back to Signal Library.mcs and wx4_Button_Hack.set.
Maybe you can get some use with them.  Have a great week Tom.

Regards,

Craig

* wx4_Button_Hack.txt (1279.18 KB - downloaded 35 times.)
* Signal Library.txt (1 KB - downloaded 35 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!