Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-25 Thread cogoman via Emc-users
One option would be to generate one big G-code file, with the 
appropriate M-CODE to break it up, and an operator's comment to let you 
know which section is coming up next.


1.   The operator would get a message like:

  (Prepare to carve Billy G's name)

2.   Put the part in the vise and hit run.

3.   The operator get's a message:

  (Prepare to carve Billy G's nickname)

4.   Flip the blank and hit run.

5.   The operator get's a message:

  (Prepare to carve Terry M's name)


and so on.


  It would probably really mess up your back plot, but you could have 
your program generate each individual section with indexed names, like:


Names001.ngc

Names002.ngc

ETC.

So you could preview what F-Engrave did, but also have your program 
generate:


Names-ALL.ngc

for the actual cutting once you are satisfied with the g-code.


On 2/24/22 12:21, andy pugh wrote:

On Thu, 24 Feb 2022 at 01:42, Ralph Stirling
 wrote:

If you wanted totally automated, you could use linuxcncrsh.

I don't think that linuxcncrsh is appropriate here, that is for remote
connection. I would plan on running the controlling script on the
actual controller PC.

It looks like what I intend can be done with the python interface:

program_open(string) - open an NGC file.
auto(int[, int]) - run, step, pause or resume a program.

Though the documentation on "auto" could afford to be a bit more
forthcoming on what the parameters do, or are for...

(Looking at emcmodule.cc it appears that the first integer is the command:
#define LOCAL_AUTO_RUN (0)
#define LOCAL_AUTO_PAUSE (1)
#define LOCAL_AUTO_RESUME (2)
#define LOCAL_AUTO_STEP (3)
#define LOCAL_AUTO_REVERSE (4)
#define LOCAL_AUTO_FORWARD (5)

And the optional second integer is the start line for run-from-line )




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-24 Thread andy pugh
On Thu, 24 Feb 2022 at 01:42, Ralph Stirling
 wrote:
>
> If you wanted totally automated, you could use linuxcncrsh.

I don't think that linuxcncrsh is appropriate here, that is for remote
connection. I would plan on running the controlling script on the
actual controller PC.

It looks like what I intend can be done with the python interface:

program_open(string) - open an NGC file.
auto(int[, int]) - run, step, pause or resume a program.

Though the documentation on "auto" could afford to be a bit more
forthcoming on what the parameters do, or are for...

(Looking at emcmodule.cc it appears that the first integer is the command:
#define LOCAL_AUTO_RUN (0)
#define LOCAL_AUTO_PAUSE (1)
#define LOCAL_AUTO_RESUME (2)
#define LOCAL_AUTO_STEP (3)
#define LOCAL_AUTO_REVERSE (4)
#define LOCAL_AUTO_FORWARD (5)

And the optional second integer is the start line for run-from-line )

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-23 Thread Ralph Stirling
If you wanted totally automated, you could use linuxcncrsh.
Ngcgui or pyngcgui sound like they might be useful for this
too.  Otherwise, overwriting the single file (or copying over)
doesn't sound like that bad of an idea.

-- Ralph


From: andy pugh [bodge...@gmail.com]
Sent: Wednesday, February 23, 2022 2:33 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] F-Engrave and LinuxCNC scripting

CAUTION: This email originated from outside the Walla Walla University email 
system.


On Wed, 23 Feb 2022 at 17:58, mar...@r-bechtold.de  wrote:
>
> in the past I programmed single letters as gcode.

Yes, I have done the same thing for numbers to engrave scale rings.

This time I am using F-engrave and a cxf font that I created
specifically for the job at hand.

(CXF is easy, just a set of lines and arcs:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FLinuxCNC%2Fsimple-gcode-generators%2Fblob%2Fmaster%2Fengrave%2Fcxf-fonts%2Fnormal.cxfdata=04%7C01%7Cralph.stirling%40wallawalla.edu%7Cf83c84f6aef04a4ec2ff08d9f71c97e8%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C1%7C637812524470660244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=YRyLEKxM0r7xljmcRnN7o0rwSpGnG81wg9ISlUnQZZc%3Dreserved=0
)

(note how this is part of the LinuxCNC code base already)

My questions are around how best to throw G-code at LinuxCNC and have
it do the job. I think I want my Python script to be in charge, ]

The simple option is to just keep overwriting a single file, then
reload that file and run it from the LinuxCNC GUI. But in some ways I
would prefer LinuxCNC to be entirely controlled by the Python script.
That is the part I am asking about. ie how to tell LinuxCNC to load a
file and then run it. part of this can be done in the _Axis_ interface
with axis_remote
(https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flinuxcnc.org%2Fdocs%2F2.8%2Fhtml%2Fman%2Fman1%2Faxis-remote.1.htmldata=04%7C01%7Cralph.stirling%40wallawalla.edu%7Cf83c84f6aef04a4ec2ff08d9f71c97e8%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C1%7C637812524470660244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=7%2BnWb3wRTjW8Si362CY9uJbsgnHLJTD9dYnImd2PaDs%3Dreserved=0
 ) But
I am using Touchy. I was looking for a non gui-specific hook.


atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-usersdata=04%7C01%7Cralph.stirling%40wallawalla.edu%7Cf83c84f6aef04a4ec2ff08d9f71c97e8%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C1%7C637812524470660244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=S3z6c6nXCyup36apd8SB2LvLxvcI1pEpvfc2AWeQxw8%3Dreserved=0


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-23 Thread andy pugh
On Wed, 23 Feb 2022 at 17:58, mar...@r-bechtold.de  wrote:
>
> in the past I programmed single letters as gcode.

Yes, I have done the same thing for numbers to engrave scale rings.

This time I am using F-engrave and a cxf font that I created
specifically for the job at hand.

(CXF is easy, just a set of lines and arcs:
https://github.com/LinuxCNC/simple-gcode-generators/blob/master/engrave/cxf-fonts/normal.cxf
)

(note how this is part of the LinuxCNC code base already)

My questions are around how best to throw G-code at LinuxCNC and have
it do the job. I think I want my Python script to be in charge, ]

The simple option is to just keep overwriting a single file, then
reload that file and run it from the LinuxCNC GUI. But in some ways I
would prefer LinuxCNC to be entirely controlled by the Python script.
That is the part I am asking about. ie how to tell LinuxCNC to load a
file and then run it. part of this can be done in the _Axis_ interface
with axis_remote
(https://linuxcnc.org/docs/2.8/html/man/man1/axis-remote.1.html ) But
I am using Touchy. I was looking for a non gui-specific hook.


atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-23 Thread mar...@r-bechtold.de
in the past I programmed single letters as gcode.

after this i use it to engrave seriell numbers and text in my parts by calling 
that sub routine 

> Am 23.02.2022 um 18:12 schrieb andy pugh :
> 
> On Wed, 23 Feb 2022 at 16:36, Ralph Stirling
>  wrote:
>> 
>> Are you going to engrave one part at a time
> 
> One at a time. Each has a specific front and back (name on the front,
> nickname on the back) so it's important to ensure they  match.
> 
> -- 
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-23 Thread andy pugh
On Wed, 23 Feb 2022 at 16:36, Ralph Stirling
 wrote:
>
> Are you going to engrave one part at a time

One at a time. Each has a specific front and back (name on the front,
nickname on the back) so it's important to ensure they  match.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] F-Engrave and LinuxCNC scripting

2022-02-23 Thread Ralph Stirling
Are you going to engrave one part at a time, or hold them
in some array fixture?

Either way, I would probably have the python script
add preamble and postamble to initialize everything,
and in the second case, add indexing logic to step
from part to part in the array.  G-code variables and
looping make this easy enough, or the python can
do it all and just generate G0 and G1 moves for the
entire array.

-- Ralph

From: andy pugh [bodge...@gmail.com]
Sent: Wednesday, February 23, 2022 8:20 AM
To: Enhanced Machine Controller (EMC)
Subject: [Emc-users] F-Engrave and LinuxCNC scripting

CAUTION: This email originated from outside the Walla Walla University email 
system.


So,  have a spreadsheet of words to be engraved on several dozen
identical parts.

I am pretty sure that I can write a Python script to convert the words
to G-code using F-engrave in batch mode (I have done it from the CL,
so Python parsing CSV would just be a layer on top of that).

But what's the best way to get that G-code in to LinuxCNC and
executed? F-engrave can be used as an input filter, but I don't think
that is useful here.

I think I want to parse together a G-code program using output from
F-engrave, then push that to LinuxCNC (Touchy interface, to make it
more difficult :-)

Thoughts?

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-usersdata=04%7C01%7Cralph.stirling%40wallawalla.edu%7C0d63af9344cd47f17e7008d9f6e89990%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C1%7C637812301154882081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=u6Dbyq1byqGWsbFQ5RYbf7d9wGHx18leac19xj%2FRfrI%3Dreserved=0


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] F-Engrave and LinuxCNC scripting

2022-02-23 Thread andy pugh
So,  have a spreadsheet of words to be engraved on several dozen
identical parts.

I am pretty sure that I can write a Python script to convert the words
to G-code using F-engrave in batch mode (I have done it from the CL,
so Python parsing CSV would just be a layer on top of that).

But what's the best way to get that G-code in to LinuxCNC and
executed? F-engrave can be used as an input filter, but I don't think
that is useful here.

I think I want to parse together a G-code program using output from
F-engrave, then push that to LinuxCNC (Touchy interface, to make it
more difficult :-)

Thoughts?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users