CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Mach Software (ArtSoft software) > Mach Wizards, Macros, & Addons



This forum is sponsored by:

Reply
LinkBack Thread Tools Search this Thread Display Modes
  #505   Ban this user!
Old 01-16-2012, 09:39 PM
 
Join Date: Jun 2011
Location: usa
Posts: 18
jstefano is on a distinguished road

Originally Posted by Jay C View Post
Have a look at https://picasaweb.google.com/1175904...17992883319634 Yes, I have one wire for Ground, and the other to the probe with a pull-up resistor. I added a cap from ground to Vcc and one from probe to Ground. This helped remove any noise since I didn't use shield cables and didn't want to risk breakage or ruined work. My spindle is not grounded to my mill so I couldn't rely on a common ground to the tool or plate. Mine is the C10.

-Jay
Jay,
How is it that your spindle is not grounded to your mill? Are you using Mach3?
Reply With Quote

Sponsored Links
  #506   Ban this user!
Old 01-21-2012, 04:10 PM
 
Join Date: Dec 2004
Location: Memphis, TN
Posts: 1,097
Jay C is on a distinguished road

Originally Posted by jstefano View Post
Jay,
How is it that your spindle is not grounded to your mill? Are you using Mach3?
I don't have a ground wire to my mill (which is aluminum). The spindle is a Bosch Colt, and the outer casing is thermoplastic. There may be a common ground with respect to the mains, but not good enough for a probe signal.

-Jay
Reply With Quote

  #507   Ban this user!
Old 01-21-2012, 11:51 PM
 
Join Date: Sep 2003
Location: United Arab Emirates, Abu Dhabi
Posts: 13
kaartman is on a distinguished road
Z Zero script editing

I would like to use the z zero touch plate with the indexer, how would i go about changing the script, to zero the cutter in the center of the workpiece.
I have copied the script here,and add a picture for a better understanding, I would like the cutter to retract 25mm above the flat surface ( yellow rectangle) that i use to find z zero, from the flat surface the Z is 75 mm downward, how would i go about editing the script below to accomplish this

'Rem Probe Down by PEU (Based on Erniebro Work)
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZCurrent = GetOemDro(802)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F100" 'slow feed rate to 100 MM/MIN
GageH = GetUserDRO(1152)
ZNew = ZCurrent - 20 'probe down 20 mm
Code "G31 Z" &ZNew
While IsMoving()
Wend
Call SetDro (2,GageH)
FinalMove = GageH * 2
Code "G0 Z" &FinalMove
Code "F" &FeedCurrent 'restore starting feed rate

The problem that i have is that the Z- axis retract the height of the 'gauge block' ( using the height from the centre to the top) resulting in the Z to run into the Z max hard stop

Thank you
K
Attached Thumbnails
Click image for larger version

Name:	index.JPG‎
Views:	138
Size:	75.9 KB
ID:	150785  
Reply With Quote

  #508   Ban this user!
Old 01-24-2012, 04:30 AM
 
Join Date: Oct 2010
Location: USA
Posts: 243
dwalsh62 is on a distinguished road

I'm no rocket scientist and know nothing about VBscripts and need a zeroing script so I begin my search.

What puzzles me is that there is one script for metric and another for imperial.

Is it that difficult to code the script to be intelligent and detect the mode and adjust accordingly?

Why is it so difficult to find a decent script?

Why is the sanity of the script at the bare minimum?

You have to weed through so much crap to find snippets of code that it almost seems hopeless to find a good solution.

Perhaps I'm better off just writing one based on the information I can find and add intelligence to it since there doesn't seem to be such a solution available.
Reply With Quote

  #509  
Old 01-24-2012, 05:36 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,456
ger21 is on a distinguished road
Buy me a Beer?

The thread below this one has code that works for both imperial and metric.
http://www.cnczone.com/forums/mach_w...r_big-tex.html
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #510   Ban this user!
Old 01-27-2012, 03:21 PM
 
Join Date: Oct 2010
Location: USA
Posts: 243
dwalsh62 is on a distinguished road

Originally Posted by ger21 View Post
The thread below this one has code that works for both imperial and metric.
http://www.cnczone.com/forums/mach_w...r_big-tex.html
While there are options available like the "Big Tex" solution, it's still two separate scripts and you would have to switch the script for the particular job.

I've come up with a solution based on several scripts and information I found (which they all seem to be based on) using the basic command substructure and added some sanity/entropy to ensure safety and reliability under any working condition.

What I personally disliked about the "Big-Tex" and other similar scripts is that they require the use of custom screen sets, what I created works with the standard screen set or any screen set you want to install it in provided it is based on the default input/data storage fields.

While I could have added the functions to employ axis relocation I think that the simple cancel so you can use the jog to X and Y coordinates is an acceptable alternative.

Turning off the spindle if it's on and starting it back up (in the direction it was turning) is a safety precaution that preserves the touch plate/probe if you get ahead of yourself.

Working from metric (G21/G71) or imperial (G20/G70) state is considered in the process so you don't have issues in either state and these states are restored when the script has finished so one script works under all scenarios.

This is what I came up with and bear in mind, I'm not a script writter and this is my first attempt at such things but due to background do have some clue how to write and comment code for later reference.
Code:
' Auto Tool Zero by Dale Walsh <dale@daleenterprise.com>

Dim Answer ' a discardable storage variable for general consumption

Dim Initial_Abs_Inc

Dim Initial_Feed_Rate

Dim Initial_G_State

Dim Initial_Machine_Coordinates_State

Dim Initial_Spindle_CW_State

Dim Initial_Spindle_CCW_State

Dim Initial_Spindle_State

Dim Initial_Tool_Offset_State

Dim Probing_Feed_Rate

Dim Guage_Block_Height

Dim Z_Probe_Pos

Initial_Feed_Rate = GetOEMDRO(818)

Initial_G_State = GetOEMDRO(819)

Initial_Machine_Coordinates_State = GetOEMLed(16)

Initial_Tool_Offset_State = GetOEMLED(28)

Initial_Abs_Inc = GetOEMDRO(48)

Guage_Block_Height = GetOEMDRO(1001)

If Guage_Block_Height <= 0 Then
	Answer = MsgBox("A positive value must be entered for the Guage Block Height", 0, "Oops!!!")
	Exit Sub
End If

If GetOEMDRO(824) <= 0 Then
	Answer = MsgBox("A Tool has not been selected, select a tool and try again.", 0, "Oops!!!")
	Exit Sub
End If

If IsSuchSignal(22) Then ' Check whether a probe input is defined..
	If GetOEMLed(825) = 0 Then ' Check to see if it's already tripped

		Answer = MsgBox("Do you need to Move X, Y or Z ?", 4, "Do you need to Move")
		If Answer = 6 Then
			Message("Tool Zeroing to Material was canceled so you can change coordinates.")
			Exit Sub
		End If

		Answer = MsgBox("Place Sensor on work piece.", 1, "Is the Guage Block Sensor in place")
		If Answer = 2 Then
			Message("Tool Zeroing to Material was canceled.")
			Exit Sub
		End If

		Message("Tool Zeroing to Material is requested.")

		' Save settings for restoring later
		Initial_Spindle_State = GetOEMLED(11)
		Initial_Spindle_CW_State = GetOEMLED(164)
		Initial_Spindle_CCW_State = GetOEMLED(165)

		If Initial_Spindle_State = true Then  ' Spindle is running so stop it
			 If Initial_Spindle_CW_State = Initial_Spindle_CCW_State Then
				MsgBox("Your running spindle is misconfigured -> clockwise = " &  Initial_Spindle_CW_State & " and counter-clockwise" &  Initial_Spindle_CCW_State & " , please fix this.")
				Exit Sub
			End If
			DoSpinStop()
			Sleep(500)
		End if

		' Turn off Tool Offset if it's on
		Select Case Initial_Tool_Offset_State
			Case True
				DoOEMButton(136)
		End Select

		' Turn off Machine Coordinates if on
		Select Case Initial_Machine_Coordinates_State
			Case True
				DoOEMButton(180)
		End Select

		'  Get current scale settings.
		XScale = GetOEMDRO(59)
		YScale = GetOEMDRO(60)
		ZScale = GetOEMDRO(61)

		'  Set scale to one to probe.
		Call SetOEMDRO(59, 1)
		Call SetOEMDRO(60, 1)
		Call SetOEMDRO(61, 1)

		Select Case GetOEMLED(802)
			Case true ' Metric System
				Probing_Feed_Rate = 150
				Probe_Travel = 250
			Case false ' Imperial System
				Probing_Feed_Rate = 6
				Probe_Travel = 10
		End Select

		DoOemButton(1010)
		Code "G4 P1"

		' Perform the probe
		Code "G90 G31 Z-" & Probe_Travel & " F" & Probing_Feed_Rate
		While IsMoving()
		Wend

		Z_Probe_Pos = GetVar(2002)
		Code "G0 Z" &Z_Probe_Pos
		While IsMoving()
		Wend

		Call SetOemDRO(802 , Guage_Block_Height) 
		Code "G4 P0.500"
		DoButton(24) ' Home Z-axis
		While IsMoving()
		Wend

		Message("Tool is now zeroed to Material.")

		' Restore the original settings
		Code "F" &Initial_Feed_Rate

		' Restore the original G mode
		Select Case Initial_Abs_Inc
			Case 0
				Code "G90"
			Case 1
				Code "G91"
			Case 2
				Code "G92"
		End Select

		' Restore the original G state
		Select Case Initial_G_State
			Case 0
				Code "G0"
			Case 1
				Code "G1"
		End Select

		Select Case Initial_Spindle_State
			Case True ' Spindle is running so stop it
				If Initial_Spindle_CW_State = true Then
					DoSpinCW()
				ElseIf Initial_Spindle_CCW_State = true Then
					DoSpinCCW()
				End If
		End Select

		' Restore the original Tool Offset state
		Select Case Initial_Tool_Offset_State
			Case True
				DoOEMButton(136)
		End Select

		' Restore original  Machine Coordinates State
		Select Case Initial_Machine_Coordinates_State
			Case True
				DoOEMButton(179)
		End Select

		Call SetOEMDRO(59, XScale)
		Call SetOEMDRO(60, YScale)
		Call SetOEMDRO(61, ZScale)
	Else
		'  Houston we have a problem
		Answer = MsgBox("Guage Height Block is grounded, check connections and try again", 0, "Oh-oh")
	End If
Else
	Answer = MsgBox("Probe is not defined in" & Chr(13) & Chr(13) & """Config->Ports and Pins->Input Signals""" & Chr(13) & Chr(13) & Chr(9) & "configure and try again.", 0, "Oh-oh")
End If
Reply With Quote

Sponsored Links
  #511   Ban this user!
Old 04-18-2012, 12:38 AM
 
Join Date: Oct 2008
Location: USA
Posts: 508
Bob La Londe is on a distinguished road

Thanks for the great tutorial. I had got basic probing figured out and working already, but your little tutorial, and the Blue Screen set with the auto center finding works great. I have some jigs I made with keys on the back for consistent mounting and recessed registers on the front for locating center for mounting certain types of things. I was able to find center easily enough with a wiggler on my slower spindles, but I was wasting tons of time with the faster spindles because I had to use the notebook paper and precision rod method. Can't spin a wiggler very fast or it comes apart. LOL.

Thansk for taking the time to put it together.
__________________
Bob La Londe ~ Owner of two and a quarter G540s.
www.YumaBassMan.com
Reply With Quote

  #512   Ban this user!
Old 05-22-2012, 06:19 AM
 
Join Date: May 2012
Location: uk
Posts: 1
chlluk is on a distinguished road

Hi
A great article, i am having a few problems with the edge finding utility.
Firstly i find that using my chinese 5 axis breakout board on pin 15 i tend to get logic drift, that is i can get the input port to show a connection on the mach blu screen fine but when the testing has stopped the test light can stay on until i make contact again , this appears to rectify the condition. i have a capaictor in place on the board down to the ground. i wonder wether a resistor is needed to crow bar it down and stop it drifting. not sure what causes this condition , wonderdered if the opto isolators used on the board contribute to this. Also i think the magority of users this side of the pond are now metric and the 2" travel turns out to be 2mm for us, any way to cahnge this.
Clive
Reply With Quote

  #513   Ban this user!
Old 05-22-2012, 09:41 AM
 
Join Date: Sep 2005
Location: USA
Posts: 178
Vogavt is on a distinguished road
Touch Probe as Homing and Limit Switches

Anyone thought about using this routine for an easy setup for homing and limit switches?

I would think that it would be much more accurate and repeatable than any mechanical switch setup. Especially if using the two-touch routine at each reference point.

Wouldn't it also eliminate any issues with water/coolant intrusion within the switches?

Just a thought, but maybe I'm missing something. (I've been known to do that).

Vogavt
Reply With Quote

  #514   Ban this user!
Old 05-23-2012, 09:52 PM
 
Join Date: Oct 2011
Location: Canada
Posts: 6
arudson is on a distinguished road
Screen Image

Hi. I was very happy to stumbe upon this post and I am eager to try this out.

I downloaded and ran the file as indicated and put the MacBlue_ProgramRun.jpg in the correct subdirectory. When I run Mach and load MachBlue my screen is not proportioned properly – it looks exactly like what James had in XYZ Probe modification.

I have chcked my resolution and it’s 1024 x 768 and I don’t have any previous versions of this file – I only have the BlueProbeVer3.zip version that is referenced in the posts.



Any help would be appreciated.


I played with this a bit longer - an now I get



I've tried this every which way and can't get it right.

Any help would be appreciated.

Alan Rudson.

Last edited by arudson; 05-23-2012 at 11:20 PM. Reason: adding more info
Reply With Quote

  #515   Ban this user!
Old 05-24-2012, 10:21 AM
 
Join Date: Sep 2005
Location: USA
Posts: 178
Vogavt is on a distinguished road
Lightbulb

Have you toggled the Hi-Res Screens or Auto-Screen Enlarge checkboxes under Config | General Config?
Attached Thumbnails
Click image for larger version

Name:	Screen Control.JPG‎
Views:	8
Size:	6.1 KB
ID:	160361  
Reply With Quote

Sponsored Links
  #516   Ban this user!
Old 05-24-2012, 08:05 PM
 
Join Date: Oct 2011
Location: Canada
Posts: 6
arudson is on a distinguished road
Got it

I tried the sequence about a dozen more times and finally it was right. I don't know what I was doing wrong but it's all good now.

Alan Rudson.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 6 (0 members and 6 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PATRIOT Y AXIS MODIFICATION smallblock Shopmaster/Shoptask 4 10-02-2008 08:04 AM
Super Probe 17 Functions in one probe thegimpster PIC Programing / Design 0 01-25-2008 12:46 PM
4 X 10 table modification impax PlasmaCam 6 01-15-2008 08:04 PM
Y Axis modification Mike F Syil Products 6 11-12-2007 04:23 PM
New MCG's need modification Swede Servo Motors and Drives 3 01-12-2005 08:46 AM




All times are GMT -5. The time now is 03:12 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361