Hello Guest it is April 19, 2024, 01:08:08 AM

Author Topic: How to use Mach and Pokeys to control LED status lights?  (Read 11122 times)

0 Members and 1 Guest are viewing this topic.

How to use Mach and Pokeys to control LED status lights?
« on: May 11, 2010, 04:55:49 PM »
First time working with pokeys and mach3 and my small DIY cnc router.

I'm trying to add LED status lights to my control panel with pokeys but must be missing something as my light is on all the time for my first and second tests.

My environment is vista, .040 licensed Mach, pokeys 55 with the latest pokeys plugin from machsupport and software from pokeys.

I have the pokeys software installed and the mach3 pokeys plug in installed.

I have used the pokeys to connect a momentary switch that emulates alt-a on the keyboard for going to x y z on the movement control with my MPG, which is connected directly to one of my C10 boards, I know at least that function works great.

I'd like to list my recipe below for what I did to have an LED (light) illuminate when the spindle is on. I can turn the spindle on and off with the mach3 button or M3 / M5 g-code commands.

In the mach pokeys plug in I mapped user led i/o to a range starting at 2000, and set uled input range to 33 - 55, which is supposed to correlate to pins 33 - 55 on the pokeys I believe.

In the LED brain I created, I set LED input to look for spindle on, had it pass the signal to oem led 2001. 2001 should be pin 34 on the pokeys if I have all that correct.

I connected the led to pokeys 34 and ground with the proper resistor. + to the actual pin 34. I
tested it separately and it works fine.

Using the pokeys software, I set pin 34 for digital output.

the light comes on the moment I send the update to the pokeys and never goes off.

I turn the spindle on in mach, turn the spindle off, led stays lit no matter what I do.

Talking with Arturo he suggested I try a forumla for spindle speed >0 instead, but I couldn't get that to work either.

Then, worried that I had some other issue related to the spindle after talking with Arturo, I did the same setup but checking for estop, but had the same result, LED (light) is always lit.

I read through the pokeys manual and did not see this setup explained, though I did verify that I had the LED (light) installed correctly.

I'm sure I have a step above that's wrong or missing and would appreciate any help on this I can get.

Thanks...philip

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: How to use Mach and Pokeys to control LED status lights?
« Reply #1 on: May 12, 2010, 02:29:53 AM »
Hey Phillip,
   Then NUT shell version of what you want to do is this: If the spindle is ON, you want your external LED on Pin 34 of the PK to be ON as well, and OFF when the spindle is OFF correct???
If that is true above.
NOTE:  If your using OEMLED 11, (the overal spindle is active LED, for your input then it will not work as you want), The OEMLED 11 the first time you activate the Spindle it will come on and STAY on, unless you hit the Reset.  So, You want to look instead at the OEMLED 164 CW (I think), and/or OEMLED 165 CCW, you can "OR" these two OEM LEDs to an "AND" block in your Brian, and then send the result to UserLED 2033 (which represents pin 34 in your example).
NOTE2: you will need to set the OUTPUT of the PoKeys to "Invert" Outputs for any pin your using to drive LEDs if you want the external LEDs to track the same state as the internal ones in mach3.
NOTE3: Realize that PIN 1 of the PoKeys given the conditions above, will Map to UserLED 2000, NOT 2001!!
Look at the PoKeys Screen in Mach3, (If you are using the "PoKeys.set" that comes with the installer). For an experiment, map PK pins 1 as INPUT (note you will have to set them to INVERT for them to show correct logic in Mach3). What you will see is that when Pin 1 goes "Hot", ULED 2000 will turn on. What you want to check is this, on the PoKeys Diagnostic page, you will see an "On/Off" button next to a user LED that represents PIN 34 on your Pokeys, hook a REAL LED to your pin 34, and flip the button that turns on/off that pin will be ULED2033 (I think, double check me on this, I am NOT at my Mach computer, and trying to do this from memory, which isnt always good...........), ULED2034, would control Pin 35........   So varify that.
scott
fun times
Re: How to use Mach and Pokeys to control LED status lights?
« Reply #2 on: May 12, 2010, 09:47:26 AM »
Thanks poppabear.

I had tried those two inputs with no better result.

Testing more now, I think the issue isn't related to mach at all because in the pokeys software the moment I change pin 34 to digital output and send it the light turns on, whether or not it's inverted or not. It only goes off if I set the pin to inactive.

Maybe this is a question for Boris instead because this sure seems strange.
Re: How to use Mach and Pokeys to control LED status lights?
« Reply #3 on: May 13, 2010, 08:36:48 PM »
Phil,

What happens if you disconnect the LED wiring, and just test the terminal using a multimeter?

Please test this with different pins.

Arturo Duncan
http://cnc4pc.com
Re: How to use Mach and Pokeys to control LED status lights?
« Reply #4 on: July 25, 2013, 02:07:25 AM »
First time working with pokeys and mach3 and my small DIY cnc router.

I'm trying to add LED status lights to my control panel with pokeys but must be missing something as my light is on all the time for my first and second tests.

My environment is vista, .040 licensed Mach, pokeys 55 with the latest pokeys plugin from machsupport and software from pokeys.

I have the pokeys software installed and the mach3 pokeys plug in installed.

I have used the pokeys to connect a momentary switch that emulates alt-a on the keyboard for going to x y z on the movement control with my MPG, which is connected directly to one of my C10 boards, I know at least that function works great.

I'd like to list my recipe below for what I did to have an LED (light) illuminate when the spindle is on. I can turn the spindle on and off with the mach3 button or M3 / M5 g-code commands.

In the mach pokeys plug in I mapped user led i/o to a range starting at 2000, and set uled input range to 33 - 55, which is supposed to correlate to pins 33 - 55 on the pokeys I believe.

In the LED brain I created, I set LED input to look for spindle on, had it pass the signal to oem led 2001. 2001 should be pin 34 on the pokeys if I have all that correct.

I connected the led to pokeys 34 and ground with the proper resistor. + to the actual pin 34. I
tested it separately and it works fine.

Using the pokeys software, I set pin 34 for digital output.

the light comes on the moment I send the update to the pokeys and never goes off.

I turn the spindle on in mach, turn the spindle off, led stays lit no matter what I do.

Talking with Arturo he suggested I try a forumla for spindle speed >0 instead, but I couldn't get that to work either.

Then, worried that I had some other issue related to the spindle after talking with Arturo, I did the same setup but checking for estop, but had the same result, LED (light) is always lit.

I read through the pokeys manual and did not see this setup explained, though I did verify that I had the LED (light) installed correctly.

I'm sure I have a step above that's wrong or missing and would appreciate any help on this I can get.

Thanks...philip


Oh man wonderful information.. I am working on similar project so I thin the details will help me alot.. Thanks again
« Last Edit: August 04, 2013, 04:12:53 AM by Tweakie.CNC »
Re: How to use Mach and Pokeys to control LED status lights?
« Reply #5 on: July 25, 2013, 10:30:10 AM »
I suggest you make a backup and update Mach3, the pokeys software and plugin, and the firmware.

Life is so much easier than what you are describing now with the current plugin.

Arturo Duncan
http://cnc4pc.com