LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
Functions | Variables
stream Namespace Reference

Functions

def send_status_query ()
 
def periodic_timer ()
 

Variables

int RX_BUFFER_SIZE = 128
 
int BAUD_RATE = 115200
 
bool ENABLE_STATUS_REPORTS = True
 
float REPORT_INTERVAL = 1.0
 
bool is_run = True
 
 parser = argparse.ArgumentParser(description='Stream g-code file to grbl. (pySerial and argparse libraries required)')
 
 type
 
 help
 
 action
 
 default
 
 args = parser.parse_args()
 
 s = serial.Serial(args.device_file,BAUD_RATE)
 
 f = args.gcode_file
 
bool verbose = True
 
bool settings_mode = False
 
bool check_mode = False
 
 grbl_out = s.readline().strip()
 
 start_time = time.time();
 
 timerThread = threading.Thread(target=periodic_timer)
 
 daemon
 
int l_count = 0
 
int error_count = 0
 
 l_block = line.strip()
 
int g_count = 0
 
list c_line = []
 
 out_temp = s.readline().strip()
 
 end_time = time.time();
 

Detailed Description

\

Stream g-code to grbl controller

This script differs from the simple_stream.py script by 
tracking the number of characters in grbl's serial read
buffer. This allows grbl to fetch the next line directly
from the serial buffer and does not have to wait for a 
response from the computer. This effectively adds another
buffer layer to prevent buffer starvation.

CHANGELOG:
- 20170531: Status report feedback at 1.0 second intervals.
    Configurable baudrate and report intervals. Bug fixes.
- 20161212: Added push message feedback for simple streaming
- 20140714: Updated baud rate to 115200. Added a settings
  write mode via simple streaming method. MIT-licensed.

TODO: 
- Add realtime control commands during streaming.

---------------------
The MIT License (MIT)

Copyright (c) 2012-2017 Sungeun K. Jeon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---------------------

Function Documentation

◆ periodic_timer()

def stream.periodic_timer ( )

Definition at line 81 of file stream.py.

◆ send_status_query()

def stream.send_status_query ( )

Definition at line 78 of file stream.py.

Variable Documentation

◆ action

stream.action

Definition at line 68 of file stream.py.

◆ args

stream.args = parser.parse_args()

Definition at line 74 of file stream.py.

◆ BAUD_RATE

int stream.BAUD_RATE = 115200

Definition at line 56 of file stream.py.

◆ c_line

list stream.c_line = []

Definition at line 157 of file stream.py.

◆ check_mode

stream.check_mode = False

Definition at line 94 of file stream.py.

◆ daemon

stream.daemon

Definition at line 123 of file stream.py.

◆ default

stream.default

Definition at line 68 of file stream.py.

◆ ENABLE_STATUS_REPORTS

bool stream.ENABLE_STATUS_REPORTS = True

Definition at line 57 of file stream.py.

◆ end_time

stream.end_time = time.time();

Definition at line 188 of file stream.py.

◆ error_count

int stream.error_count = 0

Definition at line 128 of file stream.py.

◆ f

stream.f = args.gcode_file

Definition at line 89 of file stream.py.

◆ g_count

int stream.g_count = 0

Definition at line 156 of file stream.py.

◆ grbl_out

string stream.grbl_out = s.readline().strip()

Definition at line 109 of file stream.py.

◆ help

stream.help

Definition at line 65 of file stream.py.

◆ is_run

bool stream.is_run = True

Definition at line 60 of file stream.py.

◆ l_block

stream.l_block = line.strip()

Definition at line 136 of file stream.py.

◆ l_count

int stream.l_count = 0

Definition at line 127 of file stream.py.

◆ out_temp

stream.out_temp = s.readline().strip()

Definition at line 165 of file stream.py.

◆ parser

stream.parser = argparse.ArgumentParser(description='Stream g-code file to grbl. (pySerial and argparse libraries required)')

Definition at line 63 of file stream.py.

◆ REPORT_INTERVAL

float stream.REPORT_INTERVAL = 1.0

Definition at line 58 of file stream.py.

◆ RX_BUFFER_SIZE

int stream.RX_BUFFER_SIZE = 128

Definition at line 55 of file stream.py.

◆ s

stream.s = serial.Serial(args.device_file,BAUD_RATE)

Definition at line 88 of file stream.py.

◆ settings_mode

stream.settings_mode = False

Definition at line 92 of file stream.py.

◆ start_time

stream.start_time = time.time();

Definition at line 118 of file stream.py.

◆ timerThread

stream.timerThread = threading.Thread(target=periodic_timer)

Definition at line 122 of file stream.py.

◆ type

stream.type

Definition at line 64 of file stream.py.

◆ verbose

stream.verbose = True

Definition at line 90 of file stream.py.