Hello Guest it is April 16, 2024, 05:59:50 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 - speckled

Pages: 1
1
General Mach Discussion / Re: ATC Macro Help
« on: September 14, 2014, 04:27:19 AM »
I think its better suited to incremental motion, and possibly reset of dro according to input configuration if thats possible.
Don't follow you - what problem are you trying to solve? I'm not against incremental but I can't see any particular advantage - please explain.

only advantage I see is that it won't care for the missed steps driving back on the pawl.

I really cant get my head around VBscript but is it not possibble to get it to rotate 45 degrees, check pins and rotate another 45 if not correct configuration of the 3 sensors and continue to do this until the correct config is reached. then obviously reverse at the end to lock.

You're still thinking servo. When we incorporate the positional info (pins), we'll know where we are so we'll know how to get where we want. Why "hunt" for something when we know where it is?
I'm just leading towards the original way it worked, it worked really well but it was so darn slow, I'd estimate around 8-10 seconds per index, approx 1 minute per full rotation.


2
General Mach Discussion / Re: ATC Macro Help
« on: September 13, 2014, 05:45:18 AM »
I'll try and get a vid done later,

It will need to drive against the pawl as there is mechanical play in the drive train which is a worm gear, resolution 40:1 results in just under 1/8" play at the tool tip. allthough the script we have thus far indexes correctly i wouldn't be confident maching with it.


I think its better suited to incremental motion, and possibly reset of dro according to input configuration if thats possible.


I really cant get my head around VBscript but is it not possibble to get it to rotate 45 degrees, check pins and rotate another 45 if not correct configuration of the 3 sensors and continue to do this until the correct config is reached. then obviously reverse at the end to lock.

3
General Mach Discussion / Re: ATC Macro Help
« on: September 12, 2014, 05:49:40 PM »
OK - so you have a basic but working ATC - so over to you - what would you like it to do now that it doesn't do?

check inputs for a valid tool, ratchet back to the pawl, handle missed steps that will likely occur via stalling on the pawl.


4
General Mach Discussion / Re: ATC Macro Help
« on: September 12, 2014, 11:40:07 AM »
right on the button sterling, G91 was in effect,

works as should now, indexes to each position

5
General Mach Discussion / Re: ATC Macro Help
« on: September 12, 2014, 08:09:22 AM »

1) set your steps/per in motor tuning so that a command of 360 turns it exactly 1 rotation.
2) Manually set your turret so that it's positioned on tool 1 (we'll come back to this later)
3) Stick the code below in your M6Start macro
4) Make sure you have 360 rollover selected (I think you said you have already).
5) In your code you were using negative rotation values - you may want to swap your DIR pin for A in ports and pins so that you can use positive numbers.

Code: [Select]
selectedTool = getSelectedTool()
currentTool = getCurrentTool()

code "G1 A" & (selectedTool - 1) * 45
While isMoving()
  sleep 10
Wend

SetCurrentTool selectedTool

This should select the appropriate tool after an M6T..... command.

It will rotate at whatever the current feedrate is and is NOT finished yet - I just want to know if I'm on the right track (I'm working blind here remember).

If this does more or less what you want we can ook at locking, auto homing and error handling next.


appreciated sterling,

tried/tested the above, on first tool call it will rotate to the called for tool, subsequent tool calls will rotate equvilent indexes to (tool number -1)

so say you call m06t0303 it will move to tool 3, but then if you was then to call m06t0404 it will rotate to tool 6, 3 positions (t4 -1)

Dave


6
General Mach Discussion / Re: ATC Macro Help
« on: September 11, 2014, 03:34:30 PM »
the turret will rotate under tool call (m6t101) ect but does not stop on the input pin configurations.

Because you've told the stepper to move 64 degrees - and that's what it will do. You're effectively trying to use a closed loop servo system to control an open loop stepper with incidental and "after the fact" positional feedback.

Ok, so is there a command i'm missing to rotate A until it reaches the the required inputs?

could this be achieved by doing a do-loop of 8 degrees (G91 G0 A-8) until the required inputs are met or is there a better method?

Dave

7
General Mach Discussion / Re: ATC Macro Help
« on: September 11, 2014, 05:38:57 AM »
I've tried using that macro somebody wrote for the Denford with a standard dc motor controlling the turret but with a couple of alterations to run the stepper as A-axis (angular with 360 rollover) and sleep delays reduced as the stepper moves considerably quicker than the old DC motor.

the turret will rotate under tool call (m6t101) ect but does not stop on the input pin configurations.

turret stepper is set up so a call of 64 degrees will equate to one full rotation of the turret (8 degrees per tool index @ 8 positions)

I cant be that far away can I?

modified code i've tried and failed:


Tool = GetSelectedTool()
OldTool = GetCurrentTool()
NewTool = Tool
MaxToolNum = 8 'Max number of tools for the changer

While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend

Call StartTool

While SelectedTool <> NewTool
Call CheckPins
sleep(20)
Wend

sleep(200) 'delay in ms to over-run selected tool position
SelectedTool = NewTool

Call StopTool

sleep(600) 'delay to allow turret to lock into position
Call CheckPins
If SelectedTool <> NewTool Then 'verify that correct tool has locked in-place. Beep, announce and stop program if not
Beep
MsgBox ("Toolchange has FAILED!!! Try adjusting the over-run delay")
code "M00"
End If

SetCurrentTool(NewTool )

'//// Subroutines ////

Sub StartTool
Code " G91 G0 A-64"
End Sub

Sub CheckPins
If Not IsActive(Input1) And Not IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 1
End If
If IsActive(Input1) And Not IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 2
End If
If IsActive(Input1) And IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 3
End If
If Not IsActive(Input1) And IsActive(Input2) And IsActive(Input3) Then
SelectedTool = 4
End If
If Not IsActive(Input1) And IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 5
End If
If IsActive(Input1) And IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 6
End If
If IsActive(Input1) And Not IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 7
End If
If Not IsActive(Input1) And Not IsActive(Input2) And Not IsActive(Input3) Then
SelectedTool = 8
End If
End Sub

Sub Stoptool
Code " G91 G0 A2"
End Sub

8
General Mach Discussion / ATC Macro Help
« on: September 10, 2014, 09:03:27 AM »
 Hi all,

 I thought someone may of done a similar ATC to me but cant seem to find much, I'm struggling to find a starting point for a Macro, I know absolutely nothing about writing a macro but had thought about integrating two macro's, one that had been written for a boxford tcl ATC, and one that had been written for a Denford starturn/orac ATC ect, thing is these look very different to me and i wouldn't know where to start tbh, or which of any parts of the macro's i would need.

 I have a denford 8 pos ATC which i'm currently controlling via jog,

its driven by worm indexing CW and then CCW to lock onto a ratchet and pawl, I currently have it driven by a stepper on the A-axis, the stepper has to make 5 rotations to drive the worm to index 1 tool position.
I have 3 positional sensors (photo-electric) which detect the 8 tool positions and feedback to the breakout like limits on input 1,2 & 3.

T1: off off off (000)
T2: off off on (001)
T3: on off on (101)
T4: on on on (111)
T5: off on on (011)
T6: off on off (010)
T7: on on off (110)
T8: on off off (100)

is it possible to get this running with a macro the way i'm setup?

possible similar macro in an old thread on deford forum here http://www.denfordata.com/bb/viewtopic.php?p=13665&sid=b93494ce7b8722ea769056c819862bc3#p1366

believe that one was running from a dc motor (24vdc/12vdc) possibly other components,

can anyone point me in the right direction please

Dave


9
Hi all,
 I'm Dave, from the uk (just a few miles north of Poppy ^)(hi Poppy small world eh?)

 Been using Mach mill for a few years now on a consumer unit (mikinimech 1610l)
 just had a crash course over the past couple of weeks into retrofitting a 1980's denford cnc lathe, a total tear down and rebuild, just kept the bed,spindle and ATC. lathe conversion is almost finished barr top half of the enclosure which will have to wait a few weeks as being fabricated by local weld shop, oh and a macro for the ATC.


Pages: 1