Hello Guest it is May 04, 2024, 01:35:08 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

1741
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.

1742
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.



 

1743
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.

1744
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.

1745
maybe you can use two spare Inputs on the Controller for MPG A/B and do the selection
via Screen Buttons ?

1746
General Mach Discussion / Re: Missing codes in auto tool changer
« on: April 23, 2018, 04:35:42 AM »
the machine will only do what in M6Start and/or M6End macro is coded.
as Long you don't Show us your code, we can only look in our magic glass ball ;)

1747
VB and the development of wizards / Re: macro tube center modification
« on: April 22, 2018, 04:39:08 AM »
SetOEMDro(1152,measuredY + GetOEMDro(1000))

somewhere after measuredY  is calculated

1748
put the code in VB Scripter Window step through a see where it Fails.

1749
here your modified code, pls test carefully because i have not tested it.
it is just minimal code without any checks like , probe allready grounded when start, or no probe was hit.

Code:
'probe z surface macro
Sub Main()
   FeedCurrent = GetOemDRO(818)   'Get the current settings, OEM DROs (818)=Feedrate DRO
   ZCurrent = GetOemDro(802)      'OEM DROs (802)=Z DRO
   GageH = GetOEMDRO(1001)         'OEMDRO(1001)=Gage Block Height
   ZNew = -300                  'probe down 300 mm

   Code "G90F200"      'slow feed rate to 200 MM/MIN
   Sleep(200)         
   Code "G31 Z" &ZNew      'probe Z- 300 mm
   While IsMoving()
      Sleep(10)
   Wend
   ZTouch = GetVar(2002)
   'Go back to point where probe was hit
   code "G0 Z" &ZTouch
   While IsMoving()
      Sleep(10)
   Wend
   
   'set new z height
   Call SetDro (2,GageH)   'DRO(2)=Z DRO

   FinalMove = GageH + 10
   Code  "G0 Z" &FinalMove
   'return old feedrate
   Code "F" &FeedCurrent   'restore starting feed rate   

End Sub   

1750

this 3 works fine...

8.-  But..  if i mix the 3 into one large script.....
the machine works erratic..


IMHO your script's have some  minor "leaks".

first read about GetVar(2000) to GetVar(2002), here are the values stored, where the the probe was hit,
because you will allways get an overrun of the axis caused by the decceleration during stop. so the usage
of  this values is elementary (for me) for precise probing.

i personaly put allways after a movement instruction caused by script (G0 / G1) a

While IsMoving()
 Sleep(10)
Wend

if you add this While IsMoving() to your code, you will see that the code will be a lot more
than you exepect.

you can also read about a Little bit here:

http://www.machsupport.com/forum/index.php/topic,36784.msg252331.html#msg252331