Hello Guest it is April 27, 2024, 06:53:03 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JohnHaine

411
General Mach Discussion / Re: Can't cut internal circles
« on: January 30, 2022, 01:39:10 PM »
Maybe your steps per unit setting in config motor tuning is wrong, at least for X and Y axes?

412
General Mach Discussion / Re: Can't cut internal circles
« on: January 30, 2022, 12:23:17 PM »
Please post the code which didn't work

413
VB and the development of wizards / Re: error G31 Probing Arrays
« on: January 29, 2022, 07:42:23 AM »
Yes, well that line tells z to move up to 3110 mm!  So it's doing what the code tells it to. Looking a few lines above maybe the 3 should be # ?

414
VB and the development of wizards / Re: Auto tool zero Help
« on: January 29, 2022, 05:41:37 AM »
That looks good! Simple and should do the job.  Only comment is that if the touch isn't detected in the 30mm the touch plate will get squashed.  A refinement is to probe down at say 50mm/min until touch, then withdraw say .5mm, then probe slowly at say 5mm/min.

When you say you copied the code into the "Auto Tool Zero" script, do you mean that you pasted it into the button script?  That should be fine, though for historical reasons my script is in a macro (M900) which is called from the button script.

415
VB and the development of wizards / Re: Auto tool zero Help
« on: January 29, 2022, 02:35:03 AM »
What horrible code! Seems to repeat itself.  Despite the comments the probe feed rate is 1mm/minute so you could be waiting a long time!
Have you checked that the digitise input is working in the diagnostics tab? Where have you put that code?

416
VB and the development of wizards / Re: Auto tool zero
« on: January 26, 2022, 11:52:20 AM »
Well for what it's worth here is my code, which I adapted from someone else's found on here.

'Tool Height Setting Macro - JLH v1.1 - 4 March 2013
'This version has a 2-phase approach, fast for speed & slow for precision.
CurrentAbsInc = GetOemLED (48) 'Copy current G90/G91 state
CurrentGMode = GetOemDRO (819) 'Copy current G0/G1 state
CurrentFeed = GetOemDRO (818) 'Copy current feedrate
Contact = 0 'Clear the contact flag
PlateThickness = 38.84 'Touch Plate thickness is set here
ProbeFeed1 = 50 'Fast probing feedrate is set here
ProbeFeed2 = 5 'Slow probing feedrate is set here
SetVar (1, -5) 'Maximum probing distance is set here
SetVar (2, 50) 'Retract height is set here
Code "M5" 'Ensures spindle is not running
Code "G21" 'Ensure metric units are used
Zs = GetOemDRO (61) 'Copy current Z-Scale DRO
Call SetOemDRO (61,1) 'Set Z-Scale DRO to 1
DoOemButton (1010) 'Zero Z-Axis DRO
Code "(Setting Tool Zero)" 'Message for status bar
While IsMoving () 'Wait until task has been completed
Wend
If GetOemLED (825) = 0 Then 'Check to see if touch plate is not already grounded
Code "G90 G31 Z #1 F" & ProbeFeed1 'Fast probing move
While IsMoving () 'Wait until task has been completed
Wend
If GetOemLED (825) = True Then 'Check to see if probe has touched plate
Contact = 1 'Set the contact flag
End If
DoOemButton (1003) 'Clear a possible feed-hold condition
ProbePos = GetVar (2002) 'Exact point probe touched
ProbePos = ProbePos + 1 'Displace probe position upwards by 1mm
Code "G0 Z" & ProbePos 'Lifts probe 1 above fast feed endpoint
While IsMoving () 'Wait until task has been completed
Wend
Code "G90 G31 Z #1 F" & ProbeFeed2 'Slow probing move
While IsMoving () 'Wait until task has been completed
Wend
If GetOemLED (825) = True Then 'Check to see if probe has touched plate
Contact = 1 'Set the contact flag
End If
ProbePos = GetVar (2002) 'Exact point probe touched
Code "G0 Z" & ProbePos 'Lifts probe to exact touch position
While IsMoving () 'Wait until task has been completed
Wend
Call SetDRO (2,PlateThickness) 'Set Z-Axis DRO to Touch Plate thickness
Code "G0 Z #2" 'Retract off Touch Plate to the set height
While IsMoving () 'Wait until task has been completed
Wend
Code "(Z-Axis is now Referenced.)" 'Message for status bar
Code "F" & CurrentFeed 'Restore feedrate to original setting
If Contact = 0 Then 'Probe reached max travel without touching
Code "(ERROR - Probe did not touch.)" 'Message for status bar
Response = MsgBox ("ERROR - Probe did not touch.",37,"Auto Tool Zero")
End If
Else
Code "(ERROR - Touch Plate is grounded.)" 'Message for status bar
Response = MsgBox ("ERROR - Touch Plate is grounded - Check connection.",16,"Auto Tool Zero")
End If
Call SetOemDRO (61,Zs) 'Restore Z-Scale DRO to original setting
If CurrentAbsInc = 0 Then 'If G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'If G0 was in effect before then return to it
Code "G0"
End If 
       

417
VB and the development of wizards / Re: Auto tool zero
« on: January 26, 2022, 05:36:56 AM »
Hmmm.  Well for several reasons I don't think the use model is very good for this.  So you have to first manually touch the setter to the end of the tool, then get it in position, hoping that the macro gives you enough time.  So the tool has to be high enough to get the setter underneath, then it moves down quite fast so you aren't waiting all day.  For an ordinary end mill that could work, but for a fine point engraving cutter you have two hazards - when you touch the plate to the point and when the point hits the plate on the probing move. 

I have an alternative macro, which is really just a copy of one I found on here, that works well and is triggered by pressing Auto Tool Zero on the Mach run screen.  My "touch plate" is an isolated spring-loaded button at a known height above the table mounted in a block with a magnet on the bottom that sticks it to the table.  The working macro is on the shop PC so I'll have to search for it but will send you a copy.  It has similarities but differences to the code you posted.  In use I jog the tool just above the centre of the button using an XBox controller, hit the Auto button, the tool moves down rather slowly until it touches, then lifts a little bit, probes down much more slowly until it touches again, sets the Z DRO to the actual setter height, and moves up to Z=50mm.

418
VB and the development of wizards / Re: Auto tool zero
« on: January 25, 2022, 05:15:00 AM »
Please could you post the script so we don't have to go and find it?

You shouldn't need to touch the plate to start!  That's to stop!

The digitise light should show if ports and pins is correct, but maybe you have the sense set wrong?  Is it set active high or low?

419
General Mach Discussion / Re: Stepper motor trouble shoot
« on: January 24, 2022, 05:15:19 AM »
It wasn't clear, do you have a PSU for each stepper?  Rather overkill.

What I meant was that this could be a symptom of the PSU(s) not being able to supply the maximum current, so when the steppers run the PSU current limit kicks in and decreases the voltage.

If you have set the stepper current as high as you suggest, and if the PSU current limit was set a bit low, this could easily happen.

What are you driving with the steppers to need such a large current at 60V?

A simple test: reduce the current settings on each driver to half or less of the value you have them set to and try again. 

Also put your meter on the 60V supply rail, set to read voltage, and look if the voltage dips.

420
General Mach Discussion / Re: Stepper motor trouble shoot
« on: January 23, 2022, 04:32:44 PM »
Check the PSU.