johnlauer / serial-port-json-server

A serial port JSON websocket server for Windows, Mac, Linux, Raspberry Pi, or BeagleBone Black that lets you communicate with your serial port from a web application. This enables web apps to be written that can communicate with your local serial device such as an Arduino, CNC controller, or any device that communicates over the serial port.
http://chilipeppr.com
GNU General Public License v2.0
355 stars 174 forks source link

"Failed to get planning buffer" when sending Gcode to TinyG with small steps #77

Open bartona opened 4 years ago

bartona commented 4 years ago

I'm running into a problem where when I send Gcode to a TinyG V9 (Othermill) using ChiliPepper and SPJS, and there are small steps in the Gcode (specifically that of a small arc around the teardrop of a through hold pad), my TinyG just crashes with a "failed to get planning buffer error". When I send the same gcode using another software (CNC.js for example), I don't get the same issue.

Also, is there and documentation on how the tinyg bufferflow options work, and how serial data moves through SPJS at a high level? I was trying to dig into the code to see if I could find a resolution, but it was becoming difficult to follow.

chilipeppr commented 4 years ago

What computer are you running spjs on? It's written in Go, which is like C, and compiled, so it's screaming fast. Are you sure you're buffering enough Gcode to it ahead of time? Meaning, how big is the buffer in the serial port widget in lower right corner? I'd say keep it up in the 10's of 1000's. Maybe you're starving it there.

On Wed, Jun 10, 2020 at 1:06 PM Aaron Barton notifications@github.com wrote:

I'm running into a problem where when I send Gcode to a TinyG V9 (Othermill) using ChiliPepper and SPJS, and there are small steps in the Gcode (specifically that of a small arc around the teardrop of a through hold pad), my TinyG just crashes with a "failed to get planning buffer error". When I send the same gcode using another software (CNC.js for example), I don't get the same issue.

Also, is there and documentation on how the tinyg bufferflow options work, and how serial data moves through SPJS at a high level? I was trying to dig into the code to see if I could find a resolution, but it was becoming difficult to follow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/77, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4J23NVS7T6HLOVMBQ6OSTRV7RV5ANCNFSM4N2WUHQQ .

chilipeppr commented 4 years ago

btw, this repo is the old one. you should be on chilipeppr/serial-port-json-server

On Wed, Jun 10, 2020 at 3:54 PM John Lauer jlauer12@gmail.com wrote:

What computer are you running spjs on? It's written in Go, which is like C, and compiled, so it's screaming fast. Are you sure you're buffering enough Gcode to it ahead of time? Meaning, how big is the buffer in the serial port widget in lower right corner? I'd say keep it up in the 10's of 1000's. Maybe you're starving it there.

On Wed, Jun 10, 2020 at 1:06 PM Aaron Barton notifications@github.com wrote:

I'm running into a problem where when I send Gcode to a TinyG V9 (Othermill) using ChiliPepper and SPJS, and there are small steps in the Gcode (specifically that of a small arc around the teardrop of a through hold pad), my TinyG just crashes with a "failed to get planning buffer error". When I send the same gcode using another software (CNC.js for example), I don't get the same issue.

Also, is there and documentation on how the tinyg bufferflow options work, and how serial data moves through SPJS at a high level? I was trying to dig into the code to see if I could find a resolution, but it was becoming difficult to follow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/77, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4J23NVS7T6HLOVMBQ6OSTRV7RV5ANCNFSM4N2WUHQQ .

bartona commented 4 years ago

Ok, I will repost the issue there.

On Wed, Jun 10, 2020 at 7:08 PM John Lauer notifications@github.com wrote:

btw, this repo is the old one. you should be on chilipeppr/serial-port-json-server

On Wed, Jun 10, 2020 at 3:54 PM John Lauer jlauer12@gmail.com wrote:

What computer are you running spjs on? It's written in Go, which is like C, and compiled, so it's screaming fast. Are you sure you're buffering enough Gcode to it ahead of time? Meaning, how big is the buffer in the serial port widget in lower right corner? I'd say keep it up in the 10's of 1000's. Maybe you're starving it there.

On Wed, Jun 10, 2020 at 1:06 PM Aaron Barton notifications@github.com wrote:

I'm running into a problem where when I send Gcode to a TinyG V9 (Othermill) using ChiliPepper and SPJS, and there are small steps in the Gcode (specifically that of a small arc around the teardrop of a through hold pad), my TinyG just crashes with a "failed to get planning buffer error". When I send the same gcode using another software (CNC.js for example), I don't get the same issue.

Also, is there and documentation on how the tinyg bufferflow options work, and how serial data moves through SPJS at a high level? I was trying to dig into the code to see if I could find a resolution, but it was becoming difficult to follow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/77, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4J23NVS7T6HLOVMBQ6OSTRV7RV5ANCNFSM4N2WUHQQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/77#issuecomment-642312896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLTACN4DN5EWBVVELW75GTRWAG47ANCNFSM4N2WUHQQ .

bartona commented 4 years ago

It seems like the issue is the planner buffer gets overflown (the qr reports reach 0 just before the firmware freaks out)

On Wed, Jun 10, 2020 at 6:54 PM John Lauer notifications@github.com wrote:

What computer are you running spjs on? It's written in Go, which is like C, and compiled, so it's screaming fast. Are you sure you're buffering enough Gcode to it ahead of time? Meaning, how big is the buffer in the serial port widget in lower right corner? I'd say keep it up in the 10's of 1000's. Maybe you're starving it there.

On Wed, Jun 10, 2020 at 1:06 PM Aaron Barton notifications@github.com wrote:

I'm running into a problem where when I send Gcode to a TinyG V9 (Othermill) using ChiliPepper and SPJS, and there are small steps in the Gcode (specifically that of a small arc around the teardrop of a through hold pad), my TinyG just crashes with a "failed to get planning buffer error". When I send the same gcode using another software (CNC.js for example), I don't get the same issue.

Also, is there and documentation on how the tinyg bufferflow options work, and how serial data moves through SPJS at a high level? I was trying to dig into the code to see if I could find a resolution, but it was becoming difficult to follow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/77, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4J23NVS7T6HLOVMBQ6OSTRV7RV5ANCNFSM4N2WUHQQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnlauer/serial-port-json-server/issues/77#issuecomment-642309024, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLTACO6JNX7G5LMCUVKJM3RWAFLLANCNFSM4N2WUHQQ .