Hello Guest it is July 20, 2019, 04:57:55 PM

Author Topic: Inconsistant ATC Positioning  (Read 4827 times)

0 Members and 1 Guest are viewing this topic.

Re: Inconsistant ATC Positioning
« Reply #10 on: March 07, 2017, 01:22:10 PM »
I don't have a turret to check out the movement (where's Hood when you need him ;) ) so I can't test it for you but some things to try

put a code "G90" at the beginning of the macro and see if you get the same behavior.  Eliminates some other code changing it to G91 mode.

If the error is repeatable then perhaps your steps per rev are messed up, unlikely.

If the movement is truly random then it is either mechanical, loosing steps from too great speed/acceleration or loose coupling, or electrical noise on the line.

My two cents.



Thanks RT

I finally got it to rotate through 360 degrees by changing the 'Steps per' in motor tuning set to 167. This seems to be a very odd number for the steps per but it seems to work for my turret.
A Axis is set to Angular
ROT 360 rollover is checked
Distance mode is set to Inc checked

Turret moves 360 degrees each time with command G0 A360 repeatable
Also moves 45 degrees with G0 A45  repeatable

I don't have the option on my screen to 'ref all' but I do have a homing button for my A axis
I loaded a new screen to give the added dro for the turret but I'm not sure if it is working correctly.

I'm pretty sure that there is something amiss with the homing of the tool turret, I will try and fit a new homing sensor tomorrow.

Re: Inconsistant ATC Positioning
« Reply #11 on: March 07, 2017, 02:36:22 PM »

Glad to hear it is coming along.

I am confused as to why you want distance mode set to Inc.  This means every time you issue a G0 A45 it will advance the turret 45 degrees not go to home + 45 degrees.  Some of your other gcode may override either distance mode by issuing a G90(absolute-go to dro position X) or G91(Inc-move an additional X amount)

Your macro assumes that you want to be in Abs mode so start by adding the code "G90" to your macro.  You can get fancy later and add to your macro, read and save the current mode, execute your current macro and then reset the mode back to what it was.

Let me know if I misunderstood you.
Re: Inconsistant ATC Positioning
« Reply #12 on: March 07, 2017, 06:14:41 PM »
Thanks RT, I'll set distance mode to Abs and insert G90 to the Macro as advised and give that a go.
Without the G90 I was getting random movement on the turret, lets see how this goes tomorrow.

I have attached my Macro, lets see where I add the G90

I will fit a home sensor on the turret,
Should I set the home position with tool no1 in position ??
There re two other options, 'Auto limit overrides' and 'Override Limits', which of these should be 'Checked' ?//

« Last Edit: March 07, 2017, 06:31:27 PM by Len-Tikular »
Re: Inconsistant ATC Positioning
« Reply #13 on: March 07, 2017, 06:31:14 PM »
Anywhere before this:

If GetSelectedTool = 1 Then
While IsMoving()
While IsMoving()

End If  

I would change to:

If NEWTOOL = 1 Then
  While IsMoving()
  While IsMoving()
End If  

Re: Inconsistant ATC Positioning
« Reply #14 on: March 07, 2017, 06:36:57 PM »
Thanks RT,

Is that a G90 to be included for each of the 8 tools in the macro ??
Re: Inconsistant ATC Positioning
« Reply #15 on: March 07, 2017, 06:52:40 PM »
No, not necessary.  G90 is what they call modal.  It stays that way until a G91 is issued changing the mode to incremental
Re: Inconsistant ATC Positioning
« Reply #16 on: March 08, 2017, 12:08:24 PM »
OK RT here's what I did,
Here's what I did.

I set distance mode to ABS
I checked the Rot 360 rollover box
I set A axis to angular
I placed a G90 directly after Get Selected tool =1

I homed the Z axis this was fine.
I don't have a 'Home' button for the A axis However I can home the axis by pressing the 'ref turret' button. The axis does ref to the sensor but very slowly ??? Once it hits the sensor then it backs of 1 degree.
If I move the turret and the Z axis away from the home position and then do a 'Home all' the Z axis returns to the home position set but the A axis does not move at all ???

Ok from the turret at home I then input via MDI
G0 A45 Turret moves 45 Deg
Input G0 A45 again, turret does not move
Input G0 A90 , turret moves to an additional 45 Deg
Input G0 A135, turret moves to an additional 45 Deg
And so on through to 360 Deg.

That seemed to work fine but heres the odd bit.

From the A axis home position,
Input T201 turret moves 45 Deg this seems ok
Input T301 turret moves an additional 90 Degrees, in other words it skips a tool.
Input T401 turret moves an additional 135 Degrees, now it skip 2 tools
Input T501 turret moves an additional 180 Degrees, now it skips 3 tools.

And so on....

I now set distance mode to Incremental and with each entry of G0 A45 the turret moves 45 Degrees each time, this seems correct.
I ref the turret again, now sitting at tool No1
T101 , no move
T201 moves past tool No2 then backs against it's stop, this seems good
T301 move 90 skipping a tool
T401 moves 135 skipping 2 tools
T501 moves 180 skipping 3 tools.
Clearly some wrong with my M6 macro or my setup,

I'm frazzled so I need some help.



Re: Inconsistant ATC Positioning
« Reply #17 on: March 08, 2017, 03:26:38 PM »
I'm right there with you on the frazzle meter.  I need help with Mach4 and have been chasing my tail for 2 days.

With regards to the ref all not moving your turret, did you change the ref all button code to include homing the turret as well as X and Z?  Looks like you can't change the ref all in the lathe screen set, sorry.  They must be using OEMbutton(105).  In the ports and pins inputs is your turret axis homing enabled?

Like I said I don't have a tool changer so I'm shooting in the dark here.  From your last post when you are calling the M6 macro with a T401, my understanding is that there is a maximum number of tools at 253.  Your previous code that you posted only tests for tools 1 through 8. 

Re: Inconsistant ATC Positioning
« Reply #18 on: March 09, 2017, 08:58:01 AM »
Hi RT,
The screen set was designed by another user, it may have been Hood but I'm not sure. So I don't know if the homing of the A axis was included.

I cant find in ports and pins where to select the homing option ???

My macro should only be testing for 8 tools ?? Did I post the wrong one ?

Re: Inconsistant ATC Positioning
« Reply #19 on: March 09, 2017, 06:24:24 PM »
Ports and Pins->input signals
A Home enabled would be a green check mark
Just like you did for x and z axis.