585,877 active members*
3,403 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > EdgeCam > Post - Modal Spindle
Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2012
    Posts
    0

    Post - Modal Spindle

    Hello,
    If I put M5 into a rapid traverse command when making a post processor, and I have 'modal' enabled for M codes, why doesn't it automatically insert an M3 into the next interpolation command? More importantly, how do I enable that behavior?

    Istvan.

  2. #2
    Join Date
    Mar 2013
    Posts
    12
    This question is a little vague, but it seems to me in a standard CNC machining environment you would not want this to happen. The rapid traverse code constructor under general motion is usually reserved for links between material removal within a cycle where it is not optimal to feed (G01) between links. It would be more work, but you could always insert the Mfunction command that would force an M03 input between your cycles.

  3. #3
    Join Date
    Oct 2012
    Posts
    0
    Thanks for the reply.

    My question is actually for a plasma cutter setup -- I need to turn the torch off after cutting and then turn it back on before cutting.

    It would be more work, but you could always insert the Mfunction command that would force an M03 input between your cycles.
    Do you mean when you are creating the tool paths or can I do this when creating a post?

    Istvan.

  4. #4
    Join Date
    Jun 2008
    Posts
    125
    You use the spindle m-function. It would give you something like this - depending on how your post is configured.

    http://screencast.com/t/J5JUyxXtG3tE

  5. #5
    Join Date
    Oct 2012
    Posts
    0
    I can certainly do this if I do each continuous segment of a 2D profile separately with the spindle on/off codes in between. Ideally, I can modify the post to do this automatically.

    Can I modify the 2D profile computation so that the spindle off/on is stuck before/after the rapid traverses within a profiling operation?

    Istvan.

  6. #6
    Join Date
    Mar 2013
    Posts
    12
    Without spending a ton of time on this, I supposed you could get around it like this.

    In Code Wizard,

    Under the "General Motion" Code constructor

    Change your "Rapid Move" Code Constructor to look like the following

    [DELETE][BLKNUM] M05 [RAPIDGCODE][XMOVE][YMOVE][ZMOVE] M03

    Then recompile. Good Luck.

  7. #7
    Join Date
    Mar 2013
    Posts
    12
    Scratch that, to look like this.

    [DELETE][BLKNUM] M05
    [DELETE][BLKNUM] [RAPIDGCODE][XMOVE][YMOVE][ZMOVE]
    [DELETE][BLKNUM] M03

  8. #8
    Join Date
    Jun 2008
    Posts
    125
    That is one way to do it but not the most foolproof. You could check the variable move and if it equals 4 then you know it's a Z move only so you know it's either a retract move or a plunge move.
    Also instead of hardcoding M05 and M03, I would see if there is the Spindir token (I think that is the one) as this then controls modality. If not, copy #direction to a #user variable and set that variable to output-if-changed (ie, make it modal).

    What I think would help would be if Ipburbank would attach a ppf showing how he wants to work. For example, does he just want to do one cycle then a toolchange, etc. Does he do multiple cuts with a 2d profile cycle, etc ,etc . We can configure the post to do lots of things if we know how he wants to work.

  9. #9
    Join Date
    Oct 2012
    Posts
    0
    Unfortunately, I am running an educational version of Edgecam which exports .epf files (which standard-licensed Edgecam installations cannot open.) I have successfully set up:

    [DELETE][BLKNUM] M05
    [DELETE][BLKNUM] [RAPIDGCODE][XMOVE][YMOVE][ZMOVE]
    [DELETE][BLKNUM] M03
    Here is a sample of the output:
    ***** Code Constructor : Linear Interpolation *****
    G1 X474.663 F203.2
    ***** Code Constructor : 2D Circular Interpolation *****
    G2 X480.219 Y202.443 I-0.001 J-5.557 F237.1
    ***** Code Constructor : Linear Interpolation *****
    G1 Y57.907 F203.2
    ***** Code Constructor : Rapid Move *****
    M05
    G0 Z6.35
    M03
    ***** Code Constructor : Rapid Move *****
    M05
    X474.663 Y52.35
    M03
    ***** Code Constructor : Linear Interpolation *****
    G1 Z-2.54 F101.6
    ***** Code Constructor : Linear Interpolation *****
    X440.905 F203.2
    Seeing that, I think I need to add
    You could check the variable move and if it equals 4 then you know it's a Z move only so you know it's either a retract move or a plunge move.
    Having never done anything with variables, how would I do this? I also do not know how to use:
    Also instead of hardcoding M05 and M03, I would see if there is the Spindir token
    Thanks for all the help, and sorry I couldn't be more helpful with test files
    Istvan.

  10. #10
    Join Date
    Mar 2013
    Posts
    12
    I believe the logic I suggested would would if you use the <c> force output of XYZ on the same line if the control has the ability to move all three axis simultaneously. Since this is a plasma cutter, moving all three axis at the same time would be faster, as there is no need to move to a safe clearance plane. Technically your always at a safe clearance plane. I would try that. Simply right click on the [XMove][YMove][ZMove] tokens, and select "Force Output Now"

  11. #11
    Join Date
    Jun 2008
    Posts
    125
    Let me knock you up an example post showing you what I mean. I'll do it on Monday during lunch and see if I can attach it up here.

  12. #12
    Join Date
    Jun 2008
    Posts
    125
    This changing your rapid move code constructor to look like this ....

    ;CODE: %IF #MOVE<>4 @SKIP
    ;CODE:
    ;CODE: #DIRECTION=5
    [DELETE][BLKNUM][SPINDIR]
    ;CODE: %GOTO @SKIP
    ;CODE:
    ;CODE: @SKIP
    [DELETE][BLKNUM][RAPIDGCODE][XMOVE][YMOVE][ZMOVE][SPEED][SPINDIR]
    ;CODE: %IF NEXTMACRO=2 %THEN #DIRECTION=3 : %CANCEL=#DIRECTION


    The first part checks whether it is performing a Z move.
    X only move, #xmove=1.
    Y only move, #ymove=2.
    Z only move, #zmove=4.

    X,Y,Z move means #move=7.

    If it is then the post will output an M5. On my cycle I had feed to depth selected so if nextmacro=2 (ie, is the next move a feed move) then turn on the spindle again.

    All this depends on which cycle and how you use this cycle. Try this out and let us know if it needs tweaking, as I'm sure we'll need to make it foolproof.

Similar Threads

  1. Modify post to post G02 and G03 modal
    By camtd in forum Post Processors for MC
    Replies: 3
    Last Post: 11-23-2011, 01:33 PM
  2. DX-32 G17, G18, and G19 Modal?
    By md63825 in forum Bridgeport / Hardinge Mills
    Replies: 9
    Last Post: 09-29-2011, 04:59 PM
  3. Modal Values
    By eliot15 in forum NCPlot G-Code editor / backplotter
    Replies: 4
    Last Post: 05-26-2011, 07:44 AM
  4. Non-modal G00,G01...G03
    By cncuser1 in forum Mastercam
    Replies: 4
    Last Post: 05-30-2007, 07:39 PM
  5. Post Processor (ISO G-Code - Non Modal)
    By cncadmin in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 1
    Last Post: 01-29-2005, 02:32 PM

Posting Permissions

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