Hello Guest it is June 21, 2025, 05:05:34 PM

Recent Posts

Pages: 1 2 3 4 5 6 7 8 9 10
1
General Mach Discussion / Some help needed.
« Last post by Michaelc on June 21, 2025, 10:05:58 AM »
Hi, I am using one of the cheap Chinese breakout boards for my lathe cnc convention. In the video it shows that you need to download the driver and input into the root directory of Mach3. Ok I did that. On start up mach3 asks which plug in I am using, so I tick the one I want. However the stepper motors will not move using mach3 turn. They will turn if I start mach3 mill. What have I done wrong, and how can I correct this. Thanks
2
VB and the development of wizards / Re: macro help to reference machine
« Last post by birillo1959 on June 20, 2025, 02:57:54 PM »
ok TPS i tried it and it seems to work fine
i changed:
SetParam ("ZRefPer",5) 'set Z refspeed to 5%
to
SetParam ("ZRefPer",3) 'set Z refspeed to 5%
to lower the speed and it seems to work
thanks again for the help offered
regards
3
I made a new screenset that is much more like the mill. The turn gui sucked.
4
VB and the development of wizards / Re: macro help to reference machine
« Last post by TPS on June 20, 2025, 01:27:54 PM »
something like this, not tested just written down:

Code: [Select]
' === Macro Mach3 per Referenziare la Macchina CNC ===
' Esegue homing su X, Y e Z e azzera le coordinate macchina

' Homing Asse Z (di solito prima per sicurezza)
SetParam ("ZRefPer",40) 'set Z refspeed to 40%
Sleep 200
DoButton(24) 'Ref Z-axis fast

While IsMoving()
Sleep(100)
Wend

Code "G53 Z-2"  'move off switch 2mm
While IsMoving()
Sleep(100)
Wend

SetParam ("ZRefPer",5) 'set Z refspeed to 5%
DoButton(24) 'Ref Z-axis slow

While IsMoving()
Sleep(100)
Wend
SetParam ("ZRefPer",100)
Sleep 200

' Homing Asse Y
SetParam ("YRefPer",40) 'set Y refspeed to 40%
Sleep 200
DoButton(23) 'Ref Y-axis fast

While IsMoving()
Sleep(100)
Wend

Code "G53 Y2"  'move off switch 2mm
While IsMoving()
Sleep(100)
Wend

SetParam ("YRefPer",5) 'set Y refspeed to 5%
DoButton(23) 'Ref Y-axis slow

While IsMoving()
Sleep(100)
Wend
SetParam ("YRefPer",100)
Sleep 200

' Homing Asse X
SetParam ("XRefPer",40) 'set X refspeed to 40%
Sleep 200
DoButton(22) 'Ref X-axis fast

While IsMoving()
Sleep(100)
Wend

Code "G53 X2"  'move off switch 2mm
While IsMoving()
Sleep(100)
Wend

SetParam ("XRefPer",5) 'set X refspeed to 5%
DoButton(22) 'Ref Z-axis slow

While IsMoving()
Sleep(100)
Wend
SetParam ("XRefPer",100)
Sleep 200


' Homing Asse A
SetParam ("ARefPer",40) 'set A refspeed to 40%
Sleep 200
DoButton(25) 'Ref A-axis fast

While IsMoving()
Sleep(100)
Wend

Code "G53 A2"  'move off switch 2mm
While IsMoving()
Sleep(100)
Wend

SetParam ("ARefPer",5) 'set A refspeed to 5%
DoButton(25) 'Ref A-axis slow

While IsMoving()
Sleep(100)
Wend
SetParam ("ARefPer",100)
Sleep 200

' Imposta le coordinate macchina a zero (opzionale)
'DoOEMButton(1008) ' Azzera X
'DoOEMButton(1009) ' Azzera Y
'DoOEMButton(1010) ' Azzera Z

MsgBox "Homing completato con successo!"
5
Show"N"Tell ( Your Machines) / Re: The Laser Project.
« Last post by ART on June 20, 2025, 09:06:19 AM »
Nice!

Art
6
Show"N"Tell ( Your Machines) / Re: The Laser Project.
« Last post by Tweakie.CNC on June 20, 2025, 05:54:04 AM »
As this thread still gets a lot of views I thought I would post a little update on the CO2 laser project after some 15 years down the line. I am now on my 5th laser tube and although I have not kept a record of the total hours, each had a (perhaps optimistic) life expectancy of 10,000 hours. Replacing the RECI tubes (which cost around £200 to £300 each) together with alignment, flushing and replacing coolant takes about half a day and could perhaps be considered quite a costly process. All my mirrors and lenses were sourced from II-VI (Coherent) and although initially expensive none have had to be replaced over the years so buying quality sure beats buying cheap optics.
Everything had been running exactly as expected until last week when the coolant circulating pump failed. Well, it did not exactly fail it just started drawing excess current from the 12V supply. An exact replacement was readily available from an online supplier, having UK stock, which was quickly fitted and the CO2 laser was back up and running as usual. The original coolant circulating pump, of Chinese origin, certainly performed sterling service for a great many hours over the years so +1 for its design and quality of manufacture.

Technology marches on and in 2023, for experimental purposes, I purchased a couple of UV laser multi-diode heads (of Chinese origin) at less than £100 each. These heads contain 4 x 5W diodes with precise optics to align each of the 0.08mm x 0.02mm focussed beams, stacked one above the other, to produce a focussed squarcle <0.08mm x 0.08mm. The heads are extremely easy to fit to any existing CNC machine and are way cheap enough to be considered consumables. Unfortunately their operational wavelength is unsuitable for cutting clear acrylic but, so far, I have found that they are ideal for working with wood and anodized aluminium for which I have a current requirement.
Just for fun I have been experimenting with raster engraving 3D optical illusions and although not yet perfect I am improving my technique and thought you may like to see an early example.

Tweakie.
7
VB and the development of wizards / macro help to reference machine
« Last post by birillo1959 on June 20, 2025, 05:24:55 AM »
macro help to reference machine

Good morning I have this macro generated with ChatGPT to reference the machine and it works well I ask if it could be
modified in two touches (the first fast the second slow to be precise) with AI I can't modify it, it's not in my
capacities / skills I ask if someone can help me to modify it or if there is a macro already made.
I thank those who can help me.

' === Macro Mach3 per Referenziare la Macchina CNC ===
' Esegue homing su X, Y e Z e azzera le coordinate macchina

' Homing Asse Z (di solito prima per sicurezza)
DoButton(22)

While IsMoving()
    Sleep(100)
Wend

' Homing Asse Y
DoButton(23)

While IsMoving()
    Sleep(100)
Wend

' Homing Asse X
DoButton(24)

While IsMoving()
    Sleep(100)
Wend

' Homing Asse A
DoButton(25)

While IsMoving()
    Sleep(100)
Wend
' Imposta le coordinate macchina a zero (opzionale)
'DoOEMButton(1008) ' Azzera X
'DoOEMButton(1009) ' Azzera Y
'DoOEMButton(1010) ' Azzera Z

MsgBox "Homing completato con successo!"

   
8
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by Tecmaqcnc on June 20, 2025, 03:13:00 AM »
Hi, the problem was that the machine was using a very old version of Mach3. I'm going to install a new version of Mach3 so I can use it.

The current version of the machine has an ATC, so the operator can manually select the tool number they want to use. How can I configure this?

Another problem I have when using the new version of Mach3 is that the axes move very slowly, at low speeds. How can I increase the speed?
9
Finished Screens / Re: Mach3 DarkScreen Screenset - Now Available
« Last post by manivelle on June 19, 2025, 07:39:14 AM »
Hi Folks,
I made some adaptations to the screenset to replaces macros that are missing.
https://www.machsupport.com/forum/index.php?topic=49298.msg302897#msg302897
10
Code: [Select]
' M1004
' SET TOOL SETTER Z OFFSET Macro with workaround concerning G31 limitations on chinese controlers
' Base code written by Big-Tex May 25 2010
' Mod David Marmilloud 03/2025 version 2025-0325.1 to work woith "DarkScreen DPD MM 23 03 27"
' https://www.machsupport.com/forum/index.php?topic=41912.60

InitialFeed = GetOemDRO(818) 'get the Initial feedrate to return to later
InitialAbsInc = GetOemLED(48) 'Get the Initial G90/G91 state
InitialAbsX = GetOEMDRO(83) 'Get the Initial MACHINE X position
InitialAbsY = GetOEMDRO(84) 'Get the Initial MACHINE Y position
InitialAbsZ = GetOEMDRO(85) 'Get the Initial MACHINE Z position
InitialWorkZ = GetOEMDRO(180) 'Get the Initial WORK Z position

Main

Sub Main()
'//////// Unit dependent parameters
If GetOEMLED(801) Then 'if unit is imperial (inches)
FirstProbeFeed = 8 'Approach Probe Feed Speed
SecondProbeFeed = 1 'Slow Probe Feed Speed
ProbeDepth = 10 'probing Depth
Res = 0.001 'set the measurement resolution
Else 'if unit is metric
FirstProbeFeed = 200.0 'Approach Probe Feed Speed
SecondProbeFeed = 30.0 'Slow Probe Feed Speed
ProbeDepth = 190 'Probing Depth
Res = 0.01 'set the measurement resolution
End If

'//////// Error Condition checking code
If GetOEMLED(16) Then 'Checks for machine coordinates
DoOEMButton(256) 'toggle to program coordinates
End If

If GetOEMLED(825)<>0 Then 'check probe first see if it is grounded
Code "(Probe Grounded, check connection and try again)" 'Status Bar display
End 'ERROR! exit the macro
End if

If GetOEMLED(807) or GetOEMLED(808) or GetOEMLED(809) Then 'Check all axes have been referenced
Code "(Ref all axis prior to Zero Z)" 'Status Bar display
End 'ERROR! exit the macro
End If

'//////// Get Tool measurement positions
ToolSensorXPos = GetOEMDRO(1006) 'Get Tool probe X position
ToolSensorYPos = GetOEMDRO(1007) 'Get Tool probe Y position

ToolNumber = GetOEMDRO(824) 'get tool number

'//////// Move to probe position
Code "G90 G0 G53 Z" & getOEMDRO(54) 'Move to Safe Z
Code "G90 G0 G53 X" & ToolSensorXPos & "Y" & ToolSensorYPos 'Move to Tool sensor position

'//////// Probing, first using G31, then refining with iterative method
Code "G4 P1" 'pause 1 seconds to give time to position probe plate
Code "F" & FirstProbeFeed 'First approach feedrate using G31
Code "(Probing)"
Code "G91 G31 Z-" & ProbeDepth 'probe move to probedepth - First travel
While IsMoving() 'wait for probe move to finish
Wend
Code "(1st touch)"

Code "F" & SecondProbeFeed 'set slow feedrate

ProbedZABS = GetZ(Res*10) 'Probing up to Low signal as Low res
ProbedZABS = GetZ(-Res) 'Probing down to High signal at High Res

If ToolNumber <> 0 Then 'if not ref tool
MachMsg("Tool number should be #0" & Chr(13) & Chr(10) & "Please set the ref tool and restart the procedure", "WARNING", 0)
RestoreInit 'restore initial conditions
Exit sub
Else 'if tool is ref tool
Call setOEMDRO(1008, ProbedZABS)'write sensed ABS position to Tool Setter Z offset
Code "G4 P.25" 'pause for Dro to update.
Code "(Ref tool is set ans stored on Settings Screen - Tool Setter coordinates Z)"
End If

RestoreInit 'restore initial conditions

End Sub

Function GetZ(ResStep) As Double
'//////// Start Probing Code, Probe In -Z direction.
'//////// The vars will be Inch or Metric from above if/else statment

PlateOffset = GetOEMDRO(1001) 'get plate offset DRO
InitialContact = GetOEMLED(825) 'get probe contact state
i=0

Code "(Refining contact by " & ResStep & " step)"
While GetOEMLED(825)=InitialContact
'as long as the limit switch is ON
Code "G91 G1 Z" & ResStep 'move one step
While IsMoving() 'wait for probe move to finish
Wend
i = i+1 'count steps
If i=30 Then 'If probe moved more than 20 steps without switching
Code "(Can't reach the sensor. ABORTED)" 'ERROR!
RestoreInit 'restore initial conditions
End 'End the program
End If
Wend 'loop

Code "(Got it)"
Code "G4 P.25" 'pause for Dro to update.
GetZ = GetOEMDRO(85) - PlateOffset 'Return new touch point in Machine coordinates

End Function

Sub RestoreInit()
'////////// restoring initial conditions
'Code "G90 G0 G53 Z" & getOEMDRO(54) 'Move to Safe Z
'Code "G90 G0 G53 X" & InitialAbsX & "Y" & InitialAbsY 'Move to initial position
Code "G90 G0 G53 Z" & InitialAbsZ 'Move to initial Z position - Be carefull before uncomment. if tool is longer than previous, you migth crash
'Code "G90 G0 Z" & InitialWorkZ 'Move to initial work Z position
While IsMoving() 'wait for probe move to finish
Wend

If InitialAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
Else
Code "G90"
End If

Call SetOEMDRO(818, InitialFeed) 'restore feed rate
End Sub
Code: [Select]
' M1004
' SET TOOL SETTER Z OFFSET Macro with workaround concerning G31 limitations on chinese controlers
' Base code written by Big-Tex May 25 2010
' Mod David Marmilloud 03/2025 version 2025-0325.1 to work woith "DarkScreen DPD MM 23 03 27"
' https://www.machsupport.com/forum/index.php?topic=41912.60

InitialFeed = GetOemDRO(818) 'get the Initial feedrate to return to later
InitialAbsInc = GetOemLED(48) 'Get the Initial G90/G91 state
InitialAbsX = GetOEMDRO(83) 'Get the Initial MACHINE X position
InitialAbsY = GetOEMDRO(84) 'Get the Initial MACHINE Y position
InitialAbsZ = GetOEMDRO(85) 'Get the Initial MACHINE Z position
InitialWorkZ = GetOEMDRO(180) 'Get the Initial WORK Z position

Main

Sub Main()
'//////// Unit dependent parameters
If GetOEMLED(801) Then 'if unit is imperial (inches)
FirstProbeFeed = 8 'Approach Probe Feed Speed
SecondProbeFeed = 1 'Slow Probe Feed Speed
ProbeDepth = 10 'probing Depth
Res = 0.001 'set the measurement resolution
Else 'if unit is metric
FirstProbeFeed = 200.0 'Approach Probe Feed Speed
SecondProbeFeed = 30.0 'Slow Probe Feed Speed
ProbeDepth = 190 'Probing Depth
Res = 0.01 'set the measurement resolution
End If

'//////// Error Condition checking code
If GetOEMLED(16) Then 'Checks for machine coordinates
DoOEMButton(256) 'toggle to program coordinates
End If

If GetOEMLED(825)<>0 Then 'check probe first see if it is grounded
Code "(Probe Grounded, check connection and try again)" 'Status Bar display
End 'ERROR! exit the macro
End if

If GetOEMLED(807) or GetOEMLED(808) or GetOEMLED(809) Then 'Check all axes have been referenced
Code "(Ref all axis prior to Zero Z)" 'Status Bar display
End 'ERROR! exit the macro
End If

'//////// Get Tool measurement positions
ToolSensorXPos = GetOEMDRO(1006) 'Get Tool probe X position
ToolSensorYPos = GetOEMDRO(1007) 'Get Tool probe Y position

ToolNumber = GetOEMDRO(824) 'get tool number

'//////// Move to probe position
Code "G90 G0 G53 Z" & getOEMDRO(54) 'Move to Safe Z
Code "G90 G0 G53 X" & ToolSensorXPos & "Y" & ToolSensorYPos 'Move to Tool sensor position

'//////// Probing, first using G31, then refining with iterative method
Code "G4 P1" 'pause 1 seconds to give time to position probe plate
Code "F" & FirstProbeFeed 'First approach feedrate using G31
Code "(Probing)"
Code "G91 G31 Z-" & ProbeDepth 'probe move to probedepth - First travel
While IsMoving() 'wait for probe move to finish
Wend
Code "(1st touch)"

Code "F" & SecondProbeFeed 'set slow feedrate

ProbedZABS = GetZ(Res*10) 'Probing up to Low signal as Low res
ProbedZABS = GetZ(-Res) 'Probing down to High signal at High Res

If ToolNumber <> 0 Then 'if not ref tool
MachMsg("Tool number should be #0" & Chr(13) & Chr(10) & "Please set the ref tool and restart the procedure", "WARNING", 0)
RestoreInit 'restore initial conditions
Exit sub
Else 'if tool is ref tool
Call setOEMDRO(1008, ProbedZABS)'write sensed ABS position to Tool Setter Z offset
Code "G4 P.25" 'pause for Dro to update.
Code "(Ref tool is set ans stored on Settings Screen - Tool Setter coordinates Z)"
End If

RestoreInit 'restore initial conditions

End Sub

Function GetZ(ResStep) As Double
'//////// Start Probing Code, Probe In -Z direction.
'//////// The vars will be Inch or Metric from above if/else statment

PlateOffset = GetOEMDRO(1001) 'get plate offset DRO
InitialContact = GetOEMLED(825) 'get probe contact state
i=0

Code "(Refining contact by " & ResStep & " step)"
While GetOEMLED(825)=InitialContact
'as long as the limit switch is ON
Code "G91 G1 Z" & ResStep 'move one step
While IsMoving() 'wait for probe move to finish
Wend
i = i+1 'count steps
If i=30 Then 'If probe moved more than 20 steps without switching
Code "(Can't reach the sensor. ABORTED)" 'ERROR!
RestoreInit 'restore initial conditions
End 'End the program
End If
Wend 'loop

Code "(Got it)"
Code "G4 P.25" 'pause for Dro to update.
GetZ = GetOEMDRO(85) - PlateOffset 'Return new touch point in Machine coordinates

End Function

Sub RestoreInit()
'////////// restoring initial conditions
'Code "G90 G0 G53 Z" & getOEMDRO(54) 'Move to Safe Z
'Code "G90 G0 G53 X" & InitialAbsX & "Y" & InitialAbsY 'Move to initial position
Code "G90 G0 G53 Z" & InitialAbsZ 'Move to initial Z position - Be carefull before uncomment. if tool is longer than previous, you migth crash
'Code "G90 G0 Z" & InitialWorkZ 'Move to initial work Z position
While IsMoving() 'wait for probe move to finish
Wend

If InitialAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
Else
Code "G90"
End If

Call SetOEMDRO(818, InitialFeed) 'restore feed rate
End Sub
Pages: 1 2 3 4 5 6 7 8 9 10