586,062 active members*
4,790 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 21
  1. #1
    Join Date
    Jan 2008
    Posts
    14

    Performing tasks during X-axis-movement

    Hi!
    I have a problem that someone in here might know how to solve.
    I have a laser mounted in a 3-axis router and would like to be able to switch it on and off from G-code without having to stop the movement.

    For example:
    __________
    G1 X30
    G3 S100
    G1 X50
    __________

    This will make the X-movement come to a stop before the laser is turned on and then accelerate up to the specified speed.
    Can I make this operation with constant X-speed? Do I have to use the ClassicLadder for such an operation?

    Alternatively: Is there a function in EMC2 that is able to compensate, in the M3 S-value (normally spindle-speed), for the velocity of the machine-head? I'm told there is a function like this in Mach3 and I guess it would do the trick for my laser problem.

    Thnx!
    /Tottish

  2. #2
    Join Date
    Feb 2007
    Posts
    514
    In 2.3 beta you can use M62/63 to do that.

    http://www.linuxcnc.org/docview/deve...ec:M62-to-M65:

    John

  3. #3
    Join Date
    Jan 2008
    Posts
    14
    I don't think so:
    "The actual change of the specified outputs will happen at the beginning of the next motion command. If there is no subsequent motion command, the queued output changes won't happen. It's best to always program a motion g-code (G0, G1, etc) right after the M62/63."

    From what I can tell this means that the router has to come to a stop and then start moving again for an M62/63-command to "execute". I need it to turn the laser on while moving. Preferably I would like to be able to set the M3 PWM that I now use for the laser but if only on/off is possible I guess it will do.

    Any other Ideas?

    Regards
    /Tottish

  4. #4
    Join Date
    Feb 2007
    Posts
    514
    No, It will act just the same if you didn't have the M62/63 in the line. Just keep in mind that the switching takes place at the start of the next move.

    John

  5. #5
    Join Date
    Feb 2007
    Posts
    514
    For example
    G0 X1 Y1 M62 ( Set up to switch on at next move)
    G1 X1.5 M63 (on during this part of the move)
    X2 M62 (off during this part of the move)
    X3 M63 (on)
    G0 X1 Y1 (off)

  6. #6
    Join Date
    Feb 2007
    Posts
    514
    hmm, got a double post...

    anyway the above move will be one smooth move within the constraints of your system.

    http://www.linuxcnc.org/docview/deve...epts.html#r1_1

    So it might be needed to have a G1 move before and after to maintain speed as outlined above.

    John

  7. #7
    Join Date
    Jan 2008
    Posts
    14
    Sorry Big John. I'm new to G-code manipulation and I didn't realize that the M62/63-commands would fit in seamless. I tried doing the same thing with the M3-command and since that didn't work I thought that the code was executed line by line without any knowledge about what's on the next line. It seems I came to the wrong conclusion.

    Is there any way to fit in the M3 command like that? It would just be awesome. If not I will probably have to sweep the whole image one time for every shade that I want.

    Thanks a lot Big John and sorry for mistrusting you. =)

    Regards
    /Tottish

  8. #8
    Join Date
    Feb 2007
    Posts
    514
    No problem, you just didn't know.

    AFAIK M62/63 are the only ones that don't pause motion but I might be wrong...

    John

  9. #9
    Join Date
    Jan 2008
    Posts
    14
    Hmm, I was wrong (again). It only works for me at slow speeds. At speeds over 500mm/min it becomes clear that it does stop (or at least slow down) between the lines.
    Even without the M-commands it stops.
    For example this block:
    G1 X10
    X 20
    X30
    Is performed in three distinct sequences at higher speeds. I have to double check for errors tomorrow. My head is spinning around right now.

    Good Night from Norway!
    /Tottish

  10. #10
    Join Date
    Feb 2007
    Posts
    514
    Did you set G64 Pnn ?

    http://www.linuxcnc.org/docview/deve...ts.html#r1_1_3

    For short moves at high speed this is needed. Also EMC will not go faster than it can stop so if your acceleration is low and your asking for high speeds it looks like a bumper car...

    John

  11. #11
    Join Date
    Jan 2008
    Posts
    14
    I have now. But I'm afraidit didn't help.
    When I run this program>
    T1M6
    G64 P0.5
    G1 Z0.5 F2100.0

    G0X0.000Y0.000

    G1X8.525F2100.0

    x10
    X11
    X12
    X33
    X34
    X35
    X50

    G0X0.000Y0.000

    G0X0Y0

    M30
    Everything runs smooth and it seems as if the naive CAMthingy 'morphs' all the Xmoves together and in the CodeWindow of AXIS the highlight skips right down to the last Xline and stays there until the value X50 is reached.

    When I run this program, however, it is all chopped up and not smooth at all>
    T1M6
    G64 P0.5
    G1 Z0.5 F2100.0

    G0X0.000Y0.000

    G1X8.525F2100.0

    x10 M62
    X11 M63
    X12 M62
    X33 M63
    X34 M62
    X35 M63
    X50

    G0X0.000Y0.000

    G0X0Y0

    M30
    The highlight is jumping from row to row.

    Any more pointers of what might be wrong here (questionmark)

    Regards,
    Tottish

    EDIT: Oh, and the P-value for the G64 makes no apparent difference.

  12. #12
    Join Date
    Feb 2007
    Posts
    514
    Just to be sure are you running 2.3 beta?

    It looks like the CamThingy breaks when M62/63 comes into play...

    John

  13. #13
    Join Date
    Jan 2008
    Posts
    14
    No, it seems like I'm running 2.2.6.
    Is it possible to try the 2.3Beta without having to compile it?
    EDIT: I think I found it, will try to install it. Seems like I'll hav to upgrade to HardyHeron Ubuntu

  14. #14
    Join Date
    Feb 2007
    Posts
    514
    The naive cam detector won't work with M62/63.

    There is a way to use the Z axis but I'm not sure how that is done at the moment.

    John

  15. #15
    Join Date
    Jan 2008
    Posts
    14
    No, it seems like I'm running 2.2.6.
    Is it possible to try the 2.3Beta without having to compile it?

  16. #16
    Join Date
    Jan 2008
    Posts
    14
    Ooops!
    If I understand correctly the 2.3Beta is only avalible for HardyHeron and my system is currently using Dapper. The problem is that I don't have a CD reader in my EMC-PC.
    I read that I can't upgrade to HardyHeron 'manually' because it will cause EMC to stop running.
    Any way to try the 2.3beta wtihout a CD drive?

  17. #17
    Join Date
    Feb 2007
    Posts
    514
    Ok you can use a comparator Z>0 to turn on the laser but it will not be perfect. I saw one laser guy that used Z0.001 for on and Z-0.001 for off. It would take some tweaking to get it to work. For example if you need a long line on you might have to make a short move to positive then a long move the a short move off.

    John

  18. #18
    Join Date
    Feb 2007
    Posts
    514
    AFAIK, 2.3 beta is only out for 8.04... so I guess you can not test it in 6.06 at the moment. Anyway it won't matter now that I understand more about what I didn't know about M62/63.

    John

  19. #19
    Join Date
    Feb 2007
    Posts
    514
    you might just want to pop in over at the IRC channel #EMC and chat with the experts or use the embedded java client on this page to get on the IRC

    http://www.linuxcnc.org/content/view/4/8/lang,en/

    John

  20. #20
    Join Date
    Jan 2008
    Posts
    14
    About the Comparator idea:
    I did something similar yesterday. I used the Zdir pin to turn it on and off. Put Z down to 0.01mm or something to turn it on and back up to 0.00 again to turn it off.
    This method does work but poses the exact same dilemma as with the M62/63.
    Guess I'll pop in to the IRC-channel then.
    Thanks for your help Big Tom!
    Regards
    /Tottish

Page 1 of 2 12

Similar Threads

  1. New SX3 - Axis Movement
    By meyermicro in forum Syil Products
    Replies: 11
    Last Post: 05-27-2008, 02:36 PM
  2. Axis Movement
    By KARD in forum CamSoft Products
    Replies: 1
    Last Post: 05-21-2008, 11:29 AM
  3. No Z-Axis Movement
    By btcoutermash in forum Bridgeport / Hardinge Mills
    Replies: 11
    Last Post: 08-12-2007, 08:42 PM
  4. Axis Movement
    By UKRobotics in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 12-17-2004, 08:33 PM
  5. 4th axis movement (and a few other gen ?s)
    By corpse in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 08-05-2004, 12:13 AM

Posting Permissions

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