Hello Guest it is June 13, 2024, 01:59:22 PM

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 - boydage

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 »
1
Don't you just need to incorporate another tool offset for the drill holder?  You would just put a known diameter rod in the chuck and touch it off in the same way.

Touchoff I can do with a axis setter sitting in a jig I made in the chuck, and a G31 move. Its the offsets and clearances for 0deg and 90deg tools all set on the same saddle.

I was hoping someone here would confirm this. So I now have a 4 tool rotating turret pointing at the chuck in the X. In addition, on the same saddle I now have two holders at 90deg pointing in the Z direction. I expect its a basic tool setup but the clearances is something I will be holding my hand over the estop. Like how on earth am I not going to crash this machine, not once, lots. Hmmm - we all know the feeling its just how long ago we felt it. Me? It will be tomorrow.

In addition. I managed to write a M6 toolchange that works with my machine. But now I need to add in two more lines for these two tools so the tool is changed, and the correct offset is set. No idea how to do that? Below is the portion of my M6 if anyone is keen to take a look? Not sure where to start although ChatGpt helps a lot. And BTW I am using Mach 3 Turn. I do have a copy of Mach 4 on my router, but would prefer to keep the machines with their own controllers.

'If NewTool= 1 Then
           '   ActivateSignal(OUTPUT4) 'Begin rotating turret'
          '    If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
          '    DeActivateSignal(OUTPUT4) 'Stop turret from spinning"
          '    Sleep(1000)
          '    ActivateSignal (OUTPUT8) 'Reverse Turret"
          '    If IsActive(INPUT2) Then 'Tool locked signal'
          '    DeactivateSignal(OUTPUT8)
             
          '    Exit Sub
             
'If NewTool= 2 Then
             ' ActivateSignal(OUTPUT5) 'Begin rotating turret'
             ' If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
             ' DeActivateSignal(OUTPUT5) 'Stop turret from spinning"
            '  Sleep(1000)
            '  ActivateSignal (OUTPUT8) 'Reverse Turret"
            '  If IsActive(INPUT2) Then 'Tool locked signal'
            '  DeactivateSignal(OUTPUT8)
             
            '  Exit Sub
             
'If NewTool= 3 Then
          '    ActivateSignal(OUTPUT6) 'Begin rotating turret'
          '    If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
          '    DeActivateSignal(OUTPUT6) 'Stop turret from spinning"
          '    Sleep(1000)
          '    ActivateSignal (OUTPUT8) 'Reverse Turret"
          '    If IsActive(INPUT2) Then 'Tool locked signal'
            '  DeactivateSignal(OUTPUT8)
             
             ' Exit Sub               

                                       
'If NewTool= 4 Then
            '  ActivateSignal(OUTPUT7) 'Begin rotating turret'
            '  If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
            '  DeActivateSignal(OUTPUT7) 'Stop turret from spinning"
            '  Sleep(1000)
            '  ActivateSignal (OUTPUT8) 'Reverse Turret"
            ' If IsActive(INPUT2) Then 'Tool locked signal'
            '  DeactivateSignal(OUTPUT8)
             
             ' Exit Sub 

2
Many years experience with a router. Only just enough with a converted lathe. The lathe I installed a 1.5kw VFD driven motor, made a new saddle and added HG rails to the mix with some closed loop steppers. I bought a 4 tool square turret. Very rarely I need to use it for timber turning up decorative house parts that might consist of a 140mm ball so needed a huge amount of X travel for a long tool.

It took a while to get the 4 tool turret to change both with programming and electrical connections. But it works and does the job. The saddle retracts right back to about 10mm before the homing switch before the turret rotates to position.

I am using the tool table offsets and have used a Z tool setter in a jig in my chuck with a G31 move to touch off each tool in the X direction.

Ok. What I didn't setup was any way to drill. And, I now have a part to make in the 100s that needs to be drilled, and a taper honed out. I have a large amount of X saddle and travel. I am going to manufacture a gang tooling setup to sit on the saddle in front of the turret.

I thought I could add some tool-change lines into my tool-change macro which is based on the sensor outputs for the turret. And add in the offsets into the tool table. Was unsure how to set clearances as they will be different to the turret. After reading a bunch of posts I am asking if this is the correct way to set my machine up? I have read people are using G52 offsets, new to me.

With this information in hand. How would I best setup this gang tooling turret lathe to operate? Asking now whilst I am in the machine design stage where to begin in the place of getting it wrong a bunch of times and coming here with a QBL. (quivering bottom lip) because it either does not work or more likely my machine has crashed. Thanks in advance.

3
Mach4 General Discussion / Mach 4 Stop Cycle creates madness?
« on: January 29, 2024, 01:17:19 PM »
Im about 18 months into upgrading Mach 3 to 4 with an ESS. If I try to stop a cycle mid operation, the machine wont just halt what it is doing, it will lose position. Mostly noticeable in my Z axis, I will see it jerk and move about 5mm. I found a checkbox that I cant remember exactly what it was, something like "stop" was planned or something.

Regardless that did not fix my problem. I had this issue with another totally unrelated machine that if the e stop was hit it would haze out the PLC and the issue was an earth.

But this one, I tried to stop a cycle yesterday and it actually caused the part to be ruined. So here I am. Anyone have an idea or had this one happen?

Also - whilst I am in the mood. Do you guys shield and earth your stepper motor power conductors?

4
Mach4 General Discussion / Writing macro would someone please show light
« on: November 07, 2023, 01:18:34 PM »
Mach 4. I need to write a couple of simple macros to turn outputs on and off, a bit of a sleep time, with an input to boot. I have seen two types of code, one of them I know works fine I have put the script on a button after adding in some additional lines. But this one I came across and would be keen to know what its for, what it means as it has a hParam section which I do not understand.

So this is the one I am asking about:

function m162_setOutput(number)
   local Osig = mc.OSIG_OUTPUT0
   Osig = (Osig + number)
   local hReg = mc.mcSignalGetHandle(mc.mcGetInstance(), Osig)
   if( hReg ~= nil ) then
      mc.mcSignalSetState(hReg, true) --Turn the output on
   end
end

function m162(hParam) --The param is a P value called from Gcode. M162P3 for example.
   if (hParam ~= nil) then
      local inst = mc.mcGetInstance()
      local varP = 0
      local flagP, rc = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_P)
      if (flagP == 1) then --Check that the flag has been set so we do not get an unexpected value for mc.SV_P
         varP = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_P)
         m162_setOutput(varP)
      end
   end
end

if (mc.mcInEditor() == 1) then
    m162_setOutput(1)
end

And this is the one I would normally use:


----------Variables----------
local inst = mc.mcGetInstance() --Get the instance of Mach4
local brake = mc.OSIG_OUTPUT1 --Save the name of the Signal (as stored inside of Mach4)
local ActivateSignalTime = 5000 --Time in milliseconds that we want the signal to be active.
local hReg = 0 --The handle to the signal
local rc = 0

hSig, rc = mc.mcSignalGetHandle(inst, brake)
if (rc ~= 0) then --There was error   
   mc.mcCntlSetLastError(inst, "There was an error")
else
   rc = mc.mcSignalSetState(hSig, 1) --Turn the output on
   if (rc ~= 0) then --There was error   
      mc.mcCntlSetLastError(inst, "There was an error")
   else
      wx.wxMilliSleep(ActivateSignalTime) --Sleep for the commanded time (so that the output stays on as long as we want).
      rc = mc.mcSignalSetState(hSig, 0) --Turn the output off
      if (rc ~= 0) then --There was error   
         mc.mcCntlSetLastError(inst, "There was an error")
      end
   end
end

I need to write a brake on/off M10/M11 macro set which is the reason for this. Like I said I have managed to get the multiple outputs into a button script. If its a Macro do I need to do anything much differently except for name it and put it into the Macros folder? Btw I use ChatGpt and managed to write (with a lot of back and forth) a turret change for my lathe in Mach 3

5
General Mach Discussion / Couple offset questions Mach 3 Turn
« on: October 19, 2023, 06:58:59 PM »
I cant quite understand a couple of things. Mach 3 Turn.

4 post auto turret and the tool offsets appear to work but when I do a manual MDI toolchange the offsets dont appear to change in the DROs but I trust it works and it has been. I dont like just "trusting" something that only appears to work during an operation but it is what it is.

Today after homing the machine, I machined a part to gage accuracy. It ended up 0.1mm dia too small. So I jogged the tool to 0.1 and zeroed the DRO for the X axis. I restarted Mach, clicked "save offsets or fixture" And then restarted Mach 3. The X DRO did not come back at zero but with an offset like 28.0950 or something. I have no idea why? This was when using the mastertool. Is this a user error or a setting or?

I did wonder if I should have done a toolchange even though the tool was correct. Its disappointing when we being to mistrust our gear what should I do?

Really hope someone responds because this is a massive time waster. Please? Thanks in advance.

6
General Mach Discussion / Re: Machj 3 Turn Tool Offset Questions
« on: September 09, 2023, 04:36:15 PM »
Haha dont all jump in at once I only have so much time to read lol. Never mind I worked it out mostly but it would have been nice to know the background of it all.

7
General Mach Discussion / Machj 3 Turn Tool Offset Questions
« on: September 01, 2023, 03:14:47 AM »
Hoping someone can put some clarification into this for me please:

1) If I set my tool 1 as a master do I need to call it a master somewhere or is tool 1 always the master?

2) Ok so I have set my master tool to zero on a surface. Next is to bring tools 2,3,4 up to the same surface, the X for example, and hit the touch X button. I have a 4 tool turret. When I change from tool #1 to tool #3 (example) I am setting the offset for. Do I change by T0301 or do I change it T0303 and then zero it. Found this a tad confusing.

3) Diameter mode. I use Fusion 360. Threading. This is a Fusion setting which asks for the thread depth. Do I set it to depth diameter or half being radius?

4) Setting the Z on a LH tool no problem. But if I am setting a LH tool up I am unable to touch the part on the X like the RH tool. Would I bring it up level with the X surface I touched off on?

5) Same for a grooving or cutoff tool. Which side of the tool do I touch off with? Ive seen both ways on youtube. Do I set the chuck edge or the forward edge?

Thanks in advance.

8
Im pretty stoked, I actually worked that out myself. Thats huge because not long ago I would have had no idea. Ok. Done with VB now. Done with Mach 3 locking up and freezing whilst I am working with the script editor. It works and now I am going to use my little cnc lathe to do a lot better than I can hand spinning a wheel. My next mission is to get LUA sussed for Mach 4.

Yesterday I cut a piece of 20mmm mild steel into a part with a M16 thread that wound the nut on in a way I would have been happy if it was a real part. I have a piece that took me over half a day to manufacture by hand that I need to make a lot more of. It has a LH and a RH M18 x 1mm thread on each end. It simulates at completion in 4 minutes.

Tell you what though, I am most certainly not a lathe machinist and the Fusion default cutting speeds and feeds are really aggressive. Although not aggressive enough to break the chips when turning 6061 I had a huge straight coil of swarf peel off the machine winding out into my workshop. Never seen that before, super dangerous I reckon. Perhaps I need to change the style of turning.

Probably not the correct forum but I now need to look into the best inserts to use to avoid this or minimilise it anyway.

Ok. Well. Now I understand what was wrong with my code. Pretty happy to get it working and thanks to all. This is what its all about huh?


9
Hmmm. Its not updating the new tool to the old tool. Must study more I thought that was the easy part.

10
Now I understand what was wrong with my code. Hey, so, I managed to get my turret to operate. Pretty stoked it worked right off the bat for a new coder. Although I didnt want to spend too much time on VB I also have a router with Mach 4 so LUA is my focus. Cool.

My M6Start Macro is attached. It is specific to my machine in the fact I have very little outputs and have used up all inputs. So this macro is only going to work with hardware configuration like mine. Also, be very selective when you purchase your SSRs as they need to work with low voltages directly off a BOB. The wiring diagram is in this forum post. The turret is a LD6B Chinese one. Does the job.

But can someone help me finish this please I am not sure what to do I think its now my post that needs to be edited. I have seen something about options for Turret, QCTP on front, QCTP on rear with options to change but I don't know exactly what I am editing. Currently, instead of a tool change, my machine pauses with "CHANGE TO T3 ON REAR TOOL POST". I need to hit the cycle button and then it will change tools. There is a line in my machining file that does this - how do I edit my post so it removes that line. Its line N14.

Really hoping someone can hop in and help. Also, is my macro ok or do I need to look at more safety locks? I will always home the machine on startup and always have tooling set correct prior to a job. Second question is I have a 4 post turret. Many more tools that will number 1-4 with several with the same tool number but different offsets. Wondering how I program into the tool library tool #1 for example with offset #6 for example. Ie T0106 - that must be in Fusion 360.

Anyways. Sample code attached.

Macro Below
Sub Main()
    OldTool = GetCurrentTool() 'Sets old tool variable
    NewTool = GetSelectedTool() 'Sets the new tool variable
    MaxToolNum = 4 'Max tools on the turret

    If MaxToolNum < 1 Or MaxToolNum > 4 Then
        Message "Incorrect Tool Selected"
    ElseIf OldTool = NewTool Then
        ' No toolchange required, exit sub
        Exit Sub
    End If

'If GetOEMLED(87) Or GetOEMLED(809) Then
    'Message "Machine not homed Dork"
    'Code "M30"
'End If

   
   
    If NewTool = OldTool Then
    Message "No Change"
    End If

    Code "G53 F1800 X-10" 'Move to change position
    While IsMoving() 'Wait for movement to complete
    Wend



  ' Tool Change Time
   
   
   If NewTool = 1 Then
      ActivateSignal(OUTPUT3) 'Open Tool #1 Relay for selection input to BOB
      Sleep(500)
      ActivateSignal(OUTPUT7) 'Begin rotating turret'
      While Not IsActive(INPUT2) 'Turret is rotating until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT7) 'Stop turret from spinning
      Sleep(100)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      Sleep(1400)
      DeactivateSignal(OUTPUT3)
      DeactivateSignal(OUTPUT8)
   
     
    ElseIf NewTool = 2 Then
      ActivateSignal(OUTPUT4) 'Open Tool #1 Relay for selection input to BOB
      Sleep(500)
      ActivateSignal(OUTPUT7) 'Begin rotating turret'
      While Not IsActive(INPUT2) 'Turret is rotating until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT7) 'Stop turret from spinning
      Sleep(100)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      Sleep(1400)
      DeactivateSignal(OUTPUT4)
      DeactivateSignal(OUTPUT8)
     
     
     ElseIf NewTool = 3 Then
      ActivateSignal(OUTPUT5) 'Open Tool #1 Relay for selection input to BOB
      Sleep(500)
      ActivateSignal(OUTPUT7) 'Begin rotating turret'
      While Not IsActive(INPUT2) 'Turret is rotating until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT7) 'Stop turret from spinning
      Sleep(100)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      Sleep(1400)
      DeactivateSignal(OUTPUT5)
      DeactivateSignal(OUTPUT8)
     
     
    ElseIf NewTool = 4 Then
      ActivateSignal(OUTPUT6) 'Open Tool #1 Relay for selection input to BOB
      Sleep(500)
      ActivateSignal(OUTPUT7) 'Begin rotating turret'
      While Not IsActive(INPUT2) 'Turret is rotating until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT7) 'Stop turret from spinning
      Sleep(100)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      Sleep(1400)
      DeactivateSignal(OUTPUT6)
      DeactivateSignal(OUTPUT8)
 

      SetCurrentTool(NewTool) 'Set the new tool to current
    End If
End Sub                     

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 »