g-code replacement filter?

More
13 years 7 months ago #30731 by tjamscad
I would like to have LinuxCNC run a program from multiple different machine programs. We have Fadal, Haas, Fanuc and Simmens conrtols on differnt machines. It would be a great help if I can create a filter/replace file to help with this.

I am still learning all of this so please dont attack me out of the gate. Will this work?

#This is my filter section in .ini
# [FILTER]
# PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
# PROGRAM_EXTENSION = .py Python Script
# png = image-to-gcode
# gif = image-to-gcode
# jpg = image-to-gcode
# py = python
# gcode = gcode-convert

#A typical Fadal line
# N33G00G90G40M01E01
#will be changed to
# N33G00G90G40M01G54
#replace "E01" with "G54" on all lines

#This will change E01 to G54 on all lines.
#!/bin/bash
sed -e 's/\( E01\)\([0-1000000]*\)/ G54\2/' $1

Please Log in to join the conversation.

More
13 years 7 months ago #30738 by BigJohnT
Replied by BigJohnT on topic g-code replacement filter?
Did you see my post for a script to add a W axis to G code. I'd think you could use a similar program. I don't know anything about sed...

John

Please Log in to join the conversation.

More
13 years 7 months ago #30739 by tjamscad
Replied by tjamscad on topic g-code replacement filter?
No , John I have not seen it. Please send me to the link.

Please Log in to join the conversation.

More
13 years 7 months ago #30742 by BigJohnT

Please Log in to join the conversation.

More
13 years 7 months ago #30745 by tjamscad
Replied by tjamscad on topic g-code replacement filter?
Thanks, Jon

Could this be made to run in the background while a machine is running a program? Ultimate goal would be for this to run while a program is being run.

Please Log in to join the conversation.

More
13 years 7 months ago #30749 by andypugh
Replied by andypugh on topic g-code replacement filter?

tjamscad wrote: Could this be made to run in the background while a machine is running a program? Ultimate goal would be for this to run while a program is being run.

I think you will find that the filter runs so fast that there is no point. Effectively you feed Axis one program, and a filtered one gets run.

Please Log in to join the conversation.

More
13 years 7 months ago #30786 by tjamscad
Replied by tjamscad on topic g-code replacement filter?

andypugh wrote:

tjamscad wrote: Could this be made to run in the background while a machine is running a program? Ultimate goal would be for this to run while a program is being run.

I think you will find that the filter runs so fast that there is no point. Effectively you feed Axis one program, and a filtered one gets run.


Andy,

Just so I am clear. I load a program into axis or what ever GUI. The program that will run will be the filtered one? Or do I need to run the filter outside and then load the filtered program?

Please Log in to join the conversation.

More
13 years 7 months ago #30788 by cmorley
Replied by cmorley on topic g-code replacement filter?
The Gcode will be automatically filtered and sent to the GUI.

Technically the filter runs and sends it's output to AXIS or Gscreen.

Chris M

Please Log in to join the conversation.

More
13 years 7 months ago #30797 by andypugh
Replied by andypugh on topic g-code replacement filter?

tjamscad wrote: I load a program into axis or what ever GUI. The program that will run will be the filtered one?

Yes.

As an example, try running the sim/axis configuration in the sample configs then open an image file (jpg, png) instead of a G-code file. You will see that you end up with G-code in the program window, not image data.

Please Log in to join the conversation.

More
13 years 7 months ago #30843 by tjamscad
Replied by tjamscad on topic g-code replacement filter?
Great, so how do i tell LinuxCNC to use this filter program? Will it just know?

Please Log in to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum