584,805 active members*
4,987 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    92

    Visual Basic question relating to Mach3 probing

    I have Mach3 running a 4 axis milling machine and am trying to implement an auto tool zero function. In most of the examples I have found is a line of code
    If IsSuchSignal (22) Then
    I understand all this except the number 22. Does 22 refer to input pin 22, or some memory location, or just what is significant about 22?
    My system is a bit different from the average Mach3 using a breakout board to drive stepper motors. Instead I am using the Galil plugin.with a Galil DMC-1750 controller card and servo motors. The Galil card has its own breakout board (ICM1900) with 104 pins for various functions. According to the GalilPlugIn.pdf instructions the Input pins are assigned different numbers from the parallel port cable.

    In the Galil controller Input 3 (a Galil card Input port) is used for sensing a probe on the Z axis, and this becomes Port 1 Pin 27 in the Mach3 port configuration table.

    So would I then use 27 instead of 22 in the VB script for the auto tool zero Macro?

    I have also seen the same code written with 54 instead of 22 for the same purpose but not mentioning specifying why 54.

  2. #2
    Join Date
    Nov 2012
    Posts
    1267

    Re: Visual Basic question relating to Mach3 probing

    IsSuchSignal(22) checks whether the probe is already touching. 22 is just one of Mach3's undocumented constants AKA magic numbers, so leave it as is. It should (theoretically) work.

    No idea what "signal 54" is. I wish Mach3 documentation was a bit more complete. Would have saved a lot of headache for many thousands of CNC users.

  3. #3
    Join Date
    Jan 2007
    Posts
    92

    Re: Visual Basic question relating to Mach3 probing

    I do not think your response is correct. I did find a document that seems to indicate it is in reference to a pin number.
    According to .
    Mach3_V3.x_Macro_Prog_Ref.pdf

    This function returns an Integer value indicating whether the specified signal is defined in
    Config->Ports&Pins. A 0 return value indicates the signal is not defined, while a nonzero
    return value indicates the signal is defined.

    Since I am using pin 27 for this pur[pose, I believe I need to change 22 to 27.

  4. #4
    Join Date
    Nov 2013
    Posts
    4280

    Re: Visual Basic question relating to Mach3 probing

    Hi,
    I use Mach4 and the reason I changed (eight years ago) was that I was so disgusted with the ability, or rather inability of CE (Cypress Enable), the dialect of VB that Mach3 uses for
    scripting. Mach4 uses Lua which is a learning curve all in itself but is VASTLY superior to CE.

    Craig

  5. #5
    Join Date
    Nov 2012
    Posts
    1267

    Re: Visual Basic question relating to Mach3 probing

    Quote Originally Posted by bbutcher85710 View Post
    I do not think your response is correct. I did find a document that seems to indicate it is in reference to a pin number.
    According to .
    Mach3_V3.x_Macro_Prog_Ref.pdf

    This function returns an Integer value indicating whether the specified signal is defined in
    Config->Ports&Pins. A 0 return value indicates the signal is not defined, while a nonzero
    return value indicates the signal is defined.

    Since I am using pin 27 for this pur[pose, I believe I need to change 22 to 27.
    I think we both were wrong.

    The IsSuchSignal function checks whether the probe pin has been defined in the config.
    The 22 constant simply means "probe signal". It is definitely NOT the pin number.

Similar Threads

  1. G code interpreter with Visual Basic
    By njkleong in forum Visual Basic
    Replies: 5
    Last Post: 05-25-2020, 06:13 AM
  2. Visual Basic Express
    By rweatherly in forum Visual Basic
    Replies: 8
    Last Post: 11-16-2006, 07:02 PM
  3. visual basic question
    By keebler303 in forum Visual Basic
    Replies: 5
    Last Post: 09-05-2006, 08:11 PM
  4. Galil & Visual Basic?
    By Al_The_Man in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 1
    Last Post: 04-17-2006, 07:32 PM
  5. New Visual Basic forum
    By cncadmin in forum Visual Basic
    Replies: 1
    Last Post: 02-28-2005, 02:36 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
  •