585,676 active members*
5,305 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009
    Posts
    125

    Replacing Pendant brain file with lua

    Anyone changing over to Mach4 and still using an old wired Pendant, who has solved the problem of the Mach3 brain file.
    So far managed some simple jobs in Lua (M codes etc), but where to start for this, Can I just put the code into a "Lua Panel" attached to my Screens .SET file.

    Thank you in advance.

  2. #2

    Re: Replacing Pendant brain file with lua

    Pendants on Mach4 are a tricky one! There is (was) only one 'approved' pendant which was expensive & didn't do what I wanted - so I set about building one!

    I'm using a CSMIO/IP-M controller and didn't have enough spare inputs to connect even the MPG Wheel. CS Labs suggest you buy their MPG addon - but it was still unclear whether this would function on Mach4.

    I decided to use Serial to connect it as there's not a large volume of data & it's not time critical, then write Lua scripts to intercept the Serial, interpret then move the axis accordingly. I also used Serial to send the DRO and button states back to the pendant. The end result works very well (I used it this morning!). Details below:
    https://www.machsupport.com/forum/in...?topic=43095.0

    The hardest part was getting the 'shady' Chinese screen to work properly. At the time there was no availability of more Arduino friendly Capacitive Touch Screens, like the one from Adafruit. If I were making another one - I'd use one of these.

    In your case, I would hack the Arduino code to package up the states of your switches & mpg and send them to Mach4. Then adjust the Lua script to act on them. Keep everything else the same.

  3. #3
    Join Date
    Nov 2013
    Posts
    4358

    Re: Replacing Pendant brain file with lua

    Hi,
    I use a VistaCNC P1A pedant on Mach4 and has worked well for me for five, going on six years, and it cost about $160USD as I recall.
    It plugs into the PC via USB and has its own Mach4 plugin, not requiring all those precious inputs on your controller/BoB.

    Given that alternative: what is the appeal about having a hard wired MPG?

    Craig

  4. #4
    Join Date
    Apr 2009
    Posts
    125

    Re: Replacing Pendant brain file with lua

    Strictly speaking, not a wired pendant (See jpg), however works the same. Managed using Lua ok in the end (Quite simple when you know how). Much prefer this, to the wireless pendant that I have, didn't give the control that I need, like this does.

Similar Threads

  1. Mach3 VFD control via modbus using brain file
    By A_Camera in forum Mach Software (ArtSoft software)
    Replies: 36
    Last Post: 04-02-2020, 10:10 PM
  2. Brain dead
    By Gpl625 in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 10-03-2010, 08:12 PM
  3. I need some help please, I have melted my brain
    By loomis in forum Stepper Motors / Drives
    Replies: 0
    Last Post: 10-31-2008, 10:40 PM
  4. Brain Tease
    By DSL PWR in forum Community Club House
    Replies: 7
    Last Post: 08-16-2007, 01:38 AM
  5. I would like to PIC someones Brain
    By Al_The_Man in forum PIC Programing / Design
    Replies: 9
    Last Post: 05-04-2005, 07:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •