Two questions about gcode



  • Hi

    Is there any way to get result from the console output, for example i sent M303 and i want to use P.I.D. results in my next gcode, like M301 PID results

    And the second question, can i make use console as a one time input for macros:

    M117 "Enter your diameter in console"

    You entering the diameter, click on Enter and its saving without using M200.

    Thanks


  • Moderator

    Yes you can send individual gcodes in the console at pretty much any time and have them take effect until the next power cycle. All config is dont by gcodes. Macros are just lists of gcodes. config.g is a macro too and it just happens to be called at startup.

    Specific to your question on PID, sending M303 H0 S60 would tune the heater, and sending M303 afterwards by itself would report what those results were.

    Sending most gcodes by themselves without a parameter will report back the currently set value.

    See the introduction here https://duet3d.dozuki.com/Wiki/Gcode



  • @Froust said in Two questions about gcode:

    Is there any way to get result from the console output, for example i sent M303 and i want to use P.I.D. results in my next gcode, like M301 PID results

    unless the variables you're after is avaiable in the Object Model then you'll need to parse the console output from some other host with more capabilities.

    but do note that the sample output on the wiki is probably not up to date so you should use M409 to look at the available data in your setup.

    @Froust said in Two questions about gcode:

    And the second question, can i make use console as a one time input for macros:
    M117 "Enter your diameter in console"

    you might be able to make a dummy axis to jog to a specific value? but from the M291 docs it looks like it will only do XYZ but poke around and see what you can do?



  • I'm noob in programming but i will check it, thank you all.


Log in to reply