Hello Guest it is March 29, 2024, 02:16:23 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

271
General Mach Discussion / Re: Bit depth zeroing tool help
« on: February 12, 2022, 06:37:24 AM »
reading all your Threads/questions this manual:

https://www.machsupport.com/wp-content/uploads/2013/02/Mach3Mill_Install_Config.pdf

would be a good choice to start with.

272
General Mach Discussion / Re: controlled stepped z axis down
« on: February 12, 2022, 06:27:13 AM »
for your first question about jogging. if you use the standard screen set you can press the TAB key and you will see
a "virtual" MPG. there you can select continious and step mode and select step distance as well. by playing around a
bit you will figure out how to handle this.

the second question about toolchange. this is depending on wat you have selected in Config -> General Config ->
Toolchange. the options Ignore - Stop Spindle and wait for Start - Auto tool Change are selfexplaining.

If you have selected Stop Spindle and wait for Start the M6Start macro will be excecuted if a M6 comes up in your
G-Code and the M6End afte you pressed the Start Button.

within these two macros you can do some actions/movements via VB script.

273
smoe years ago i did something simular for G43 should be easy to modify this

Code: [Select]
' ---------------------------------------------------------------------------------
' TPS 02/2018
' macro to open GCode file and comment out all G43
' ---------------------------------------------------------------------------------
Sub Main()
On Error GoTo errhandler

'get the source file
Dim Filename As String
Dim Dialog1

    Set Dialog1 = CreateObject("MSComDlg.CommonDialog")
    Dialog1.MaxFileSize = 256
    Dialog1.Filter = "GCode Files (*.tap)|*.tap"
    Dialog1.FilterIndex = 1
    Dialog1.DialogTitle = "select GCode file"
    Dialog1.InitDir = GetUserLabel(200)
    Dialog1.CancelError = True
    'get the last selection
    Dialog1.FileName = ""
    save = false
    If save = true Then
        Dialog1.DefaultExt = def
        Dialog1.Flags = &H800 + &H4
        discard = Dialog1.ShowSave()
    Else
        Dialog1.Flags = &H1000 + &H4 + &H800
        discard = Dialog1.ShowOpen()
    End If

FileName = Dialog1.FileName
If Len(FileName) = 0 Then
message "no source file selected"
Exit Sub
End If
'store last selection
SetUserLabel(200,CurDir)

'find the last "\" in filename
For i = 1 To Len(FileName)
If Mid(FileName,i,1) = "\" Then
last = i
End If
Next i

'extract filename
myfilename = Mid(FileName,last+1,Len(FileName)-last)

'get the destination folder
Dim destfile As String

    Dialog1.DialogTitle = "select destination folder and filename"
    'get the last selection
    Dialog1.FileName = GetUserLabel(201) + "\" + myfilename
    Dialog1.InitDir = GetUserLabel(201)

    save = true
    If save = true Then
        Dialog1.DefaultExt = def
        Dialog1.Flags = &H800 + &H4
        discard = Dialog1.ShowSave()
    Else
        Dialog1.Flags = &H1000 + &H4 + &H800
        discard = Dialog1.ShowOpen()
    End If

destfile = Dialog1.FileName

If Len(destfile) = 0 Then
message "no destination file selected"
  Exit Sub
End If
  'store last selection
SetUserLabel(201,CurDir)

'open input file
FNumInput    = FreeFile 'Determine next file number.
Open FileName For Input As FNumInput

'open output file
FNumOutput = FreeFile 'Determine next file number.
Open "C:\Mach3\GCode\import.txt" For Output As FNumOutput

actions = 0
'go through To whole file
Do While Not EOF(FNumInput)
Line Input #FNumInput, FileData ' Read a line of data.
If ((InStr(FileData,"G43") <> 0) And (Left(FileData,1) <> "(")) Then
Print #FNumOutput, "( " + FileData + " )"
actions = actions + 1
Else
Print #FNumOutput, FileData
End If
Loop


Close ' Close all open files.
message CStr(actions) + " G43 have been found"
DoOEMButton(169) 'close Mach3 files just in case
SourceFile = "C:\Mach3\GCode\import.txt"

FileCopy SourceFile, destfile ' Copy source to target.
Kill SourceFile
LoadFile( destfile)
Exit Sub
errhandler:
message "user cancel"
End Sub




274
VB and the development of wizards / Re: error G31 Probing Arrays
« on: February 04, 2022, 02:11:05 AM »
this script will not probe a outside of a part.

may this:

https://www.youtube.com/watch?v=CsXjI1998ik
http://www.craftycnc.com/probe-it-wizard-mach3/

is what you are looking for.

275
General Mach Discussion / Re: Rotator switch for Jog increments
« on: February 04, 2022, 01:26:40 AM »
if i look to this manual:

https://www.cnc4pc.com/pub/media/productattachments/files/c10r11.3_user_manual_ver.2.pdf

there is one jumper to set pin 2-9 as inputs and if you use 5V for the inputs the jumper need's to
set to Pull down and then the inputs must be Low active.

but if you have used pin 2/3/4/5 for step/dir sinals you can not use 7/8/9 for inputs.

276
General Mach Discussion / Re: Rotator switch for Jog increments
« on: February 04, 2022, 01:15:26 AM »
to use the system hotkey's is an other way to do this, but you should only use one.
the macro version or the system hotkey version.

the rest looks ok for me, but i can nothing say about your input setting's it is depending on your
hardware connection. maybe they have to be low active, but it dont know.

277
General Mach Discussion / Re: Rotator switch for Jog increments
« on: February 03, 2022, 06:26:58 AM »
ok let's make an example

0,01 input is assigned to OEMTrigger(10)
0,10 input is assigned to OEMTrigger(11)
1,00 input is assigned to OEMTrigger(12)

and these three stepp are confgured in Config -> General Config -> Jog Increments

then you create in macros\your profile name a textfile named M300.M1S
then open this file with texteditor and put this code in:

Code: [Select]
SetTRiggerMacro(301)

now go to Config -> General Config -> Initialisazio String and enter M300  at the end of the existing.

then you create in macros\your profile name a textfile named M301.M1S
then open this file with texteditor and put this code in:

Code: [Select]
Sub Main()

  If IsActive (OEMTRIG10) Then
    dooembutton (191)
  End If

  If IsActive (OEMTRIG11) Then
    dooembutton (192)
  End If

  If IsActive (OEMTRIG12) Then
    dooembutton (193)
  End If

End Sub

save the file and restart Mach, and with a little bit of luck it will work.

If M300.M1s and M301.M1s is allready there chose any free number.



278
VB and the development of wizards / Re: error G31 Probing Arrays
« on: February 02, 2022, 07:19:10 AM »
as mentoined earlier: no ideas what it will/should do

279
VB and the development of wizards / Re: error G31 Probing Arrays
« on: February 02, 2022, 02:38:51 AM »
var 121 and 122 are nowhere calculated

280
VB and the development of wizards / Re: error G31 Probing Arrays
« on: February 01, 2022, 12:12:47 PM »
this code has to in M1299.M1s in your macro folder:
Code: [Select]
' G31 Polar Array Calibration Macro V1.00
Xpos= getdro(0)
Ypos= getdro(1)
Pspeed= Question (" Probe Feed Rate")
Rleg= Question ("Input Max Leg Length")
Linc= Question ("Input leg Separation Angle")
SafZ= Question ("Input SafeZ Height")
Phgt= Question ("Input Safe Probe Height")
Spnt= Question ("Input start point in DEG, zero is x axis 3oclock")
Tdeg= Question ("Input Total Arc Width of Array in DEGs")
Nrep= (Tdeg / Linc)

Setvar (100 , Xpos)
Setvar (101 , Ypos)
Setvar (102 , Rleg)
Setvar (104 , Linc)
Setvar (108 , Nrep)
Setvar (109 , Pspeed)
Setvar (110 , SafZ)
Setvar (111 , Phgt)
Setvar (103 , Spnt)
Code " F#109"

End



and this is the GCode you have to run (it will call M1299)
Code: [Select]



o0001 (G31 Interior Polar Array V1.01)

   M1299
   M40
%
  G90   
  #106 = [#100 + #102 * COS[#103]]
  #107 = [#101 + #102 * SIN[#103]]
  g0 Z#110
  g0 X#100 Y#101
  G1 Z#111
  G31 X #106 Y #107
  G4 P1 
  G0 X#100 Y#101

M98 P1 L#122
G1 Z [#111+121]

M41
M30
%

o0001 (SUB1)
  M98 P2 L#108
  G0 Z#110
  m99

o0002 (SUB2)
  #105=[#103+#104]
  #106 = [#100 + #102 * COS[#105]]
 #107 = [#101 + #102 * SIN[#105]]
 G90
 G31 X #106 Y #107
 G4 P1
 G0 X#100 Y#101
 #103 = #105
 m99
%

bbut i have no ideas what it will/should do.