585,761 active members*
4,163 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2009
    Posts
    125

    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)

  2. #2
    Join Date
    Nov 2012
    Posts
    1267

    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
    Join Date
    Mar 2003
    Posts
    35538

    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
    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
    Join Date
    Apr 2009
    Posts
    125

    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
    Join Date
    Mar 2003
    Posts
    35538

    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
    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
    Join Date
    Apr 2009
    Posts
    125

    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).

Similar Threads

  1. Accessing S Value with Kflop C Program
    By delcon in forum Dynomotion/Kflop/Kanalog
    Replies: 1
    Last Post: 02-13-2015, 07:27 PM
  2. Accessing tool magazine
    By cossiegaz in forum SIEMENS -> GENERAL
    Replies: 0
    Last Post: 11-14-2014, 12:40 AM
  3. Accessing Macros on Studer S32/Fanuc 21-t
    By marcwdci in forum Fanuc
    Replies: 8
    Last Post: 09-05-2013, 04:18 PM
  4. Accessing the outputs
    By PomeroyB in forum DynaTorch
    Replies: 1
    Last Post: 11-17-2012, 05:30 AM
  5. Accessing IPL
    By fordav11 in forum Mori Seiki lathes
    Replies: 0
    Last Post: 12-18-2011, 05:29 AM

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
  •