notification when a specific N-line is executed?

Home Forums TinyG TinyG Support notification when a specific N-line is executed?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8794
    Adam
    Member

    Hi, I’m talking to the TinyG using JSON mode. What is the best way for my host code to be notified when a specific line of G-code (which has an N-number) has been completed?

    Right now the r:{gc:{n:{..}}} responses tell me when that line of G-code has been enqueued for the planner, but I need to know when the line has been *executed*, not when it has been enqueued.

    The qr:{} responses let me monitor the fullness/emptiness of the queue, but it seems exceptionally difficult to correlate those numerical fullness/emptiness levels with a precise line of g-code while running at full blast. This is even more difficult because a single G-code line may create more than one queue entry, so the correspondence isn’t one-to-one.

    This has to be something people use a lot, so I’m guessing there’s a simple way to do it that I’ve missed.

    #8795
    cmcgrath5035
    Moderator

    What I do know is that Chilipeppr manages to get this done, even with Gcode files without “Nnumbers”, I believe by adding it’s own.

    How it is done is buried in the code.

    I don’t believe there is a way for you to set a trigger for tinyG to report on a specific line number, likely because Gcode line numbering is optional and somehwat random. It would seem sniffing the status repot stream is the only way.

    You could also post a query to:

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.