Author Topic: Embedding the "Mach MAD" for 4, into a screen set! Still got stuff to do!  (Read 3239 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
I am porting over Mach3 MAD to Mach4, and here is my first trials at embedding it into a screen set.  I LOVE the power of M4!!

Got all the inputs working, doing outputs next, may add stuff for Modbus, and register support haven't decided yet.

I also may just make the launch-able dialogs like MAD 3 was, since you can have them float around on top no matter what page your own, for machine setup/debugging.

I may sell it as an Add-On haven't decided yet...
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Example of the INPUTS floater window, it stays on top, and you can disable its updating with a toggle button.
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline dude1

  • Active Member
  • Posts: 1,253
    • View Profile
Very nice

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Thanks!!
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Here is a "MAD 4 MACH" screen shot.

this shows the "Floater" windows for:
  • All Mach4 OEM Inputs
  • All Mach4 OEM Outputs


You will be able to choose where to install the MAD.mcc as well. All you have to do is drop the MAD.mcc into what ever
folder you want it to live in. If you choose a different folder, than the "stock" code to launch it, then you will need to change its package path.

Put the following code in any button button (or make one) on your screen set,
just UN-comment the function you want to use:

-------------------------------------------------------------------------------------------------------
--////////////////  This is the REQUIRED Header code, Begin  //////////////////////
package.path = "./?.lua;c:/Mach4Hobby/MODULES/?.mcc;"
--where the module file is.(change the above path if you want it in a different folder    
local ss = require "MAD";--load the module file, call it ss
--///////////////  This is the REQUIRED Header code, End   ///////////////////////

--ss.MadINPUTS();   --uncomment to launch the INPUTS floater window
--ss.MadOUTPUTS();  --uncomment to launch the OUTPUTS floater window

-------------------------------------------------------------------------------------------------------

To be able to Enable or Disable (by default they are disabled), the the inputs or outputs from being updated.
You will have to add to your screen two buttons (or other methods to turn on/off the following two named LEDs).

The "MAD.mcc" watches the following 2 LEDs, that you have to add to your screen, and name them the following:
  • "EnaInUpLed"
  --this enables(ON) or disables(OFF) the update function for INPUTS
  • "EnaOutUpLed"
  --this enables(ON) or disables(OFF) the update function for OUTPUTS
[/list]

Here is some code for making Enable/Disable toggle buttons for the two above LEDs, there is an "Example" screen set here called: "wxMachATC.set"  (it already has all the buttons and LEDs in it, assumes stock package path),
that you can use for testing or debugging or to see how to put this in your screen set.

Inputs Enable/Disable btn code for INPUTS:
Text Up:        Enable INPUTS Update
Text Dn:        Disable INPUTS Update
Button Color Up: Green (plus blink rate 500)
Button Color Dn: Red
Down Script:  scr.SetProperty('EnaInUpLed', 'Value', '1');
Up Script:      scr.SetProperty('EnaInUpLed', 'Value', '0');

Inputs Enable/Disable btn code for OUTPUTS:
Text Up:        Enable OUTPUTS Update
Text Dn:        Disable OUTPUTS Update
Button Color Up: Green (plus blink rate 500)
Button Color Dn: Red
Down Script:  scr.SetProperty('EnaOutUpLed', 'Value', '1');
Up Script:      scr.SetProperty('EnaOutUpLed', 'Value', '0');

That is all there it so Launching the two floater windows, you can minimize them, and they always stay on top, so you can set up a New Machine or debug one. (I may also be adding floaters for: Modbus, and Registers as well..)

NOTE: I will be selling this "Module Add-on" for $10.00 via paypal, but I am looking for 5 (FIVE) beta-testers that will get it forFREE!! in exchange for sending me "testing results". The .mcc will generate a "PC ID" that you will need to email me so I can generate you a Lic. File. You should be familiar with how to do screen design to integrate MAD.

send me an email if you want to be a beta tester to: PoppaBear(at)Hughes.net  ( change the (at) to @ )

thanks in advance!

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Online ger21

  • Global Moderator
  • *
  • Posts: 6,156
    • View Profile
    • The CNC Woodworker
Will this be available as a version that's screenset independent?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Yes, you can use it to attach to ANY screen set!!  It is just an add-on module, the above code and "Screen Set" shows how it was attached to a "Stock" screen set...  it is just standard wxLua code.

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Just as a side note, It can also be "Embedded" into a screen set (see 1st post above), using a LuaPanel in the screen.
but....  if your thing is doing a lot of stuff, it can bog the screen.

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline smurph

  • Administrator
  • *
  • Posts: 1,062
  • "That there... that's an RV."
    • View Profile
Nice work Scott!

Steve

Offline poppabear

  • Global Moderator
  • *
  • Posts: 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Thank You Professor!!
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/