Teach-in? Program Generation

More
15 Nov 2012 19:26 - 15 Nov 2012 19:28 #26617 by lisandromassera
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.

Thanks
Lisandro
Last edit: 15 Nov 2012 19:28 by lisandromassera.

Please Log in or Create an account to join the conversation.

More
15 Nov 2012 22:00 #26624 by andypugh

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.
linuxcnc.org/docs/html/gcode/gcode.html#sec:G38-probe
www.linuxcnc.org/docs/2.4/html/gui_halui.html#sub:MDI

Please Log in or Create an account to join the conversation.

More
16 Nov 2012 00:47 #26634 by ArcEye
Replied by ArcEye on topic Teach-in? Program Generation
Hi

Have a look at this thread too.
www.linuxcnc.org/index.php/english/forum...ory-log?limitstart=0

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

regards

Please Log in or Create an account to join the conversation.

More
21 Dec 2012 21:47 #27921 by lisandromassera
Thanks for the replies. After looking at them and fiddling a little I came up with a program wich better suit my needs. I attach it in case anyone is interested. It is a HAL module with an input pin which appends to a file the actual position when the input is TRUE. It is intended to be used with an edge detector to trigger it.
I use it with a button on my joypad.

Thanks
Lisandro

Please Log in or Create an account to join the conversation.

More
29 Dec 2012 08:46 #28140 by Dimitrios
Lisandro,

I am interested in the program.

Regards,

Dimitrios

Please Log in or Create an account to join the conversation.

More
29 Dec 2012 18:22 #28145 by ArcEye
Replied by ArcEye on topic Teach-in? Program Generation

.....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

regards
The following user(s) said Thank You: lisandromassera

Please Log in or Create an account to join the conversation.

More
29 Dec 2012 19:47 #28149 by BigJohnT
I changed the file limit to be the same as the photo limit 1600k.

John

Please Log in or Create an account to join the conversation.

More
30 Dec 2012 08:12 #28175 by lisandromassera
I did not realize the file wasn´t attached. I will post it on wednesday when I have access to the computer with LinuxCNC again.
Happy new year!

Please Log in or Create an account to join the conversation.

More
04 Jan 2013 21:00 #28375 by lisandromassera
Attached is the program. You have to remove the .txt extension leaving the name techin.py.
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.
Attachments:

Please Log in or Create an account to join the conversation.

More
05 Jan 2013 17:14 #28396 by cncbasher
could you repost the attachment , it would appear to be not found 404 error

Please Log in or Create an account to join the conversation.

Time to create page: 0.318 seconds
Powered by Kunena Forum