Hello Guest it is April 26, 2024, 07:07:32 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 - TPS

901
you can do this with a few lines in macropump macro. make sure it is enabled in General config, and you remove Output3
in spindle tab.

Code: [Select]
'turn output ON
If GetDro(2) < -0.01 Then
ActivateSignal(OUTPUT3)
End If

'turn output OFF
If GetDro(2) >= 0.0 Then
DeactivateSignal(OUTPUT3)
End If

902
General Mach Discussion / Re: Locking a Mach3 setup
« on: June 27, 2020, 03:06:11 AM »
sorry no real idea,

i run 022 on all my machines, and never had any issue

903
General Mach Discussion / Re: Locking a Mach3 setup
« on: June 26, 2020, 03:21:36 PM »
hello Dave,
witch Version?

904
German / Re: gerader Moment in Kreisfahrt auf Eigenbau CNC - Anlage
« on: June 21, 2020, 03:36:21 AM »
ich meine velocity und acceleration in den Motor Tuning Seiten der Achsen.
velocity für x und y/a gleich stellen
acceleration für x und y/a gleich stellen

ist der Zahnriemen der Y/A Achse 1:1 übersetzt?
 

905
VB and the development of wizards / Re: help with simple code
« on: June 21, 2020, 03:23:05 AM »
you do not Need the Getvar

Quote
If Param1() <> Param2() Then
   Code ("M98 P" & Param3())
End If

906
German / Re: gerader Moment in Kreisfahrt auf Eigenbau CNC - Anlage
« on: June 20, 2020, 07:20:45 AM »
Fange mal mit realen (kleinen)Fahrwerten an:
V 1000
A 400
für alle Achsen (X/Y/A)

Deine Y/A Motor scheinen dem Geräusch fürchterlich zu schwingen, welche Hardware (Motor evtl Gertriebe Controller
Spindel , Steigung , direkter Antrieb) ist hier verbaut?

Versuche erst mal die Achsen X  und Y/A alleine vernünftig ans laufen zu bekommen.

Gruß Tom

907
General Mach Discussion / Re: Mach3 print Parameters
« on: June 18, 2020, 09:27:05 AM »
have a look for Operator -> GCode Var Monitor

maybe it is what you are looking for.

908
LazyTurn / Re: Protect Mach3 Addons
« on: June 12, 2020, 06:35:36 AM »
you can save your code in different macros let's say M400.m1s then you open this macro with Operator -> VBScript Editor and do a save as and choose filetype compiled.

then you edit your Buttons and run only the macro   -> Code "M400".

then you can store your M1s files somewhere else and delete them from macro Folder.

909
ok made a different Version witch uses MsgBox instead of MachMsg

Code: [Select]
' Auto zero all axes Or just tool length

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state


'old version witch did not work *********************************************************
' Define constant for MachMsg dialog types
'MachMsgTypeYesNo = 4

' Define constant for MachMsg return codes
'MachMsgReturnYes = 6
'MachMsgReturnNo = 7

' Display a Yes or No dialog
'Ret = MachMsg("Zero Z axis only?", "Zero Z axis only or all axes", MachMsgTypeYesNo)
'****************************************************************************************


' Define constant for MsgBox dialog types
MsgBoxTypeYesNo = 4

' Define constant for MachMsg return codes
MsgBoxReturnYes = 6
MsgBoxReturnNo  = 7

' Display a Yes or No dialog
Ret = MsgBox ("Zero Z axis only?", MsgBoxTypeYesNo , "Zero Z axis only or all axes")


If Ret = MsgBoxReturnYes Then

Message "(Starting Z Zero...)"
If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Message "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If

DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" 'this 3 sec. delay to get from computer to hold probe plate in place
Code "G90 G31Z-25 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend

' Define some constants
ZaxisDRO = 2
' Set Z Axis DRO to 1.234 (plate thickness)
SetOEMDRO(ZaxisDRO, 1.234)

Sleep 200 'Pause for Dro to update
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Code "G4 P3" 'Delay to allow reading of status bar

Else
If Ret = MsgBoxReturnNo Then
Message "(Starting X-Y Corner setting...)"

Rem VB Script For probing X axis

Message "(Jog CNC near centre and 5mm inside the hole, then click OK)"
XCurrent = GetDro(0)
YCurrent = GetDro(1)
Code "G4 P3" 'this 3 sec. delay to get from computer to hold probe plate in place
Code "F100"

Rem Probe Left
XNew = XCurrent -50 'probe 50mm to left
Code "G31 X" &XNew
While IsMoving() ' wait for the move to finish
Wend
XPos1 = GetVar(2000) 'get the probe touch location
Code "G0 X" &XCurrent 'rapid move back to start point

Rem Probe Right
XNew = XCurrent +50 'probe 50mm to right
Code "G31 X" &XNew
While IsMoving()
Wend
XPos2 = GetVar(2000)
XCentre = (XPos1 + XPos2)/2 'centre is midway between XPos1 and XPos2
Code "G0 X" &XCentre ' rapid move to x centre location

Rem Probe up
YNew = YCurrent +50
Code "G31 Y" &YNew
While isMoving()
Wend
YPos1 = GetVar(2001)
Code "G0 Y" &YCurrent

Rem Probe down
YNew = YCurrent -50
Code "G31 Y" &YNew
While isMoving()
Wend
YPos2 = GetVar(2001)
YCentre = (YPos1 + YPos2)/2
Code "G0 Y" &YCentre 'rapid move to y centre location
While isMoving()
Wend

Message "(Starting Z Zero...)"
Code "G0 Z20"
Code "G0 X20Y20"

If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Message "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If

DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" 'this 3 sec. delay to get from computer to hold probe plate in place
Code "G90 G31Z-25 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend

' Define some constants
ZaxisDRO = 2
' Set Z Axis DRO to 1.234 (plate thickness)
SetOEMDRO(ZaxisDRO, 1.234)

Sleep 200 'Pause for Dro to update
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Message "(Z axis is now zeroed)" 'puts this message in the status bar

Code "F" &FeedCurrent  'restore starting feed rate
DoOEMButton (1008)
DoOEMButton (1009)
End If
End If

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



910
i have modified the code a Little bit, maybe you can test again, here the original is running.

Code: [Select]
' Auto zero all axes Or just tool length

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

' Define constant for MachMsg dialog types

MachMsgTypeYesNo = 4

' Define constant for MachMsg return codes

MachMsgReturnYes = 6
MachMsgReturnNo = 7

' Display a Yes or No dialog
Ret = MachMsg("Zero Z axis only?", "Zero Z axis only or all axes", MachMsgTypeYesNo)

If Ret = MachMsgReturnYes Then

Message "(Starting Z Zero...)"
If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Message "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If

DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" 'this 3 sec. delay to get from computer to hold probe plate in place
Code "G90 G31Z-25 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend

' Define some constants
ZaxisDRO = 2
' Set Z Axis DRO to 1.234 (plate thickness)
SetOEMDRO(ZaxisDRO, 1.234)

Sleep 200 'Pause for Dro to update
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Code "G4 P3" 'Delay to allow reading of status bar

Else
If Ret = MachMsgReturnNo Then
Message "(Starting X-Y Corner setting...)"

Rem VB Script For probing X axis

Message "(Jog CNC near centre and 5mm inside the hole, then click OK)"
XCurrent = GetDro(0)
YCurrent = GetDro(1)
Code "G4 P3" 'this 3 sec. delay to get from computer to hold probe plate in place
Code "F100"

Rem Probe Left
XNew = XCurrent -50 'probe 50mm to left
Code "G31 X" &XNew
While IsMoving() ' wait for the move to finish
Wend
XPos1 = GetVar(2000) 'get the probe touch location
Code "G0 X" &XCurrent 'rapid move back to start point

Rem Probe Right
XNew = XCurrent +50 'probe 50mm to right
Code "G31 X" &XNew
While IsMoving()
Wend
XPos2 = GetVar(2000)
XCentre = (XPos1 + XPos2)/2 'centre is midway between XPos1 and XPos2
Code "G0 X" &XCentre ' rapid move to x centre location

Rem Probe up
YNew = YCurrent +50
Code "G31 Y" &YNew
While isMoving()
Wend
YPos1 = GetVar(2001)
Code "G0 Y" &YCurrent

Rem Probe down
YNew = YCurrent -50
Code "G31 Y" &YNew
While isMoving()
Wend
YPos2 = GetVar(2001)
YCentre = (YPos1 + YPos2)/2
Code "G0 Y" &YCentre 'rapid move to y centre location
While isMoving()
Wend

Message "(Starting Z Zero...)"
Code "G0 Z20"
Code "G0 X20Y20"

If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Message "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If

DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" 'this 3 sec. delay to get from computer to hold probe plate in place
Code "G90 G31Z-25 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend

' Define some constants
ZaxisDRO = 2
' Set Z Axis DRO to 1.234 (plate thickness)
SetOEMDRO(ZaxisDRO, 1.234)

Sleep 200 'Pause for Dro to update
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Message "(Z axis is now zeroed)" 'puts this message in the status bar

Code "F" &FeedCurrent  'restore starting feed rate
DoOEMButton (1008)
DoOEMButton (1009)
End If
End If

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