. .
Page 2 of 3 FirstFirst 123 LastLast

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Centroid Acorn

    I have one that i am currently installing on a CNC plasma Cutter. So far it look good it supports most g codes and looks like it might be a great alternative to Mach 3. I have used both Mach 3 and Linux based CNC controls with mixed results. Mach 3 is very old technology and so far the amount time required to get a Linux, or Kflop control to work is just not worth it.

    I benched the Acorn getting three motors work in less than 2 hours. I will post some pictures and a link to a running machine n about two weeks.

    I also use Siemens for my larger machine build projects. For a home or small shop application the Acorn looks like a great option.

  2. Ha- no money if you can't sell a screen set :-)
    I may try one on the lathe
    Maybe il wait until a few more are running well in the uk

  3. #3
    Quote Originally Posted by m_c View Post
    I'll just put this here for now, but it's a work in progress. I need to go and do something, but will try and get it finished later.
    Original code-
    Code:
    ;=============================================================================
                               MainStage
    ;=============================================================================
    ;Do gather if commanded (uncomment and recompile for debugging purposes)
    ;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
    ;IF Aux11KeyPD  THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
    ;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)
    
    IF TRUE THEN CurrentTurretPosition_W = 0
    IF ToolBit1 && ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 1
    IF !ToolBit1 && ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 2
    IF !ToolBit1 && !ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 3
    IF ToolBit1 && !ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 4
    IF ToolBit1 && !ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 5
    IF !ToolBit1 && !ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 6
    IF !ToolBit1 && ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 7
    IF ToolBit1 && ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 8
    IF TRUE THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W
    
    IF SV_PROGRAM_RUNNING THEN (ProgramRunning)
    
    ;cnctch.mac
    IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
    IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
    IF M6 THEN (M6PD), SET DoingTurretIndex_M
    IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER
    
    IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
      THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M, 
      RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete
    
    IF DoingTurretIndex_M && RequestedLocation_W != CurrentTurretPosition_W THEN SET TurretMotor
    IF RequestedLocation_W == CurrentTurretPosition_W THEN SET TurretTimer
    IF TurretTimer THEN RST TurretMotor, SET ReversingTimer, RST TurretTimer
    IF ReversingTimer THEN RST ReversingTimer, SET ToolChangeComplete
    
    IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W
    
    IF !M6 THEN RST ToolChangeComplete, RST TurretTimer
    
    
    IF SV_STOP THEN RST TurretMotor, RST TurretTimer, RST ReversingTimer, RST M6

    Code in the process of being modified
    Code:
    ;=============================================================================
                               MainStage
    ;=============================================================================
    ;Do gather if commanded (uncomment and recompile for debugging purposes)
    ;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
    ;IF Aux11KeyPD  THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
    ;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)
    
    IF SV_PROGRAM_RUNNING THEN (ProgramRunning)
    
    ;cnctch.mac
    IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
    IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
    IF M6 THEN (M6PD), SET DoingTurretIndex_M
    IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER
    
    IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
      THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M, 
      RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete
    
    ;code to calculate distance to move
    If CurrentTurretPosition_W > RequestedLocations_W THEN DistanceToMove = ... (need to handle roll over)
    ;code to rotate A-axis require distance
    ;code to reverse A-axis
    IF TRUE THEN SET ToolChangeComplete
    
    
    IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W
    
    IF !M6 THEN RST ToolChangeComplete, RST TurretTimer
    
    
    IF SV_STOP THEN RST TurretMotor, RST TurretTimer, RST ReversingTimer, RST M6
    RequestedLocation_W
    CurrentTurretPosition_W

    Chaz, to save me looking it up, just to confirm, it's an 8-position turret (45 deg between tools)?
    And does normal rotation increase or decrease tool position?
    Yes 45. Can't remember in terms of numbers. I'll need to look tomorrow. Unless you can see from the vid I linked? It's the same turret.

  4. #4
    Just looked at a pic. It looks like the numbers decend.
    Last edited by Chaz; 18-02-2018 at 11:05 PM.

  5. #5
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 2 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,927. Received thanks 361 times, giving thanks to others 8 times.
    Code:
    ;=============================================================================
                               MainStage
    ;=============================================================================
    ;Do gather if commanded (uncomment and recompile for debugging purposes)
    ;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
    ;IF Aux11KeyPD  THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
    ;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)
    
    IF SV_PROGRAM_RUNNING THEN (ProgramRunning)
    
    ;cnctch.mac
    IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
    IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
    IF M6 THEN (M6PD), SET DoingTurretIndex_M
    IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER
    
    IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
      THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M, 
      RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete
    
    ;code to calculate distance to move
    IF CurrentTurretPosition_W > RequestedLocation_W THEN PositionsToMove_W = CurrentToolPosition_W - RequestedLocation_W
    IF CurrentTurretPosition_W < RequestedLocation_W THEN PositionsToMove_W = (CurrentTurretPosition_W + 8) - RequestedLocation_W ;this assumes the PLC can handle ELSE..
    IF TRUE THEN DistanceToMove_W = PositionsToMove_W * 45 ; This may need a further multiplication if we're not going to be moving in degrees (does this need extra movement to overshoot new position before reversing?)
    ;code to rotate A-axis require distance
    
    ;code to reverse A-axis
    
    IF TRUE THEN SET ToolChangeComplete
    
    
    IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W
    
    IF !M6 THEN RST ToolChangeComplete, RST TurretTimer
    This is the barebones of what should be needed I think.
    It still needs the required code to actually move the A-axis.
    Also see the notes I've added.
    Having scanned through the manual, I can't see how, or even if, you can move an axis via the PLC.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  6. #6
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 2 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,927. Received thanks 361 times, giving thanks to others 8 times.
    I've just realised, what you need to achieve may have to be via a combination of Macro and PLC.
    The macro allows you to run normal G-codes, but I'm not sure if you can run calculations in a Macro.

    What you may need to do, is run the Macro, which then moves to the PLC to calculate the rotation required, which is then stored in a variable the macro can access. The macro then carries out the required A axis movement.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  7. #7
    Quote Originally Posted by m_c View Post
    I've just realised, what you need to achieve may have to be via a combination of Macro and PLC.
    The macro allows you to run normal G-codes, but I'm not sure if you can run calculations in a Macro.

    What you may need to do, is run the Macro, which then moves to the PLC to calculate the rotation required, which is then stored in a variable the macro can access. The macro then carries out the required A axis movement.
    Yep. I thought the same after your previous message.

    I'm hoping to get some answers on the Centroid forum too.

  8. #8
    So some response from the Centroid forum. Explained the logic to him. It looks like I need to buy the software to get access to the M107 command needed for the BCD Tool Changer Output. Happy to buy it but need to know I can get it to work.

  9. #9
    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

  10. #10
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 2 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,927. Received thanks 361 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.

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


Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 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
  •