586,075 active members*
3,798 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2013
    Posts
    110

    conversion M63P..Q...E.. in M3S..

    Hi,
    I ask if there is a good soul among you who writes me an example of conversion of the M63P..Q...E..command in the M3S.. command based on a specific tool to manage a blue laser; I was hoping for an example of PlanetCNC in the latest version of TNG but I haven't seen it. I have the goodwill to learn but I lack the technical knowledge.
    I thank in advance anyone who can help me.
    Marco

  2. #2
    Join Date
    Jun 2017
    Posts
    143

    Re: conversion M63P..Q...E.. in M3S..

    A quick search show up an example in Samples\Tutorials\M63ex1.txt

    Simon

  3. #3
    Join Date
    Jun 2017
    Posts
    143

    Re: conversion M63P..Q...E.. in M3S..

    I would expect that you would need to create an M3.gcode file in the scripts directory of your profile and the M63 line would be something like:

    M63 P6 Q10000 E#<_spindlespeed>

    I would of course add some error checking to make sure #<_spindlespeed> is set to between 0 and 100.

    Cheers
    Simon

  4. #4
    Join Date
    Apr 2013
    Posts
    110

    Re: conversion M63P..Q...E.. in M3S..

    Okay, thanks TheRat.
    At the weekend I try.

  5. #5
    Join Date
    Jun 2017
    Posts
    143

    Re: conversion M63P..Q...E.. in M3S..

    Thinking a bit more you probably don't need error checking just set the min spindle speed to 0 and the max to 100 in settings. I also think that script then needs to have an M3 at the the very end so the button triggers.

  6. #6
    Join Date
    Apr 2013
    Posts
    110

    Re: conversion M63P..Q...E.. in M3S..

    Yes, in fact, I also thought of putting an "If ... else ... endif" both for the minimum and maximum (0-100) and for the control of the "Laser" tool that activates this part of the script
    All I needed was to know how to get started, then I work on it.
    Thanks again

  7. #7
    Join Date
    Apr 2013
    Posts
    110

    Re: conversion M63P..Q...E.. in M3S..

    Hi, I modified the M3 and M5 scipt ... they work but I'm not entirely satisfied with the M3 script for a couple of things:


    1) The value of # <_spindlespeed> is read-only, therefore, when mistakenly typing M3 S5000 instead of M3 S50 I cannot set S to the maximum allowed value even if I set the maximum value in # <_spindle_speed_max> when printing the value of # <_spindlespeed> is always the entered value (5000) and not 100
    2) When starting the process, the S command is not sufficient to change the laser intensity, but the complete command (M3S ..) is required. I tried the Python example. Supplied with TNG "LaserPhoto.py" but obviously it doesn't work for this reason.


    I think something is missing to work 100%. Below the M3 script (still in draft)

    o<tool> if [#<_selected_tool> EQ 99]
    #<_spindle_speed_min> = 0
    #<_spindle_speed_max> = 100


    M63 P2 Q10000 E#<_spindlespeed>
    o<marco> if [#<_spindlespeed> GT 100]
    (print,#<_spindlespeed> Value "S" Too high (Imposed max value (100)))
    ; #<_spindlespeed> = 100 (ERROR: PARAMETER ONLY READING)
    o<marco> else
    ; (print,#<_spindlespeed>)
    o<marco> endif

    o<tool> else
    #<_spindle_speed_min> = 6000
    #<_spindle_speed_max> = 24000
    M3
    O<PlanetCNC> if [#<_spindle_delay_start> GT 0]
    G04 P#<_spindle_delay_start>
    O<PlanetCNC> endif

    ;(print,#<_selected_tool>)
    o<tool> endif

  8. #8
    Join Date
    Jun 2017
    Posts
    143

    Re: conversion M63P..Q...E.. in M3S..

    Try this.

    Code:
    o<tool> if [#<_selected_tool> EQ 99]
    #<_spindle_speed_min> = 0
    #<_spindle_speed_max> = 100
    
    #<spd> = MIN[#<_spindlespeed>,#<_spindle_speed_max>]
    M63 P2 Q10000 E#<spd>
    M3
    
    o<tool> else
    #<_spindle_speed_min> = 6000
    #<_spindle_speed_max> = 24000
    M3
    O<PlanetCNC> if [#<_spindle_delay_start> GT 0]
    G04 P#<_spindle_delay_start>
    O<PlanetCNC> endif
    
    o<tool> endif

  9. #9
    Join Date
    Apr 2013
    Posts
    110

    Re: conversion M63P..Q...E.. in M3S..

    Hi,
    I tried your code which is very elegant compared to mine.
    As it is, even with the 99 (Laser) tool when in MDI I launch the M3S100 command the spindle also turns on while commenting on M3 at line 7 it works but it has the same problem as my code, once the laser is turned on the only S command .. does not vary the intensity of the laser.

  10. #10
    Join Date
    Jun 2017
    Posts
    143

    Re: conversion M63P..Q...E.. in M3S..

    You might have to wait for Andrej to reply and answer that. Clearly just executing S50 etc is never going to run the M3 script. If you have a post you could make it always send an M3 when the Sxxx needs to change.

  11. #11
    Join Date
    Apr 2013
    Posts
    110

    Re: conversion M63P..Q...E.. in M3S..

    Quote Originally Posted by theRat View Post
    If you have a post you could make it always send an M3 when the Sxxx needs to change.
    YES, for now I do this way. Let's see if Andrej has a solution.
    Thanks for everything

Similar Threads

  1. 15M CRT to LCD conversion
    By forhire in forum Fanuc
    Replies: 6
    Last Post: 12-23-2019, 03:52 AM
  2. pdm 30 cnc conversion HELP!!
    By sledhead306 in forum Benchtop Machines
    Replies: 10
    Last Post: 12-11-2015, 05:22 PM
  3. CNC conversion possible?
    By Jules_B in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 06-19-2011, 10:46 AM
  4. conversion of .stp to 3d pdf
    By prozium in forum 3D Printing / Scanning Software and Hardware
    Replies: 0
    Last Post: 06-18-2011, 01:02 PM
  5. servo conversion vs stepper conversion
    By contractdesign in forum Bridgeport / Hardinge Mills
    Replies: 3
    Last Post: 07-26-2008, 08:54 PM

Tags for this Thread

Posting Permissions

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