. .
Page 4 of 7 FirstFirst ... 23456 ... LastLast
  1. #31
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 6 Days Ago Has been a member for 9-10 years. Has a total post count of 1,601. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by JAZZCNC View Post
    Chaz give me some more info on turret ie: Distance to move per tool change.
    Do you have this working on Mach3 if so then post M6.macro as it should tell everything needed to write Macro for Acorn.
    Thanks. I did try and email you yesterday however got a bounce from your hemsworthlad email address.

    My understanding is that I need some code in cnctch.mac. I then also need to change some parameters to tell Centroid that there is an ATC. Finally, I believe the actual PLC code (not sure / where / how to edit this) contains the actual movement logic or macro. Here is the Mach 3 macro that works with this turret. The logic is fairly straight forward.



    If IsLoading() Then
    ' Do Nothing, program loading
    Else

    ' Dim Variables

    Dim Num_Tools As Integer
    Dim CW_Steps_Per_Tool As Integer
    Dim CCW_Steps As Integer
    Dim HoldingDRO As Integer
    Dim Requested_Tool As Integer
    Dim Current_Tool As Integer
    Dim CW_Feed As Integer
    Dim CCW_Feed As Integer

    Dim moves As Integer
    Dim total_move As Integer


    ' set up some vars

    Num_Tools = 8
    CW_Move_Per_Tool = 360/Num_Tools
    CCW_Move = 10
    HoldingDRO = 1050
    Requested_Tool = GetSelectedTool()
    Current_Tool = GetUserDRO(HoldingDRO)
    CW_Feed = 1500
    CCW_Feed = 1000
    Current_Feed = GetOEMDRO(818)


    ' start tool change

    Message ("Requested Tool No=" & Requested_Tool)

    If Requested_Tool > Num_Tools Then
    Message "Requested Tool No. too high, program stopped."
    Code "M30"
    End
    End If

    If Requested_Tool < 1 Then
    'Message "Requested Tool No. too low, program stopped."
    Code "M30"
    End
    End If

    If Requested_Tool = Current_Tool Then
    ' do nothing
    Else
    ' lets do some changing
    If Requested_Tool > Current_Tool Then moves = Requested_Tool -Current_Tool
    If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool +Requested_Tool

    total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)

    Code "G91 G94" 'incremental & Feed per minute
    Code "G0 A" & total_move '& "F" & CW_Feed
    Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed
    While IsMoving()
    Wend

    SetCurrentTool Requested_Tool
    SetUserDRO HoldingDRO, Requested_Tool
    Code "G90" ' back to absolute movement
    Code "F" & Current_Feed
    End If
    End If

  2. #32
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 6 Days Ago Has been a member for 9-10 years. Has a total post count of 1,601. Received thanks 110 times, giving thanks to others 69 times.
    If you watch this video, you can see the cnctch.mac Tool Change Request Macro.

    https://www.youtube.com/watch?v=7XxCzerDKGU

    Ive paused it and written (copied) the code.

    IF #50001 ;Prevent lookahead
    IF #4202 || #4201 THEN GOTO 1000
    IF #4120 == #90014 THEN GOTO 1000

    N100

    G10 P1906 R1
    G4 P.5
    M94 /6
    M101 / 70001
    M95 /6

    N1000

    The actual logic of movement is:-

    Code "G0 A" & total_move '& "F" & CW_Feed
    Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed

    I assume this is the logic you need to do in the PLC?

  3. #33
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 6 Days Ago Has been a member for 9-10 years. Has a total post count of 1,601. Received thanks 110 times, giving thanks to others 69 times.
    If you watch one vid, https://www.youtube.com/watch?v=6Qa_SN9n-MY they open an acorn_mill_plc.src file. On the lathe software, there is no such file. I can reinstall and do the Mill bit on this main PC of mine to try it. The other issue is that the board and machine is in the garage, without removing the board and bringing it inside, I cannot 'play' on my main PC in the house.

    I also looked to see if we can change the IP address of the board so that I can 'lan' it. At the moment, my garage PC has only 1 NIC which means that whilst its connected to the board, I have no internet access.

  4. #34
    At the moment, my garage PC has only 1 NIC which means that whilst its connected to the board, I have no internet access.
    How about one of these:-

    https://www.ebay.co.uk/itm/Wireless-...YAAOSwuQxaZ1vz
    ..Clive
    The more you know, The better you know, How little you know

  5. #35
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 6 Days Ago Has been a member for 9-10 years. Has a total post count of 1,601. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by Clive S View Post
    Thanks, got something like this already, would just prefer to use the wired connection in the garage if possible.

  6. #36
    Quote Originally Posted by Chaz View Post
    If you watch one vid, https://www.youtube.com/watch?v=6Qa_SN9n-MY they open an acorn_mill_plc.src file. On the lathe software, there is no such file.
    The PLC source file is created when controller is started so will only show after it's successfully created. When you start controller watch first screen saying initialising MPU and if you get error then source file won't be created.

    If get MPU error the go to wizzard and reset by writing settings to controller.
    Last edited by JAZZCNC; 18-02-2018 at 12:40 PM.

  7. #37
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 6 Days Ago Has been a member for 9-10 years. Has a total post count of 1,601. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by JAZZCNC View Post
    The PLC source file is created when controller is started so will only show after it's successfully created. When you start controller watch first screen saying initialising MPU and if you get error then source file won't be created.

    If get MPU error the go to wizzard and reset by writing settings to controller.
    Thanks, suspected that as Im not on the Lathe PC.

    Making some headway but struggling a bit as this is new to me.

    Current macro, clearly not finished yet.

    Num_Tools IS 8
    CW_Move_Per_Tool IS 360/Num_Tools
    CCW_Move IS 10
    CW_Feed IS 1500
    CCW_Feed IS 1000
    TOOLCHANGEMSG IS Tool Changing Taking Place

    ;start tool change

    ;If Requested_Tool > Current_Tool Then moves = Requested_Tool -Current_Tool

    ;If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool +Requested_Tool

    If Requested_Tool > SV_TOOL_NUMBER Then moves = Requested_Tool -Current_Tool

    If Requested_Tool < SV_TOOL_NUMBER Then moves = Num_Tools - Current_Tool +Requested_Tool


    total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)


    Code "G91 G94" 'incremental & Feed per minute
    Code "G0 A" & total_move '& "F" & CW_Feed
    Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed
    ;SetCurrentTool Requested_Tool
    ;SetUserDRO HoldingDRO, Requested_Tool
    Code "G90" ' back to absolute movement
    Code "F" & Current_Feed

  8. ive just ordered one of these- pretty good reviews for wired lan extender through power sockets
    http://www.ebay.co.uk/itm/BT-Broadba...k/122236222579

  9. #39
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 6 Days Ago Has been a member for 9-10 years. Has a total post count of 1,601. Received thanks 110 times, giving thanks to others 69 times.
    Quote Originally Posted by battwell View Post
    ive just ordered one of these- pretty good reviews for wired lan extender through power sockets
    http://www.ebay.co.uk/itm/BT-Broadba...k/122236222579
    The problem isnt connectivity. I have a similar setup. The issue is that the controller connects via Ethernet, so I cant 'get' to the Internet if the cable I need is disconnected. CS Labs allows you to use DHCP on your network to reassign its IP. This doesnt seem to do that.

  10. #40
    Chaz been doing little digging and looks like the acorn is setup in such away that it watches inputs to determine where the turret is located.
    This is why the Orac code is so simple. The PLC is watching the I/O to determine which turret location currently at then moving to new location.

    There isn't any code in the PLC like what your probably thinking. All the PLC does is watch 3 inputs and depending on there logic state knows turret location. ie:
    In1=on In2=off in3=on == Turret Position#1
    In1=on In2=on In3=off == Turret Position #2
    In1=off In2=on In3=on == Turret Position #3
    And so on for each Turret location.

    Using this Logic indexing it rotates the turret while watching the I/O untill matches tool # taken from G-code and stored in parameter #4102 and when finished returns sets this location in Memory and sets parammeter #90014.
    This Logic is the only thing in the PLC which can be changed.

    It should be possible to change the PLC but this is beyond me at the minute.
    However think we could easily work around this and effectively do it manually using the Macro with simple moves then set the parameters to keep track where located.

    Also note Centroid don't use G91 incremental moves. If want to program incremental move you use UVW moves ie: x10 Z-5 would be absolute moves.
    incremental moves would be U10 W-5.

    What axis would you use for turret.?
    Last edited by JAZZCNC; 18-02-2018 at 07:09 PM.

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


Page 4 of 7 FirstFirst ... 23456 ... 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
  •