Page 7 of 9 FirstFirst ... 56789 LastLast
Results 61 to 70 of 83

Thread: Bridgeport CNC Conversion...

  1. #61
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    Code changes??

    I see I need to setup a call to M843 P... Instead of G43 H....

    Would this all be done in M6Start or do i need to look at editing the post processor(hopefully not) ??

    I use Fusion360 and the posts might as well be German to me

    I guess I need to ensure G49 is in use as well to remove any other compensation??

  2. #62
    Join Date
    Jun 2007
    Location
    Anderson SC
    Posts
    1,058

    Default

    I would say it has to be changed in the post processor. That or manually edit the code, use find/replace in a text editor. M6 is the toolchange, it would be the T word that has the offset that needs to be applied. I forgot a lot of how mach works.

    I also use fusion 360, its not supposed to be too bad to edit the posts.

  3. #63
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    Yeah thought so, I spent a few hours messing today and i could not get the changes to work.

    In the output i get this typically...

    (CENTRE DRILL)
    N30 M5
    N35 M9
    N40 T3 M6
    N45 S3000 M3
    N50 G54
    N55 M7
    N65 G0 X257.962 Y109.986
    N70 G43 Z25. H3
    N80 Z5.
    N85 G98 G81 X257.962 Y109.986 Z-2. R5. F535.

    so would i be editing N70 or adding a new line to call M843 P3 somewhere ?

    I see it that i must be running in G49 all the time or bad things may happen - Z will allow for tool length AND the knee will have moved too??

    Still figuring it out.

    Once i know what output i need, i can ask the fusion guys - they were really good last time i needed to add rigid tapping to my post.

  4. #64
    Join Date
    Jun 2007
    Location
    Anderson SC
    Posts
    1,058

    Default

    I am a bit foggy on that stuff, its been too long. Before I start guessing, you might check the mach web forum (not yahoo), there might be some info there OR you could ask in the old thread. I don't want to steer you wrong.

    Basically you are correct about line 70, G43 will never be used once the knee is handling the tool length offsets, the new custom M code replaces it. (M843 substituted fot G43) You could manually edit it, otherwise the post processor has to be modified to output M843 instead of G43

  5. #65
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    Hi ok no worries, I have a monster of a thread on that forum so i can put it all there.


    Getting rid of G43 should be easy but instead of calling M843 P.. would it be easier just to embed all the knee code into M6Start - that macro knows already what tool is being called for ?

    In my code snip above, putting it in N70 would mean it was after the N45 line where it sets the speed and starts the spindle motor.

  6. #66
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    So,my M6Start macro now looks like below, the knee part in the middle is a variation of your code, I have added some variables to allow for my Height Probe (T100) so the knee moves only the difference between the height probe and the new tool.

    I need to tidy up the rest of the macro as I'm sure a lot of it does absolutely nothing of any use

    Look about right??


    Sub Main()

    If GetSelectedTool() = GetCurrentTool() Then Exit Sub ‘***Do nothing if current tool is called again

    If GetOEMLED(1866) Then Exit Sub

    ‘***Get the current G90/G91 state
    CurrentAbsInc = GetOemLED(48)

    ‘***Get Axis Scale factors in use
    XScale = GetOEMDRO(59)
    YScale = GetOEMDRO(60)
    ZScale = GetOEMDRO(61)
    AScale = GetOEMDRO(62)

    ‘***Set All Axis Scales to 1
    Call SetOEMDRO(59,1)
    Call SetOEMDRO(60,1)
    Call SetOEMDRO(61,1)
    Call SetOEMDRO(62,1)
    Sleep(250)

    ‘***Set the requested tool to be the current tool
    tool = GetSelectedTool()
    SetCurrentTool( tool )

    ‘***Switch to absolute distance mode
    Code "G90"

    ‘***Move Z axis to machine zero - fully retracted for tool change
    Code "G53 G0 Z0”
    While IsMoving()
    Sleep 100
    Wend

    '================================================= =======================================
    ' Start of Knee Positioning Code
    '================================================= =======================================

    ‘***Get the respective backlash clearance allowance for downwards knee moves
    If GetOEMLED(801) Then ‘***On = English Measure INCH
    ClearAllow = 0.125
    Else ‘***Off = Metric Measure MM
    ClearAllow = 3.0
    End If

    ‘***Get the tool length whose offset number we are to use
    ‘***Tool has already been set to current-tool above
    ToolOffsetNum = GetCurrentTool()

    ‘***Lookup the offset in the tool table, round it to 4 places, T100 is our 3d Haimer Probe
    ToolOffset = roun(GetToolParam(ToolOffsetNum, 2))
    ProbeOffset = roun(GetToolParam(100, 2))
    OffSetMove = ProbeOffset-ToolOffset

    ‘***See where the knee is now
    CurrentKneePos = roun(GetOEMDRO(181))’***Mach A Axis DRO
    'Message "CurrentKneePos=" & CurrentKneePos & " OffsetMove=" & OffsetMove ‘***Use for debugging

    ‘***If the knee is currently higher than it needs to be, we first
    ‘***move it down, to ensure the final move is always UP. This ensures
    ‘***backlash is taken out, and provides more consistent positioning.
    If (OffsetMove + CurrentKneePos) > 0 Then
    Code “G0 A“ & (0 - OffsetMove - ClearAllow)
    While IsMoving ()
    Sleep 100
    Wend
    End If

    ‘***Now move the knee to its final position
    Code “G0 A“ & (0 - OffsetMove)
    While IsMoving ()
    Sleep 100
    Wend

    '================================================= =======================================
    ' End of Knee Positioning Code
    '================================================= =======================================

    ‘***If G91 was in effect before then return to it
    If CurrentAbsInc = 0 Then
    Code "G91"
    End If

    ‘***Put previous Axis Scale factors back
    Call SetOEMDRO(59,XScale)
    Call SetOEMDRO(60,YScale)
    Call SetOEMDRO(61,ZScale)
    Call SetOEMDRO(62,AScale)
    Sleep(250)

    End Sub
    Last edited by Davek0974; 01-01-2018 at 03:29 AM.

  7. #67
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    I don't think editing the post will be needed either - i can simply set all the tools to use H0 in the tool library - IIRC H0 is the same as turning off tool comp.

  8. #68
    Join Date
    Jun 2007
    Location
    Anderson SC
    Posts
    1,058

    Default

    I forgot far too much of Mach to even comment. I used a different approach, with M843/M849 and did not modify M6. I have not idea of the merits of one way vs the other.

    I did notice in your code you have the knee as your A axis, you may want to make it something higher in case you get a 4th axis.

  9. #69
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    No worries.

    I can make it B or C easily, no difference, chances of a 4th axis slim really I think.

    I think the M6 idea will work, It works on paper at any rate.

    I just need to try it on the mill now, also need to try splitting the code into M6End as well but IIRC anything in there causes issues with my controller.

  10. #70
    Join Date
    Aug 2007
    Location
    Hertfordshire, England
    Posts
    1,376

    Default

    Setting the tool library in Fusion to zero length was a bit too risky so i edited the post to output zero regardless...

    (CENTRE DRILL)
    N2235 M5
    N2240 M9
    N2245 M1
    N2250 T3 M6
    N2255 S3000 M3
    N2260 G54
    N2265 M7
    N2275 G0 X257.962 Y109.986
    N2280 G43 Z25. H0
    N2290 Z5.
    N2295 G98 G81 X257.962 Y109.986 Z-2. R2. F535.

    I think that will be safer, i only use Fusion360 on the mill, if i use it on the high-speed fitting then tool lengths are irrelevant anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •