Results 1 to 4 of 4

Thread: Macro to run when screen is opened

  1. #1
    Registered
    Join Date
    Sep 2008
    Location
    UK
    Posts
    28
    Downloads
    0
    Uploads
    0

    Macro to run when screen is opened

    Is it possible to run a macro when a screen is opened ? I have a row of four buttons that load the four Gcode files that the user will be allowed on the machine, and a row of four userLEDs that indicate which file has been opened (which button has been pressed). When Mach is started no file has been opened, so no LED should be lit. I can't get away from the condition that one of them is lit.

    I also have an array of buttons/LEDs layed out for a set of fixtures, and the LEDs show which fixture is active (which button has been pressed). Unfortunately, changing to another screen, swapping to a different fixture (G55, G58 etc) and then changing back to my screen doesn't update the LED.

    A macro that ran when the screen was opened could fix both of these !

    Tim


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22212
    Downloads
    0
    Uploads
    0
    Can you have a macro change your screen? Not sure, and don't have time to check right now. Just a guess.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered
    Join Date
    Sep 2008
    Location
    UK
    Posts
    28
    Downloads
    0
    Uploads
    0
    Yep, a macro to change the screen would be just fine. I'm exposing the limits of my ignorance here, but is there a way of attaching a macro to the screen so that it runs once when the screen is opened ? I could do it by putting a button on there to initiate the 'update all leds' macro, but I'd like to do it automatically when the screen is switched.

    Tim


  4. #4
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22212
    Downloads
    0
    Uploads
    0
    DoOEMButton(X) will change the screen to screen X. Try that as the first or last line of your macro, and assign the macro to the button to change the screen. Then it should change the screen and run the macro, or maybe run the macro first and then change the screen.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


Similar Threads

  1. Homemade Screen Printer/Silk Screen
    By Sbthomas13 in forum Machine Created Art
    Replies: 20
    Last Post: 02-13-2009, 07:35 PM
  2. Replies: 6
    Last Post: 07-13-2008, 06:28 PM
  3. Convert Fanuc Macro to Fadal Macro
    By bfoster59 in forum Fadal
    Replies: 1
    Last Post: 11-09-2007, 12:41 AM
  4. CNC Operators and Programmers Jobs Season Opened
    By CanroIntl in forum Employment Opportunity
    Replies: 1
    Last Post: 08-29-2007, 05:59 PM
  5. Classifieds has been re-opened
    By CNCadmin in forum CNCzone Site News and Contests
    Replies: 7
    Last Post: 07-26-2007, 09:13 AM

Posting Permissions



About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.