Hello Guest it is March 19, 2024, 07:51:21 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

1931
in Mach3 you can wite every avaliable Information into a file by VBscript.

Example:

   'open the file for output data
   FNum = FreeFile ' Determine next file number.
   FName = "C:\Mach3\GCode\myfile.nc"
   Open FName For Append As FNum ' Open file.
   Print #FNum, cStr(GetDro(0)) & "," & CStr(GetDro(1)) & "," & CStr(GetDro(2)) 
   Close ' Close all files.

this can be trigged  by many different way, button on Screen, Mcall in GCode or via digital Input.

i have no experiance in M4, but i think there are simular possibilitiys.

1932
and what will be the exact Trigger for the Output.

M3 isActive AND ISMoving can not be all for the Trigger.

if you Need the pulse length realy exact i would use a external timer module and only do the Trigger via Mach3 Output.

pls decribe a Little bit more what you are trying to do.

1933
General Mach Discussion / Re: Tool Table issues
« on: March 12, 2018, 03:55:03 PM »
OEMButton(316) does the tooltable save Job.

1934
General Mach Discussion / Re: Scripter Compile Error bites again :(
« on: March 12, 2018, 03:49:11 PM »
ok i turn the "i know something better" mode ON again,

v022 and i am happy with it

"i know something better" mode OFF

1935
General Mach Discussion / Re: Scripter Compile Error bites again :(
« on: March 12, 2018, 03:41:34 PM »
witch Version of Mach3 are you running?

1936
this code is for right upper Corner?

1937
maybe this

Code "G91 G0 Y-.100 X1.0"

y movement is to small, to go down with z axis

this code is for right upper Corner?

1938
i guess i mean this code aeria:

   Code "G90 G0 Z.500" 'retract Z to .500 inch
   Code "G91 G0 Y-.100 X1.0"
   Code "G90 G0 Z-.200"
   Code "F" &CurrentFeed 'Returns to prior feed rate
   While IsMoving ()
   Wend

End If

Rem   VBScript For probing In the x- direction

If GetOemLed (825)<>0 Then          'May need to use =0 if it errors
   Call ProbeGrounded()          'Check to see if the probe is already grounded or faulty
   Exit Sub
Else


and specialy here i added a while ismoving() to wait for movement finished before the checking of probe is grounded

1939
are you working in metric or imperial?

added a few while ismoving see if this helps

Code: [Select]


Rem   Auto corner finding X-Y-Z-(button3) With tool diameter Input

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
CurrentToolDiameter = GetOemDRO(43) 'gets the current tool diameter

If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' two second delay
Code "G90 G31 Z-1.0 F5" 'Z goes down a max of 1.0 at 5IPM
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2,0.000)
Code "G4 P0.25" 'Pause for Dro to update.
Code "G90 G0 Z.500" 'retract Z to .500 inch
Code "G91 G0 Y-.100 X1.0"
Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'Returns to prior feed rate
While IsMoving ()
Wend
End If

Rem VBScript For probing In the x- direction

If GetOemLed (825)<>0 Then       'May need to use =0 if it errors
Call ProbeGrounded()          'Check to see if the probe is already grounded or faulty
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4"

Rem Probe Left

XNew = GetDro(0) - 3 'probe to current position - 3 inches
Code "G31 X" &XNew
While IsMoving() 'wait for prob move to complete
Wend
XNew = GetVar(2000) 'read the touch point

Rem move back To the hit point incase there was an overshoot

Code "G90 G0 Z.500"
Code "G90 G0 X" &XNew
Code "G91 X-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
  While IsMoving ()
Wend
 
Call SetDro (0,0.000)
    Code "G4 P0.25"
    Code "G91 G0 X-.200 Y1.0"
    Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'restore original feed rate
While IsMoving ()
Wend

End If

Rem VBScript For probing In the Y- direction

If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4" 'Slow feedrate to 4 ipm

Rem Probe up

YNew = GetDro(1) - 3 'move to current y position + 3 inches
Code "G31 Y" &YNew
While IsMoving() 'wait for the move to finish
Wend
YNew = GetVar(2001) 'read the touch point

Rem move back To the hit point incase there was an overshoot

    Code "G90 G0 Z.500"
Code "G90 G0 Y" &YNew
    Code "G91 Y-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
While IsMoving ()
Wend
    Call SetDro (1,0.000)
    Code "G4 P0.25"
    Code "G90 G0 X0.0"
Code "F" &CurrentFeed 'restore original feed rate
    Code "(X, Y, and Z axis' are now zeroed)"
    Call ReturnG90G91State()
    Exit Sub
End If

Sub ProbeGrounded()
Code "(Probe plate is grounded, check connection and try again)"
Call ReturnG90G91State()
End Sub

Sub ReturnG90G91State()
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
End Sub   

 


 


 


1940
the Basic code is still the same you posted at the beginning ?

because in this code is no Z probe only:

X and Y.

make a shot description what the code should do.