Welcome, Guest. Please login or register.
Did you miss your activation email?
October 17, 2018, 03:15:57 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Finished Plugins for Download
| | | |-+  Mach MAD Plug in (Maintenance and Diagnostics)
Pages: « 1 2 3 4 5 6 »   Go Down
Print
Author Topic: Mach MAD Plug in (Maintenance and Diagnostics)  (Read 71157 times)
0 Members and 2 Guests are viewing this topic.
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #20 on: February 05, 2009, 09:20:03 AM »

Ok
      thanks guys, James has found and offered the solution for the error message if you uncheack plug in enable and shut down.
I had gotten this also, but, it didnt really effect anything.  Mach Comes back up fine.............

BUT, I will implement his fix for this and resend you all a version 1.2

Fernando:  The Cheack box for the LEDs is a "Read Only" check box. it just reports the state of the led your looking at you cannot change the state of an LED by cheacking or uncheacking the LED check box.  The only way it changes is for you to push the toggle button. the code in the button flips its state and the cheack box just reports its new state.

I will look and see if there is a way to disable unser Input into the check box, if there is, I will fix it to, otherwise it will have to stay.

I was looking for some quicky, "Owner Draw", code in which I could replace the cheack with a solid green, and un cheack with solid Grey, like the LEDs do in Mach.

scott
Logged

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #21 on: February 05, 2009, 09:53:11 AM »

Hey James tryied your solution, I still get the error box after unticking and closing Mach3.  The Error box is really no big deal, I just push NO on attempt recovery, and mach comes back up just fine.

I put this up with my Includes on the MachDeviceimplementation.cpp

#include "MainPage_Dlg.h"  //****The header file for the Dialog for this plugin***
#include "Buttons_Dlg.h"
#include "DROs_Dlg.h"
#include "LEDs_Dlg.h"
#include "SerialModbus_Dlg.h"
#include "TCPModbus_Dlg.h"
#include "LabelTickers_Dlg.h"
#include "SSSystemsLLC_dlg.h"

#define SHUTDOWN      0x12000e         // Undocumented notification

Here is what mynotify looks like:

void   myNotify ( int ID)
{
   if( ID == RangeStart )
   {
      dlg->ShowWindow(SW_SHOW);
   }

   if (ID == SHUTDOWN)
   {   
      if (NULL != dlg) {

         dlg->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg;
      }dlg = NULL;

      if (NULL != dlg2) {

         dlg2->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg2;
      }dlg2 = NULL;

      if (NULL != dlg3) {

         dlg3->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg3;
      }dlg3 = NULL;

      if (NULL != dlg4) {

         dlg4->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg4;
      }dlg4 = NULL;

      if (NULL != dlg5) {

         dlg5->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg5;
      }dlg5 = NULL;

      if (NULL != dlg6) {

         dlg6->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg6;
      }dlg6 = NULL;

      if (NULL != dlg7) {

         dlg7->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg7;
      }dlg7 = NULL;

      if (NULL != dlg8) {

         dlg8->DestroyWindow();
         mach3CWnd.Detach();
         delete dlg8;
      }dlg8 = NULL;      
   }

} //myNotify

I get Error code 9991 attemp recovery after changing from enabled to disapbled and closing. Like I said it really isnt a big deal, Mach will reopen, I just tick NO on attempt recovery.  I can go back and reenable the plug in, close and reopen, and it all works fine again.........

scott

Logged

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

Offline Offline

Posts: 106


View Profile WWW
« Reply #22 on: February 05, 2009, 10:07:47 AM »

Scott,

The resources I am freeing are apparently not the same as what you need to free.  Since you are using MFC modeless dialogs the dlg->DestroyWindows is probably appropriate.  BUT, if your plugin shuts down clean when the 'MyCleanup()' is called why not just put the code you have there into a function and call it from the SHUTDOWN notification?

Also, if you use the DbgMsg library I posted with my tutorial (dbg.cpp and dbg.h) you can put trace messages in to see exactly where the code is failing.

-James
« Last Edit: February 05, 2009, 10:10:12 AM by jemmyell » Logged

poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #23 on: February 05, 2009, 03:21:35 PM »

the code is I posted I pasted over from the MyCleanup function so now it is in two places in the cleanup for normal closure and in the mynotivy for disableling and then closing...........

I use "MessageBox" in my code to see what is happening, (a trick Ed sold me on).  I guess it just doesnt work for my case, and that is ok, the error doesnt realy do anything just an annoyance.

thanks for your time and suggestions though.

scott
Logged

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 2,363



View Profile
« Reply #24 on: February 05, 2009, 03:33:22 PM »

Quote
and that is ok, the error doesnt realy do anything just an annoyance.

Indeed but you may want to at least add this info to your program so you don't get asked about it over and over -  Wink

Dave
Logged

----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    Wink
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #25 on: February 05, 2009, 03:45:51 PM »

I will Add a "Read Me 1st" in the Zip file, for future installers going out, that explains this.........

Good Idea Dave.....

scott
Logged

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

Offline Offline

Posts: 106


View Profile WWW
« Reply #26 on: February 10, 2009, 11:29:16 AM »

Hi Scott,

Here is a good article on owner draw LED style controls.

http://www.codeproject.com/KB/buttons/LedButton.aspx

-James


Ok
      thanks guys, James has found and offered the solution for the error message if you uncheack plug in enable and shut down.
I had gotten this also, but, it didnt really effect anything.  Mach Comes back up fine.............

BUT, I will implement his fix for this and resend you all a version 1.2

Fernando:  The Cheack box for the LEDs is a "Read Only" check box. it just reports the state of the led your looking at you cannot change the state of an LED by cheacking or uncheacking the LED check box.  The only way it changes is for you to push the toggle button. the code in the button flips its state and the cheack box just reports its new state.

I will look and see if there is a way to disable unser Input into the check box, if there is, I will fix it to, otherwise it will have to stay.

I was looking for some quicky, "Owner Draw", code in which I could replace the cheack with a solid green, and un cheack with solid Grey, like the LEDs do in Mach.

scott
Logged

poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #27 on: February 10, 2009, 04:43:13 PM »

Mach MAD version 1.2 was sent out today to all, I have added a new feature!!!

the Control LED and User LED choice is now Remembered between opening/closing of Mach3 (I had several request for it, so I added it).
ALSO:  The control LED will SHOW the "Quick Picks" when you turn it on, AND, it will HIDE the ANY and ALL of the pages when it is turned off (upto all 8 of them).
When you Turn the LED back on, only the Quick Picks page will SHOW again, you will have to use it to launch SHOW the other pages like usuall. Just realize that if you playing with the LED functions and you toggle the state of the USER LED that you have choosen to contol the visibility of the windows you can turn yourself off..........

I put a "MAD Diagnostics" Button and LED on my Screen sets on my Diagnostics page, comes in real handy.

Further: I have NOT really noticed any impact on the Processor use time, with constantly running MAD vs. not running it. My comp has a 1.6 gig processor, so if your running a slow(er) comp check to see if you see any real impact if not, you can probably run it all the time if you want.

Scott
Logged

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #28 on: February 12, 2009, 10:10:26 AM »

Greetings,

    I made a "Stock OEM" Mach Mill screen set that has a "Mach MAD" button and LED next to it, to control the appearance and disappearence of the MAD Windows.
I put the Button/LED at the lower Left under the "History" and "Clear" buttons.  The Control LED next to it is UserLED 2220. You will need to put this number
in the Control LED box on the quick picks page, and hit the UPDATE button, also make sure the Radio button for "Use Control LED" is turned on.  If you are using Version 1.3 from the installer that I sent out to everyone, then Mach will remember the state of the control LED/and User number next time you open it.

The Screen set is called:  1024MAD.set
NOTE: the button and led are on the "Park" page so they display on all screens.

it is attached,

scott

* 1024MAD.set (91.86 KB - downloaded 523 times.)
Logged

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,240


Briceville, TN, USA


View Profile WWW
« Reply #29 on: February 15, 2009, 12:04:41 PM »

Version 1.4 has been sent to everyone on the list.
I added version information to the top title bar of the Quick Pics dialog window.
Also: The new installer will install the IMPROVED MAD screen set.......  I upgraded from the
screen above to there is a Cool "Ring" type LED around the Mach MAD button!! (like the one around the Resetbutton).

Read the Read me file that comes in the Zip, it will tell you about other minor changes/upgrades...

scott
Logged

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Pages: « 1 2 3 4 5 6 »   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!