Can a plugin receive G-codes when printing

Hi Repetier,
Can a plugin receive the G-codes when printing?

Christian

Comments

  • No it can't. You can inject commands and you can check all responses.

    What you can is getting informed about position changes. The analyser gets called for each gcode and moves cause the 

    public delegate void OnPosChange(GCode code, float x, float y, float z);

    event to be called.







    public event OnPosChange eventPosChanged;

    is the event you might want to book.

    Why do you need gcodes that got send? Normally the analyser gives you anything you need.

  • edited January 2015
    What do you mean by

    "...The analyser gets called for each gcode and moves..."

    While printing?

    I'm a little slow to understand, do you think you can build a simple plugin (source code) to demonstrate the basic use of your analyser?

    I'm sure it'll explain everything faster.

    Thank you!

    Christian
  • No, have no time for writing demo plugins. You can check the cnc plugin which uses it as well I guess.

    The analyser is described here:


    IHost has a property Connection which has a Property Analyser. That is the analyser that gets updated while printing. So all these variables show the current state of the printer. From there it should be pretty easy to get everything you want. If you are only interested in position changes add a callback to OnPosChange event. 
  • Repetier,
    OK, thanks for the Analyzer informations, very helpful, this part of my plugin is now functional.

    Now, is it possible to replicate the Visualization group box of the Preview tab (the one with First Layer / Last Layer)? If yes, which properties/events or controls should I use?

    Christian
  • No, that is not possible. It is hardcoded inside the editor. And rewriting it is also not easy or impossible. I have added the following to IGcodeEditor so you can at least use the editor commands whcih are already there. They will be included in Version 1.1







            /// <summary>

            /// Visualization mode for gcode.

            /// 0 = Show all layer, 1 = show one layer, 2 = show layer range

            /// </summary>

            int ShowMode { get; set; }

            int ShowMinLayer {get; set;}

            int ShowMaxLayer { get; set; }

            int MaxLayer { get; }

  • Exactly what I need.

    Do you have an ETA for version 1.1?
  • Not clear. We want to include a new connector for repetier-server, then we call it 1.1 and publish it. And that is what we are working on. So till mid february I hope.
  • Do you have a new ETA for version 1.1?
Sign In or Register to comment.