Hello Guest it is March 28, 2024, 06:54:18 AM

Author Topic: Update Tool Data using G10?  (Read 13329 times)

0 Members and 1 Guest are viewing this topic.

Re: Update Tool Data using G10?
« Reply #10 on: February 28, 2008, 04:48:11 PM »
Following up:

When I place the M1000 P(val) Q(val) in a tap, the macro ends up running during the file load. The tool table is annotated an amount equal to the Q(val) x the number of times the macro is called.

i.e. (to flog it another way) If M1000 macro occurs 4 times in the file with an offset of .005; the tool length is offset by .020 before I even run the file

I can manually re-edit the tool table after the file is loaded and before it is run.
Just wanted to put it out there that VB scripts can run during a file load and could cause some problems if you aren't looking.

Is there a way to call the macro only when the file is running using some sort of conditional syntax along the lines of; IF cycle is running THEN do magic ELSE pound sand?

Is there a signal or condition that is only true when the file runs, not loading? The start led flickers during load so nothing on the screen I can see to link to.

N1 ; run in offline mode to test
N2 ; runs M1000 macro to update tool length after grinding wheel is dressed
N3 ;
N4 M05 G40 G49 G80 G90
N5 T1 G43 H1 D1
N6 M06
N7 G00 Z0.0
N8 G01 Z-.1 F1.
N9 G00 Z0.0
N10 M1000 P1 Q.004 ;runs G10 with P(toolnum) Q(lengthoffset update)
N11 G04 P1.
N12 
N13 G01 Z-.1 F1.
N14 G00 Z0.0
N15 M1000 P1 Q.004
N16 G04 P1.
N17
N18 M30
               
"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels
Re: Update Tool Data using G10?
« Reply #11 on: February 28, 2008, 05:48:06 PM »
 :)
Re: Update Tool Data using G10?
« Reply #12 on: February 28, 2008, 07:16:23 PM »
Ahhh!!
thanks for the tip. unfortunately I'm using an out of the box version of Mach3 that ships with a Tormach mill.  It does the job within limits and does have some dedicated features that are helpful. The only thing I can jigger is the xml file. If we try to touch anything else, we get our little hands slapped. I'll hunt around and then download the full version if need be.
Thanks again.
"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Update Tool Data using G10?
« Reply #13 on: February 28, 2008, 08:06:12 PM »
That setting is in the General cofig from the Config menu, does the Tormach version not have that?
Hood
Re: Update Tool Data using G10?
« Reply #14 on: February 28, 2008, 09:48:17 PM »
OH MY GOD!!!!
WHY DIDN'T ANYONE TELL ME??? THIS IS AMBROSIA!!!
 ;D ;D ;D
 Downloaded the full copy and placed my xml  and screen set in the folder, renamed and off I go. ;D
No, Tormach doesn't allow any configuration changes. The program is locked. They used to have the password in the Mach2 xml but deleted it from the latest version. Gee, a script editor and everything just like the grownups.
Boy Howdy!
"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Update Tool Data using G10?
« Reply #15 on: February 29, 2008, 02:57:14 AM »
I suppose I can see their point in locking it, makes support for them a lot easier if they dont give you all the toys :)

Hood

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Update Tool Data using G10?
« Reply #16 on: February 29, 2008, 09:43:00 AM »
If you modify the macro, now that you can, to look like this it will only run in cycle.

' M1000.m1s

' Macro to increment tool height offset
' using M1000 P1 Q.004
' P = offset number to update
' Q = amount to alter offset by

If IsLoading() Then
  ' Do now't
Else
  P_val = Param1()
  Q_val = Param2()
  offset = GetToolParam(P_val,2)
  offset = offset + Q_val
  Code "G10 L1 P" & P_val & " Z" & offset
End If

'End

Graham.
Without engineers the world stops
Re: Update Tool Data using G10?
« Reply #17 on: February 29, 2008, 01:11:31 PM »
Thanks for the patience, maybe I'll have something to give back one of these days.

Now't ???
I have more fun with google and wikipedia I may never get my work done.
http://en.wikipedia.org/wiki/Yorkshireisms
"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Update Tool Data using G10?
« Reply #18 on: February 29, 2008, 02:26:29 PM »
Thank theur fert Yorksha link, ah finn' it reeight odd 'a' mooar fowk waint speyk uz lingoa.

Or for the non Yorkshire.

Thank you for the Yorkshire link, I find it very odd that more people do not speak my lingo.

Graham.
Without engineers the world stops
Re: Update Tool Data using G10?
« Reply #19 on: February 29, 2008, 03:13:38 PM »
OK
I run the updated code in the debugger and it stops on line 15 with a comment on the mach3 comp run screen:
P value out of range with g10 l2

although it works fine running in mach3

I'm not sure what to think. If I were trying to make a script in the future and rec'd that message I wouldn't know whether to ignore or not.

Any pointers?
Thanks
"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels