. .

Hybrid View

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

  2. #2
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 22 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has a total post count of 2,964. Received thanks 368 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.

  3. #3
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 22 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has a total post count of 2,964. Received thanks 368 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.

Thread Information

Users Browsing this Thread

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