. .
Page 7 of 7 FirstFirst ... 567
  1. #61
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 3 Weeks Ago Has been a member for 9-10 years. Has a total post count of 1,600. Received thanks 110 times, giving thanks to others 69 times.
    So a response from the Centroid Forum, Ill try this tomorrow.

    http://centroidcncforum.com/viewtopi...4&p=9586#p9586

    Because your turret is uni-directional, you will need to calculate the "rolled over position"
    and command a move to that position. Once there, you will need to change the machine position
    to reflect the turret position.

    You don't nee the M107 for this since the tool number is the axis machine position. M107 is to send the tool number to the PLC

    For the example(s) below:

    Start cnctch.mac with a header for comments etc..

    ;------------------------------------------------------------------------------
    ; Filename: cnctch.mac
    ; Description: Axis driven tool change macro for lathe
    ; Notes: Turns/rev must be configured 1 = 1 turret position change
    ; Turret is on 3rd axis, positions are in machine position.
    ; Requires: Machine home must be set prior to use.
    ;
    #100 = 12 ;Number turret positions
    #101 = 1 ;Distance to move from current location to requested location.
    #4120 = requested tool
    #20601-#20604 = Counts per unit for axes1-4
    parameter 6 = 1 for atc


    ;------------------------------------------------------------------------------

    follow with a block that skips if graphing or searching
    IF #50001 ;Prevent lookahead from parsing past here
    IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

    If not searching or graphing, check to make sure the turret is not already
    at the requested position. If it is, skip the macro
    IF [ABS[#4120-#5023] < .002] THEN GOTO 1000

    ; Notes: Turns/rev must be configured 1 = 1 turret position change
    ; Turret is on 3rd axis, positions are in machine position.
    ; Requires: Machine home must be set prior to use.
    ;
    #100 = 12 ;Number turret positions
    #101 = 1 ;Requested position
    #20601-#20604 = Counts per unit for axes1-4

    Example 1
    ie.. Max position = 12. Sitting on 8, requested 3 Assuming direction always counts up when moving from tool to tool.

    ;If current machine position of turret is > requested position:
    ;subtract current position from max 12 - 8 = 4, then add the requested position 3, then add max position 12:
    IF #5023 > #4120 THEN #101 = [[#100 - #5023] +[ #4120 + #100]

    ;Above to get to 3 from 8, you need to command a move to 19. 7 positions greater than current position.
    G53 A19

    ;You may need a short move to go past this position and then reverse back to lock

    ;Once at requested position and locked, reset position for DRO display and prevent position windup
    ;Set current machine position to requested position
    M26 /A L[#4120*#20603]

    Example2
    ie.. Max position = 12. Sitting on 8, requested 11 Assuming direction always counts up when moving from tool to tool.

    ;If current machine position of turret is < requested position:
    ;simply command a move to requested position
    G53 A#4120

    ;You may need a short move to go past this position and then reverse back to lock

    ;Once at requested position and locked, reset position for DRO display and prevent position windup
    ;Set current machine position to requested position
    M26 /A L[#4120*#20603]

    N1000 ;Macro finished

  2. #62
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 3 Days Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,908. Received thanks 360 times, giving thanks to others 8 times.
    So that answers the question if calculations can be done in macros.

    That does look very like Fanuc programming, but as they don't seem to mention that anywhere in their blurb, I'm going to guess it's they're own version of it. (Fanuc let's you access machine variables via variable numbers within G-code, so you can do things like adjust g-code depending on machine status, or adjust tool offsets via G-code if you're using a tool checker/setter during runs).
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  3. The Following User Says Thank You to m_c For This Useful Post:


  4. #63
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 3 Weeks Ago Has been a member for 9-10 years. Has a total post count of 1,600. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by m_c View Post
    So that answers the question if calculations can be done in macros.

    That does look very like Fanuc programming, but as they don't seem to mention that anywhere in their blurb, I'm going to guess it's they're own version of it. (Fanuc let's you access machine variables via variable numbers within G-code, so you can do things like adjust g-code depending on machine status, or adjust tool offsets via G-code if you're using a tool checker/setter during runs).
    Yep it looks like these 'variables' are available to use if you know how they match. No PLC code needed from what I can see.

    Ill try this tomorrow and test / feedback.

  5. #64
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 3 Weeks Ago Has been a member for 9-10 years. Has a total post count of 1,600. Received thanks 110 times, giving thanks to others 69 times.
    So the code kinda works but the logic is wrong for my turret. Ill update it and see if it works.

  6. #65
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 3 Days Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,908. Received thanks 360 times, giving thanks to others 8 times.
    Managed to get it working yet?
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  7. #66
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 3 Weeks Ago Has been a member for 9-10 years. Has a total post count of 1,600. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by m_c View Post
    Managed to get it working yet?
    Hope. Ended up in A&E with a chest infection / virus. Will need to wait a few days before I can venture into the cold garage. I think I have the code sorted now however.

  8. #67
    Really good to see this, Ive been looking at the Acorn for the last couple days for my new Boxford, I should have the board etc sometime next week, Mine has a very similar atc to the one Chaz is using so I really apprciate the work you guys have done here. Hopefully i'll be able toprovide some input when Ive got it hooked up.


    On a side note
    After doing a bit of research into the required specs of the PC the Lenovo M92z ticks all the boxes the i3 is just over the single thread 1500 passmark and the i5 plenty over. Can be picked up for a lot less than a new hd touchscreen. Also seem like they have a normal motherboard inside so cpu/ram can be upgraded.

    https://www.cnet.com/products/lenovo...-series/specs/

    hope you get well soon Chaz
    Last edited by Benja; 01-09-2018 at 05:41 PM.

  9. #68
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 3 Weeks Ago Has been a member for 9-10 years. Has a total post count of 1,600. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by Benja View Post
    Really good to see this, Ive been looking at the Acorn for the last couple days for my new Boxford, I should have the board etc sometime next week, Mine has a very similar atc to the one Chaz is using so I really apprciate the work you guys have done here. Hopefully i'll be able toprovide some input when Ive got it hooked up.


    On a side note
    After doing a bit of research into the required specs of the PC the Lenovo M92z ticks all the boxes the i3 is just over the single thread 1500 passmark and the i5 plenty over. Can be picked up for a lot less than a new hd touchscreen. Also seem like they have a normal motherboard inside so cpu/ram can be upgraded.

    https://www.cnet.com/products/lenovo...-series/specs/

    hope you get well soon Chaz
    Thanks, that was Feb :-)

    Shout if you need any help.

  10. #69
    Lol I was wondering why it was cold in the workshop! :) did you get it working? Im about to buy my board from the French supplier, i think it works out about the same roughly maybe a few quid more in fact but i'll have it quicker!

  11. #70
    I bought one about 3 week ago from Denmark 3 days from order it was here, but have not had chance to set it up yet, hoping to get into it next week.

    Phill

Page 7 of 7 FirstFirst ... 567

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Centroid Acorn DIY CNC controller
    By NB70 in forum Control Hardware & Systems
    Replies: 3
    Last Post: 15-11-2017, 02:14 PM
  2. Centroid Acorn CNC Controller
    By wallyblackburn in forum Gantry/Router Machines & Building
    Replies: 22
    Last Post: 29-10-2017, 12:28 PM
  3. Controller Cabinet
    By cropwell in forum Workshop & Equipment
    Replies: 2
    Last Post: 19-12-2015, 02:23 PM
  4. FOR SALE: Controller Box for sale
    By lateAtNight in forum Items For Sale
    Replies: 12
    Last Post: 04-03-2012, 10:17 AM
  5. Controller Box
    By M250cnc in forum Motor Drivers & Controllers
    Replies: 1
    Last Post: 21-11-2010, 01:34 AM

Bookmarks

Posting Permissions

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