Hello Guest it is March 01, 2021, 02:22:39 PM

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

1231
VB and the development of wizards / Re: Auto corner finding problem
« on: April 30, 2018, 01:23:49 PM »
your Change is defintly nor ok.

try this:




Rem   Auto corner finding X-Y+Z-(button4) With tool diameter Input Metric Version

   Speak (" CONFERMARE RICERCA ANGOLO INFERIORE DESTRO") 'Avviso Vocale
Message "INIZIO RICERCA ANGOLO"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE RICERCA ANGOLO")

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(1000) '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-25 F100" 'Z goes down a max of 25mm at 100mm/sec
   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 Z15" 'retract Z to 15mm
   Code "G91 G0 Y3 X25"
   Code "G90 G0 Z-5"

   while IsMoving()
     sleep(10)
   Wend
   


   Code "F" &CurrentFeed 'Returns to prior feed rate
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 "F100"

Rem   Probe Left

   XNew = GetDro(0) - 75      'probe to current position - 75mm
   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 Z15"
   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-5 Y-25"
        Code "G90 G0 Z-5"

   while IsMoving()
     sleep(10)
   Wend
   

 
  Code "F" &CurrentFeed       'restore original feed rate
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 "F100"         'Slow feedrate to 100mm

Rem   Probe up

   YNew = GetDro(1) + 75      'move to current y position + 75mm
   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 Z15"
   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

1232
VB and the development of wizards / Re: Auto corner finding problem
« on: April 30, 2018, 12:02:52 PM »
then you hit the probe during Z- move

VBScripter Window step through

1233
General Mach Discussion / Re: REF All home
« on: April 27, 2018, 02:11:03 PM »
ok Sounds good so far.
first would be to get the referencing working of the single axis.
means:

press Ref Z make sure the referencing Z is working, upwards to your Limit switch
press Ref X make sure the referencing X is working
press Ref Y make sure the referencing Y is working

if we have this working, we will create a customized ref all home script

1234
MACH TOOL BOX / Re: TUBE COPING program
« on: April 27, 2018, 11:48:06 AM »
the code is running the subroutine 180 times (G98 L01 L180)


that is the reason why the orignal uses #variables to calculate values by runtime.

1235
General Mach Discussion / Re: REF All home
« on: April 27, 2018, 10:58:24 AM »
if you have Limit Switches for all axis, it should be no Problem.
maybe a Little Change in the ref all button script.

+ a Floating head connected to the probe Input for detection of material surface,
then you can "cover" all

1237
Mach4 General Discussion / Re: Mach 4 with ess surging issue
« on: April 25, 2018, 04:49:50 PM »
we are very sorry, that our Magic glas ball can not see the line 758 of your code.

1238
General Mach Discussion / Re: Mach 3 tool change problem.
« on: April 24, 2018, 04:13:16 PM »
first Change your M6End code to:

REM The default script here moves the tool back to m6start if any movement has occured during the tool change..

REM x = GetToolChangeStart( 0 )
REM y = GetToolChangeStart( 1 )
REM z = GetToolChangeStart( 2 )
REM a = GetToolChangeStart( 3 )
REM b = GetToolChangeStart( 4 )
REM c = GetToolChangeStart( 5 )
REM if(IsSafeZ() = 1) Then
REM    SafeZ = GetSafeZ()
REM    if  SafeZ  > z then StraightTraverse x, y,SafeZ, a, b, c
REM       StraightFeed  x, y,  z  , a, b, c
REM else
REM Code"G00 X" & x & "Y" & y
REM end if


normaly you set your G54 Z Zero to the top of your workpiece, and work then with neative Z values to do the Job.

in the M6Start macro you can add code to get the Z axis to a Position where you can do your tool Change.

in M6End is only code needed if your cam does not bring back the Z-axis to a Position where it is needed after toolchange,
but your example G.code does this, so only one part of Software should o this (G-code or M6End macro), never both of them.



 

1239
General Mach Discussion / Re: Mach 3 tool change problem.
« on: April 24, 2018, 01:42:05 AM »
for a first test have a look to your M6End macro, in Folder C:\Mach3\Macros\Your Profile Name.
try to comment the code out by using Rem at the start of each line.

anyway your code is sendig the z axis to 1.5814 after every toolchange.

1240
VB and the development of wizards / Re: trigonometry center
« on: April 23, 2018, 09:50:02 AM »
the macro does not swap axis, it is Rotation the X/Y plane,
so if you do a jog in X (on Keyboard) then will both axis move-

anyway the macros's are not for trigonometry Center probe, they are for probing a twisted part.