Printer Integration
- DuNuNuBatman
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
28 Apr 2015 23:30 #58195
by DuNuNuBatman
Printer Integration was created by DuNuNuBatman
Do anyone know of other projects that integrate a printer/label maker into LinuxCNC?
A couple of commercial machines I've looked at have label printing/application built directly into the machine, which I thought was pretty slick.
A couple of commercial machines I've looked at have label printing/application built directly into the machine, which I thought was pretty slick.
Please Log in or Create an account to join the conversation.
29 Apr 2015 00:06 #58197
by andypugh
I would start with deciding what you want to print, then take it from there.
I can't imagine that it would be particularly difficult.
Replied by andypugh on topic Printer Integration
Do anyone know of other projects that integrate a printer/label maker into LinuxCNC?
I would start with deciding what you want to print, then take it from there.
I can't imagine that it would be particularly difficult.
Please Log in or Create an account to join the conversation.
- DuNuNuBatman
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
29 Apr 2015 00:25 #58200
by DuNuNuBatman
Replied by DuNuNuBatman on topic Printer Integration
Part labels. Take a nested sheet, print a label and apply the label to the nested piece in the correct orientation.
Something similar to this:
In the g-code parser, is there a way to include metadata that the machine can use to take certain actions like print a label for example.
So within the g-code:
1. Print label using metadata placed within the g-code file itself: Part Id, Edgebanding sides/type, Project, etc..2. Subroutine to pick up printed label
3. Place label using XY coordinates
Something similar to this:
In the g-code parser, is there a way to include metadata that the machine can use to take certain actions like print a label for example.
So within the g-code:
1. Print label using metadata placed within the g-code file itself: Part Id, Edgebanding sides/type, Project, etc..
([printlabel]PartId: 123, ProjectId: abc, Assembly: 123, X: 12, Y: 12)
3. Place label using XY coordinates
Please Log in or Create an account to join the conversation.
29 Apr 2015 01:16 #58204
by andypugh
You could use "magic comments"
;PartID: 1234
;ProjectID: WidgetMk24B
M101
If you have a Python program called M101
There is a Python library for Brother printers here:
pypi.python.org/pypi/brotherprint
An example of Regex (Python re. library) here (used to re-factor INI files for joints-axes branches)
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...66e74add8ef5aaa73561
it's just a matter of connecting the dots.
Replied by andypugh on topic Printer Integration
Not really, but that might not matter.In the g-code parser, is there a way to include metadata that the machine can use to take certain actions like print a label for example.
You could use "magic comments"
;PartID: 1234
;ProjectID: WidgetMk24B
M101
If you have a Python program called M101
#! usr/bin/python
import linuxcnc
import os
s = linuxcnc.stat()
s.poll()
filename = s.filename()
gcode = open(filename, r)
gcodeline = gcode.readline()
while gcodeline != ''
... Insert clever regex-based stuff here :-)
There is a Python library for Brother printers here:
pypi.python.org/pypi/brotherprint
An example of Regex (Python re. library) here (used to re-factor INI files for joints-axes branches)
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...66e74add8ef5aaa73561
it's just a matter of connecting the dots.
Please Log in or Create an account to join the conversation.
- DuNuNuBatman
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
29 Apr 2015 05:25 #58208
by DuNuNuBatman
Replied by DuNuNuBatman on topic Printer Integration
That's perfect. I can include the label documentation within the same gc file.
It looks like I can run any executable or script correct?
linuxcnc.org/docs/html/gcode/m-code.html#sec:M100-to-M199
It looks like I can run any executable or script correct?
linuxcnc.org/docs/html/gcode/m-code.html#sec:M100-to-M199
Please Log in or Create an account to join the conversation.
29 Apr 2015 05:37 #58209
by andypugh
Yes. Also the Python interface can see "inside" LinuxCNC. I meant to give a link to the docs:
www.linuxcnc.org/docs/html/common/python-interface.html
The incomplete example I gave only used it to query the existing filename.
Replied by andypugh on topic Printer Integration
It looks like I can run any executable or script correct?
linuxcnc.org/docs/html/gcode/m-code.html#sec:M100-to-M199
Yes. Also the Python interface can see "inside" LinuxCNC. I meant to give a link to the docs:
www.linuxcnc.org/docs/html/common/python-interface.html
The incomplete example I gave only used it to query the existing filename.
Please Log in or Create an account to join the conversation.
- DuNuNuBatman
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
30 Apr 2015 03:05 #58245
by DuNuNuBatman
Replied by DuNuNuBatman on topic Printer Integration
Perfect, thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.074 seconds