Teach-in? Program Generation
lisandromassera wrote: Hello. I am finishing building a 5 axis milling machine for cutting plastics. I was intending to make the program "manually", by jogging the cutter to the positions and taking note of the position. I have a playstation-like joystick for the jogging. The problem is that at aproximately a thousand positions per part, 5 coordinates per position, it will take me a long time to create each program. I was wondering if there was a way to use a button in the joystick to automatically append a position to a program, or if anyone could give me advice as to were to start making the change to axis.
There is a program called teach-in.py which is part of LinuxCNC, though I am not entirely sure what it does.
If it isn't what you want, then you might be able to use the probing functions. That can write positions to a file. The trick is to make your joystick button start a probe move and log the point.
It might be possible to have button-down start a probe at zero speed using MDI_COMMAND and end the "probe move" on button-up.
Have a look at this thread too.
It never got fully developed because it served its purpose for what I needed, but has the basics of a teaching / logging program (last post).
At present it logs co-ordinates whenever the button is pressed and then generates a gcode file which goes to those points and performs a pre-defined action, in this case peck drilling a hole.
Dewey showed an idea regards implementing similar in ngc-gui also
I use it with a button on my joypad.
.....I attach it in case anyone is interested....
The forum will only accept certain file extensions and has size limits.
Since the upgrade it no longer errors and just does not attach anything, with no explanation given.
The best options are usually to change the extension to .txt if it is a script or if several items create a .zip which can be up to 500K
Once you run the program with linuxcnc running, you should have a hal module named memorizador, with a pin named memorizar. It appends the current cartesian position to a file named memorizado.txt whenever the pin is driven high. Since it runs on a fast cycle, the pin should be driven by a flank detector.