Visual Basic question relating to Mach3 probing


Results 1 to 5 of 5

Thread: Visual Basic question relating to Mach3 probing

  1. #1
    Member
    Join Date
    Jan 2007
    Location
    USA
    Posts
    92
    Downloads
    0
    Uploads
    0

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

    Similar Threads:


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

    Default 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
    Member
    Join Date
    Jan 2007
    Location
    USA
    Posts
    92
    Downloads
    0
    Uploads
    0

    Default 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
    Member
    Join Date
    Nov 2013
    Posts
    4361
    Downloads
    0
    Uploads
    0

    Default 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
    Member CitizenOfDreams's Avatar
    Join Date
    Nov 2012
    Location
    USA
    Posts
    1267
    Downloads
    4
    Uploads
    0

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



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

Visual Basic question relating to Mach3 probing

Visual Basic question relating to Mach3 probing