Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: allanjs on November 13, 2006, 11:57:16 PM

Title: parts/cycle counter
Post by: allanjs on November 13, 2006, 11:57:16 PM
Hi all,

Is there a parts or cycle counter DRO ?
I sure can't find it if there is although I may
be looking for the wrong terminology.
Thanks in advance for the help.

Al
Title: Re: parts/cycle counter
Post by: Brian Barker on November 14, 2006, 07:22:53 PM
Nope, not at this time...
Title: Re: parts/cycle counter
Post by: Graham Waterworth on November 15, 2006, 02:59:29 AM
Why not put a user dro on the screen, then write an M10.m1s macro, M10 is normally used for part counters.

(M10.m1s macro)
count=getuserdro(nnnn)
count=count+1
setuserdro(nnnn,count)   

nnnn is a user dro number of your choice.

Graham.
Title: Re: parts/cycle counter
Post by: allanjs on November 15, 2006, 11:24:34 PM
Thanks Graham,
I have tried this but it's not working.
Using screen4, I defined a DRO as OEM code 1000.
As I understand 1000 to 1254 are for user Dro's.
I edited the suggested macro code (nnnn) to (1000) and saved it as M10.m1s in the Mach3 macros folder.
I tried a few other things like calling it a OemDro but it made no difference.
Any other suggestions ? Or do you see what I may be doing wrong ?

Thanks
Al

Title: Re: parts/cycle counter
Post by: Scott on November 16, 2006, 12:30:20 AM
Al,  I don't know if this will help you any, but there's another DRO that is set for 1000 already.  The "Edge Finder Diameter" DRO on the Offsets page.  I found some troubles with a touch off plate that had a thickness DRO set for 1000 and entering a value in one would change the other.

Just a thought.
Title: Re: parts/cycle counter
Post by: allanjs on November 16, 2006, 08:00:41 PM
Thanks Scott,

That made me think a bit more and I came up with the answer.
There was already a macro called M10.m1s so I renamed it M12.m1s
as I don't use M12 for any thing. All I do is insert M12 at the end
of my programs just before M30.

Here is my final code that works.  ;D

Rem M12.m1s macro
count=getuserdro(1200)
count=count+1
setuserdro(1200,count) 

Thanks
Al
Title: Re: parts/cycle counter
Post by: Graham Waterworth on November 17, 2006, 04:04:26 AM
Great, you got it working.

Graham.