Need Help! Mach 3 output indicators


Results 1 to 9 of 9

Thread: Mach 3 output indicators

  1. #1
    Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Mach 3 output indicators

    I'm thinking of adding external start/stop/pause buttons to my system by using three input pins and associated OEM codes (which are 1000, 1001 and 1003 I believe). So that should be straightforward.

    Is there any way of controlling an output based on these? The purpose of these would be to have the buttons illuminate to show the current machine status. This is going to be a better option than using external electronics, which might not be a realistic representation of the current software status...

    I'm thinking some kind of macro attached to the on-screen buttons (is that possible??) to switch one of the outputs (there are 6 available). And if this is possible, would the OEM trigger be equivalent to using the onscreen button, i.e. also would launch the associated macro?

    One further question which is vaguely related- what is the purpose of having 6 possible 'enable' outputs? I'm struggling to see how/why Mach 3 would control these individually. I believe these (all of these?) change state when the software is in e-stop mode?

    In all the above, I'm referring to using parallel ports (I have two) rather than a dedicated motion control board. I know that the motion control boards have more comprehensive support for what I'm looking to implement.

    Forgive me for not looking around the Mach forums, the search engine is down....

    Thanks!

    Similar Threads:


  2. #2
    Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    Well I think I'm getting somewhere with this - it looks like I can configure an input pin to send OEM code 301, which I can use to launch a Macro I define? The Macro would be able to press the 'cycle start' button through code, plus activate an output for the indicator.

    In General Config->initilialisation I would run a Macro (saved as M700, say) which sets the macro associated with OEM code 301 as follows:

    SetTriggerMacro(M701)

    Macro M701 would contain the commands I want to run.

    What I can't figure out is if there's a way of having more than one user-defined macro accessible from the input pins - since I'd need a separate macro fo the 'Cycle Start', 'Feed Hold' and 'Stop' buttons. Or do I need to link the same macro to multiple pins, then check which pin called it from the VB Code?

    Last edited by Richster; 12-19-2018 at 08:49 AM.


  3. #3
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    34403
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    What I would do is use the macropump macro to monitor your button presses, and then activate the appropriate OEM button.

    A simpler method for the outputs is to use a Brain, and have the Brain activate outputs when the corresponding Mach3 LED is active. But you could have the macropump do this as well.

    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

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

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

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


  4. #4
    Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    Thanks, so macropump is like a software loop which is running constantly, checking the input pins periodically?

    And that gives me another idea.... to increase the number of input buttons, I could use a 'binary' approach and decode in software? Same on the output signals.....

    So with 3 inputs, say, 7 buttons as follows. 4 inputs would allow 15

    Button 1 =001
    Button 2 = 010
    Button 3 = 011
    Button 4 = 100
    Button 5 = 101
    Button 6 = 110
    Button 7 = 111

    The same approach could be used to decode indicators on the output...

    Is my plan flawed, or could this work?



  5. #5
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    34403
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    It's a Mach3 macro that runs 10 times/second. Just name it macropump.m1s, and enable it in General Config.

    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

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

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

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


  6. #6
    Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    Thanks so much Gerry - does my idea of binary 'encode' and 'decode' on the inputs and outputs have wheels? I think it could work for the inputs (since only one is pressed at a time), The outputs is more complex since multiple indicators need to be lit at the same time....

    (I edited my previous post slightly)

    Last edited by Richster; 12-19-2018 at 09:36 AM.


  7. #7
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    34403
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    Not sure how you'd implement that? Much simpler to buy a controller like a UC300ETH, that has 5 ports of I/O.

    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

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

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

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


  8. #8
    Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    Okay I got this working, thought I'd document in case anyone else is looking to do similar. So my scenario is 3 input pins (start / hold/ stop). So that's three inputs, there only need to be two outputs for button illumination since 'stop' will always be the inverse of 'start' (can be done with electronics rather than using up a pin....

    For the inputs, these are used on 'OEM Trig #' inputs, which are then mapped to the OEM commands under config->system hotkeys. The codes are 1000, 1001 and 1003 for start, feedhold, stop.

    The LED OEM code for 'start' is 804, and it's 805 for 'hold'

    Assuming that the two 'illuminate' signals are interfaced to outputs 3 and 4, then the code in macropump.m1s is as follows. Also 'macropump' needs to be enabled in 'general config'. The file goes in the 'macros' folder for the currently active profile, e.g. c:\mach 3\mill\marcos

    '----Start button
    If GetOEMLED(804) Then
    ActivateSignal(OUTPUT3)
    Else
    DeactivateSigal(OUTPUT3)
    End If

    '----Feed hold button
    If GetOEMLED(805) Then
    ActivateSignal(OUTPUT4)
    Else
    DeactivateSigal(OUTPUT4)
    End If

    Hope that helps!



  9. #9
    Member
    Join Date
    Aug 2016
    Location
    United States
    Posts
    175
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Richster View Post
    Okay I got this working, thought I'd document in case anyone else is looking to do similar. So my scenario is 3 input pins (start / hold/ stop). So that's three inputs, there only need to be two outputs for button illumination since 'stop' will always be the inverse of 'start' (can be done with electronics rather than using up a pin....

    For the inputs, these are used on 'OEM Trig #' inputs, which are then mapped to the OEM commands under config->system hotkeys. The codes are 1000, 1001 and 1003 for start, feedhold, stop.

    The LED OEM code for 'start' is 804, and it's 805 for 'hold'

    Assuming that the two 'illuminate' signals are interfaced to outputs 3 and 4, then the code in macropump.m1s is as follows. Also 'macropump' needs to be enabled in 'general config'. The file goes in the 'macros' folder for the currently active profile, e.g. c:\mach 3\mill\marcos

    '----Start button
    If GetOEMLED(804) Then
    ActivateSignal(OUTPUT3)
    Else
    DeactivateSigal(OUTPUT3)
    End If

    '----Feed hold button
    If GetOEMLED(805) Then
    ActivateSignal(OUTPUT4)
    Else
    DeactivateSigal(OUTPUT4)
    End If

    Hope that helps!
    Hey I have made a button to turn on out 4 and one to turn off out 4. I think I can get a macro to do that ..
    Anyone know how to do this .
    Would be appreciated...

    Sent from my XT1635-01 using Tapatalk



  10. #10
    Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 output indicators

    You could call the same macro (301), check the state of the output and toggle it? So if it's on, turn it off and vice-versa. I think you could call the same macro from two separate buttons if you wanted. Or just use one button and have it toggle the output. If you had an illuminated button (or sepatate indicator), you could wire this to the same output, to show the current state.

    Just some thoughts.....



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Mach 3 output indicators

Mach 3 output indicators