Accessing Ports in Macros


Results 1 to 6 of 6

Thread: Accessing Ports in Macros

  1. #1
    Member
    Join Date
    Apr 2009
    Location
    Australia
    Posts
    125
    Downloads
    4
    Uploads
    3

    Default Accessing Ports in Macros

    I need to Activate / deactivate output ports in a macro, but cannot find how the port number is coded.
    The direct approach (i.e. port #1 pin #5) or using an Output Number (i.e. Output #6)

    Similar Threads:


  2. #2
    Member CitizenOfDreams's Avatar
    Join Date
    Nov 2012
    Location
    USA
    Posts
    1267
    Downloads
    4
    Uploads
    0

    Default Re: Accessing Ports in Macros

    DoOemButton (233) 'Output 4 ON
    DoOemButton (234) 'Output 4 OFF
    DoOemButton (235) 'Output 5 ON
    DoOemButton (236) 'Output 5 OFF
    DoOemButton (237) 'Output 6 ON
    DoOemButton (238) 'Output 6 OFF

    Macros deal with inputs and outputs, they are not aware of ports and pins.



  3. #3
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Accessing Ports in Macros

    There's also ActivateSignal() and DeActivateSignal().

    https://www.machsupport.com/wp-conte...o_Prog_Ref.pdf

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

    (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
    Apr 2009
    Location
    Australia
    Posts
    125
    Downloads
    4
    Uploads
    3

    Default Re: Accessing Ports in Macros

    Thank you for your quick response, I will try that. It has been holding me up a while.
    Soon after posting this thread, I found that Activate() / Deactivate() work with pre-defined constants such as Output1 to address the port via Output #1.



  5. #5
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Accessing Ports in Macros

    The Mach3 customization Wiki used to have a lot of useful info, but unfortunately, it all disappeared a few weeks ago when they updated their forum. Artsoft apparently doesn't care about fixing it.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

    (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
    Apr 2009
    Location
    Australia
    Posts
    125
    Downloads
    4
    Uploads
    3

    Default Re: Accessing Ports in Macros

    Thanks again. I had that document, but all it said under Activatesignal() was refer CB constants, but no listing of them.
    It is lucky they used OUTPUT2 in the example displayed, which was all I needed.
    So now I can access all the outputs in this way I can now finalize my project (3 axis Mach3 lathe).



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

Accessing Ports in Macros

Accessing Ports in Macros