585,722 active members*
4,262 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Mach Software (ArtSoft software) > Probing does not work correctly when displaying machine co-ordinates
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2013
    Posts
    23

    Probing does not work correctly when displaying machine co-ordinates

    I have been using probing for a while now and it has been working fine. The last couple of days the probing is having a problem. The code I am using has been borrowed from various sources and modified:
    Code:
    '	VBScript For probing Left In the X direction
    
    ProbeDia = GetUserDRO(1152)
    
    If GetOemLed (825) <> 0 Then 		'Check to see if the probe is already
    	Code "(Probe plate is grounded, Operation Aborted)" 'Display Message
    Else
    	Code "G4 P1"					'Pause 1 second to give time to position probe plate
    	CurrentFeed = GetOemDRO(818) 	'Get the current feedrate to return to later
    	Code "F4"
    
    '	Probe left
    
    	XNew = GetDro(0) - 3			'Probe to current position -3 inches
    	Code "G31 X" &XNew
    	While IsMoving()				'Wait for move to complete
    	Wend
    	XNew = GetVar(2000)				'Read the touch point
    	Code "G0 X" &XNew				'Move back to the hit point incase there was an overshoot
    	While IsMoving ()
    	Wend
    	Code "F" &CurrentFeed 			'Restore original feed rate
     	If ProbeDia = 0 Then
    		 SetOemDro(800,0)			'Set X axis to 0
    		 Code "G4 P0.25" 			'Pause for Dro to update.
    	Else
    		 SetOemDro(800,ProbeDia/2)	'Adjust X axis DRO for Probe Diameter
    		 Code "G4 P0.25" 			'Pause for Dro to update.
    	End If
    End If
    It works perfectly EXCEPT when I hit the "Machine Coords button on Mach3 to display the Machine Coordinates. Once displaying MC and probing the X probe will work fine when the probe is moving to the right, but if I try to probe from the right (probe moving left) the probe takes off to the right and continues until the limit switch stops the movement, similar problem with Y probing.

    Any thoughts?

    Barry

  2. #2
    Join Date
    Mar 2003
    Posts
    35538
    Add this before probing:



    If GetOemLED(16)<>0 Then ' Check for Machine Coordinates
    Code "(Please change to working coordinates)"
    Exit Sub ' Exit if in Machine Coordinates
    End If
    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)

  3. #3
    Join Date
    Mar 2003
    Posts
    35538
    You'll also need to add a t the beginning a:

    Sub Main()

    And at the end an:

    End Sub
    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
    Jan 2013
    Posts
    23
    Hi Gerry, that makes sense, but why would displaying Machine Coords cause this, or does pushing the machine coords button do more than just change the display?

    I guess I could also use DoOEMButton(256) in your addition to display working coordinates before it starts probing?

    Barry

  5. #5
    Join Date
    Mar 2003
    Posts
    35538
    but why would displaying Machine Coords cause this
    It could be one of two reasons I can guess at, but don't know for sure.
    1) Being in Machine coordinates possibly changes the value of Var(2000)
    2) Either the wrong value is being written to DRO 800, or no value is written to it.

    It would take a little testing to figure out exactly why it doesn't work.
    All I know is that most of the "good" probing code I've seen has the sample code I posted above in it.

    It doesn't take much code to do some basic probing. It takes a lot more to make it reliable in all situations.
    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
    Jan 2013
    Posts
    23
    Thanks for the followup Gerry, may do some investigating when I get a spare moment

    Barry

Similar Threads

  1. 4 axis screen set not displaying correctly
    By robe_uk in forum Mach Software (ArtSoft software)
    Replies: 2
    Last Post: 08-22-2012, 11:23 PM
  2. Machine not moving correctly
    By johntech in forum Machines running Mach Software
    Replies: 2
    Last Post: 02-10-2012, 03:44 AM
  3. Undo work not correctly in BCC V24
    By Questionguy in forum BobCad-Cam
    Replies: 3
    Last Post: 02-13-2011, 04:12 AM
  4. Help! - Using multiple work co-ordinates? X4
    By colton_m in forum Mastercam
    Replies: 1
    Last Post: 10-15-2010, 06:06 AM
  5. Grid not displaying correctly in d-cad
    By windy_miller in forum Dolphin CAD/CAM
    Replies: 4
    Last Post: 11-28-2008, 02:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •