Hello Guest it is April 26, 2019, 12:35:57 AM

Author Topic: Rotary axis zeroing problem  (Read 11525 times)

0 Members and 1 Guest are viewing this topic.

Re: Rotary axis zeroing problem
« Reply #20 on: February 15, 2010, 05:34:52 PM »
What I expect is that whatever move I make, the result in the DROs is the commanded position.  Uli

I understand what you are expecting... but for whatever reason, Mach is evidently not coded to accomidate us in this respect.
It would be nice if it would read 0.0 , don't see any reason why it shouldn't, maybe it could go on the "ToDo" list. 
Thanks for bringing it to light though, now we all know how to work around it.
 :)

Offline RICH

*
  • *
  •  7,313 7,313
    • View Profile
Re: Rotary axis zeroing problem
« Reply #21 on: February 15, 2010, 06:00:13 PM »
Uli,
Glad you posted. This is a good discussion. I sometimes only wish that there was a one place stop to grasp all the things associated with using the rotary axis. In fact i started a write up about it but got side tracked in the last few weeks. So anything posted  is of value for me no matter what it is.
 
RICH

Offline Hood

*
  •  25,785 25,785
  • Carnoustie, Scotland
    • View Profile
Re: Rotary axis zeroing problem
« Reply #22 on: February 15, 2010, 07:05:21 PM »
As said previously I think this feature is meant to be used with Rot Roll Over but I can see it would be handy if not in that mode.

Anyway just been farting about with this, was thinking the macro to do the zero button would be fine if you were actually wanting it to zero but say you wanted it to do a short rotational move to A10 from the A3600 it wouldnt be so easy.
Anyway heres what I came up with, probably a simpler method as I always do things weird.
Ok so first thing would be to command a G0A10, that would move the axis to A3610 then call your user macro which would have something like this

Old = GetOemDRO(803)
Wanted = (Old Mod 360)
Call SetOemDRO(803,Wanted)

That would then set the DRO to 10,

same if you wanted for instance to  end up at A265, , you would command a G0A265 and the axis would move to A3505 then call the macro and the DRO would read 265.

Hood
« Last Edit: February 15, 2010, 07:11:36 PM by Hood »

Offline alenz

*
  •  137 137
    • View Profile
Re: Rotary axis zeroing problem
« Reply #23 on: February 17, 2010, 04:46:20 AM »
There appears to be another bug in the rotary axis that bit me. The following code drills 4 holes 90 deg apart and works as expected one time but one time only. Hit cycle start the second time and it goes bonkers. On line N110 it goes backwards a full revolution but worse yet the Z travels down concurrently. NOT GOOD. This was with Rot 360 rollover and Ang Short Rot on G0 both checked but other combinations do the same thing. Exiting and restarting Mach is the only way I know to get back to normal.  I did discover that adding line N25 G92 A0 will cause it to work every time but that shouldn't be required. (But it might be a clue).

N10 G00 Z.050
N20 G00 X0 Y0
(N25 G92 A0)
N30 #1 = 0
N40 M98 P10 L4
N50 G00 Z.25
N60 G80
N70 M30

O10
N80 #1 = [#1 + 90]
N90 G00 A#1
N100 G01 F20
N110 G81 Z-0.25 A#1 R.025
N120 M99
%

 I would be curious to see if this can be repeated on someone else’s machine. It is repeatable on 2 PC’s here.
Thanks, Al

Offline Tweakie.CNC

*
  • *
  •  7,720 7,720
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Rotary axis zeroing problem
« Reply #24 on: February 17, 2010, 05:15:36 AM »
Hi Al,

Just tried your code and same thing - works fine first run only. (It seems that it wants to rewind the A axis back to zero but very slowly on the second run).

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: Rotary axis zeroing problem
« Reply #25 on: February 17, 2010, 07:12:15 AM »
Hi Al and Tweakie,
  Just curious, why is the A#1 in line N110 ?
I put (A#1) instead and all seems well.
Otherwise, it does the same here. Looks like an interpolated move...Z-0.25 A#1.
Russ

Offline Tweakie.CNC

*
  • *
  •  7,720 7,720
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Rotary axis zeroing problem
« Reply #26 on: February 17, 2010, 07:46:48 AM »
Looks like you have solved the mystery Russ.  :)

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline alenz

*
  •  137 137
    • View Profile
Re: Rotary axis zeroing problem
« Reply #27 on: February 17, 2010, 05:55:42 PM »
Thanks Russ and Tweakie, my bad. Sometimes the longer I look at the obvious the less likely I am to see it :(. There was no reason for an A word in that line, (although  I still don’t see why it did what it did since it was already at that position).
Thanks again,
Al