. .
Page 5 of 7 FirstFirst ... 34567 LastLast
  1. #41
    Thanks, been doing lots of reading too. I'm using A Axis for the turret.

    Here is my PLC Source Code.

    https://pastebin.com/SLRZQ4Re

    Some specific bits of interest seem to be:-

    ;SV_MACHINE_PARAMETER_6 is ATC on/off. 1 = ATC on, 0 = ATC off.

    ;SV_MACHINE_PARAMETER_830 = ATC Type, 0 = none. 1 = incremental, 2 = incremental w/sync,
    ; 4 = absolute 3bit, 8 = absolute 4bit, 16 = switched reverse
    ; 32 = self reversing



    ;------------------------------------------------------------------------------
    ; Memory Bit Definitions
    ;------------------------------------------------------------------------------
    AtcPresent_M IS MEM1
    AtcIsAbsolute_M IS MEM2
    AtcIsIncremental_M IS MEM3

    RotateToolTurret IS MEM329 ;&*;
    ReverseToolTurret IS MEM330 ;&*;

    I assume if I set parameter 830 to 1, the following code then applies?

    ;------------------------------------------------------------------------------
    AtcIncrementalStage
    ;------------------------------------------------------------------------------
    ;For incremental ATC's, ToolTurretPosBit1 is the tool counter and toggles each time the
    ;turret rotates to a tool position. If ToolTurretPosBit1 toggles while ReverseToolTurret is
    ;not on, then CurrentTurretPosition_W = CurrentTurretPosition_W + 1. If ToolTurretPosBit1
    ;toggles while ReverseToolTurret is on, then CurrentTurretPosition_W = CurrentTurretPosition_W -1.

    IF ToolTurretPosBit1 && RotateToolTurret && !ReverseToolTurret
    THEN CurrentTurretPosition_W = CurrentTurretPosition_W + 1

    IF ToolTurretPosBit1 && RotateToolTurret && !ReverseToolTurret
    THEN CurrentTurretPosition_W = CurrentTurretPosition_W - 1

  2. #42
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 1 Day 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.
    Looking at that, that's an example for something with an incremental toolholder (something similar to your Triac, but you only get a single pulse per tool position), however what it does show, is that you can directly manipulate the tool position number, simply by setting CurrentTurretPosition_W.

    Now you have a couple choices on how to implement the turret rotation.
    You can either create a function that only moves one position at a time, and updates the counter each time, such as this basic flow-

    while not at required position,
    rotate turret one position
    end while
    rotate turret backwards to lock.

    Function rotate turret one position
    Rotate A-axis NN degrees
    Increment turret position by one
    end function


    Or if you do it in a single function

    calculate required turret movement
    Rotate A-axis required movement
    Reverse A-axis to lock
    Update tool position

    However, looking at that code snippet, it does look like it will handle the tool position rollover automatically.
    I'd try creating a basic M6 macro that simply increments it by maybe 3 or 5 position in one swift move, and see if the tool position rolls over to where you'd expect. It may be limited to only incrementing by one (I'd hope not, but a quick bit code to test is easier, than having to re-write a whole macro if it is limited).


    If you're really stuck, post up the links to the PLC manual and I'll have a bit read later.
    From what I looked at a couple weeks ago, the PLC language does seem to be some kind of Basic/Ladder/Fanuc love child.
    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. #43
    Quote Originally Posted by m_c View Post
    Looking at that, that's an example for something with an incremental toolholder (something similar to your Triac, but you only get a single pulse per tool position), however what it does show, is that you can directly manipulate the tool position number, simply by setting CurrentTurretPosition_W.

    Now you have a couple choices on how to implement the turret rotation.
    You can either create a function that only moves one position at a time, and updates the counter each time, such as this basic flow-

    while not at required position,
    rotate turret one position
    end while
    rotate turret backwards to lock.

    Function rotate turret one position
    Rotate A-axis NN degrees
    Increment turret position by one
    end function


    Or if you do it in a single function

    calculate required turret movement
    Rotate A-axis required movement
    Reverse A-axis to lock
    Update tool position

    However, looking at that code snippet, it does look like it will handle the tool position rollover automatically.
    I'd try creating a basic M6 macro that simply increments it by maybe 3 or 5 position in one swift move, and see if the tool position rolls over to where you'd expect. It may be limited to only incrementing by one (I'd hope not, but a quick bit code to test is easier, than having to re-write a whole macro if it is limited).


    If you're really stuck, post up the links to the PLC manual and I'll have a bit read later.
    From what I looked at a couple weeks ago, the PLC language does seem to be some kind of Basic/Ladder/Fanuc love child.
    Thanks.

    The ATC 'process' is mapped here and links to the PLC reference manual also there.

    http://centroidcncforum.com/viewtopi...52327af32d86da

    PLC Manual - http://www.centroidcnc.com/downloads...g%20Manual.pdf

    Many thanks.

  5. #44
    Quote Originally Posted by m_c View Post
    However, looking at that code snippet, it does look like it will handle the tool position rollover automatically.
    Ok think we are looking at two different pieces of code here. I've just downloaded Chaz's file and you could be correct.!!
    Looks like ToolTurretPosBit1 uses the tool counter when in incremental mode and then toggles tool position each time this increments.

    However Still not sure thou because how does the tool position get incremented inside the PLC.?
    Last edited by JAZZCNC; 18-02-2018 at 09:18 PM.

  6. #45
    Quote Originally Posted by JAZZCNC View Post
    Don't think so Not without watching at least one input and setting the ToolTurretPosBit1. Only then can it increment the CurrentTurretPosition_W variable which then gets stored in MEM1 which then signals to M101 /70001 in main cnctch.mac (M6 macro) that toolChange is Complete.

    Without using an input then the only way is to move it using set amount of degrees then reverse etc then increment tool position in the code.
    Yep, which is how the Mach 3 ATC macro works.

  7. #46
    Quote Originally Posted by Chaz View Post
    Yep, which is how the Mach 3 ATC macro works.
    So are you saying this Turret does have sensor.? I was under the impression it didn't and just rotated set amount then reversed little. Then updated tool table.

  8. #47
    Quote Originally Posted by JAZZCNC View Post
    So are you saying this Turret does have sensor.? I was under the impression it didn't and just rotated set amount then reversed little. Then updated tool table.
    No, no sensor. Here is a video of it running (on Mach 3).

    https://www.youtube.com/watch?v=-cCDulVashA

  9. #48

  10. #49
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 1 Day 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.
    Quote Originally Posted by JAZZCNC View Post
    Ok think we are looking at two different pieces of code here. I've just downloaded Chaz's file and you could be correct.!!
    Looks like ToolTurretPosBit1 uses the tool counter when in incremental mode and then toggles tool position each time this increments.

    However Still not sure thou because how does the tool position get incremented inside the PLC.?
    I'm only going by the code snippet Chaz posted, but it looks to me like if you enable incremental mode, it expects you to link an input, along with a directional command, and the rest is then handled behind the scenes.
    However, I would still expect you to be able to directly change the tool position, to allow for tool changer homing routines, and recovery of changers that have no home sensor.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  11. #50
    Quote Originally Posted by Chaz View Post
    Ye thats one I've been looking at and is more like what would be needed to make work thru PLC. Notice there are commands for error checking and actually turning turret.

Page 5 of 7 FirstFirst ... 34567 LastLast

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
  •