custom m codes and bar puller set up
26 Jan 2023 20:48 - 26 Jan 2023 20:51 #262959
by Becksvill
custom m codes and bar puller set up was created by Becksvill
hey everyone
when setting up my cnc lathe bar puller i noticed that there wasn't much info on setting custom m codes connected to ladder in linuxcnc
so just making a post here about it to help the next guy
there are several bits you need to set up
and i will just add screen shots from my machine as i am typing on the lathe now.
first up is the config folder file
i think that is matters that the ngc file is lower case and the ini file setting options are uppercase. just copy exactly and it works
then the ini settings file with relevant stuff highlighted
this is the line of code you need to add to connect the motion g code output pin to classicladder
net chuck-auto-clamp motion.digital-out-02 classicladder.0.in-05
the "chuck=auto-clamp" is just a signal name and doesn't matter it could be called "your-sensor-name"
and this is what the ladder logic looks like. just a note to make, this ladder logic is not very good and don't bother copying it lol
i am just trying to show the connections required to make this work in the ini file and in the hal file.
this bit below is pretty important. if you don't set this then it just won't work and you will have no idea why
you need to set the file permissions for the g code files
and finally the gcode file itself
make sure the bit inside quote marks "o<m400> sub" and "o<m400> endsub" is exactly copied in the file
hopefully this helps someone
i am going to try run a production job today bar pulling and will add to this thread and hopefully show how powerful linuxcnc is
when setting up my cnc lathe bar puller i noticed that there wasn't much info on setting custom m codes connected to ladder in linuxcnc
so just making a post here about it to help the next guy
there are several bits you need to set up
and i will just add screen shots from my machine as i am typing on the lathe now.
first up is the config folder file
i think that is matters that the ngc file is lower case and the ini file setting options are uppercase. just copy exactly and it works
then the ini settings file with relevant stuff highlighted
this is the line of code you need to add to connect the motion g code output pin to classicladder
net chuck-auto-clamp motion.digital-out-02 classicladder.0.in-05
the "chuck=auto-clamp" is just a signal name and doesn't matter it could be called "your-sensor-name"
and this is what the ladder logic looks like. just a note to make, this ladder logic is not very good and don't bother copying it lol
i am just trying to show the connections required to make this work in the ini file and in the hal file.
this bit below is pretty important. if you don't set this then it just won't work and you will have no idea why
you need to set the file permissions for the g code files
and finally the gcode file itself
make sure the bit inside quote marks "o<m400> sub" and "o<m400> endsub" is exactly copied in the file
hopefully this helps someone
i am going to try run a production job today bar pulling and will add to this thread and hopefully show how powerful linuxcnc is
Attachments:
Last edit: 26 Jan 2023 20:51 by Becksvill. Reason: upper and lower case issues in gcode files
Please Log in or Create an account to join the conversation.
27 Jan 2023 02:33 #262972
by spumco
Replied by spumco on topic custom m codes and bar puller set up
Thank you - just the sort of 'pro' stuff we need.
Adding a parts counter display with total/desired/completed would be sweet.
Same for a 'pause every xxx number of parts' feature for forced QC check.
I think Feral Engineer had a vid on YT touching on parts counters - can't remember if he explained the whole setup though.
Lathe + bar puller + parts catcher + parts counter = $ka-ching$
Adding a parts counter display with total/desired/completed would be sweet.
Same for a 'pause every xxx number of parts' feature for forced QC check.
I think Feral Engineer had a vid on YT touching on parts counters - can't remember if he explained the whole setup though.
Lathe + bar puller + parts catcher + parts counter = $ka-ching$
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19205
- Thank you received: 6437
27 Jan 2023 02:49 #262973
by tommylight
I have one.
Replied by tommylight on topic custom m codes and bar puller set up
Where i live, that is a 4 ton paper weight!Lathe + bar puller + parts catcher + parts counter = $ka-ching$
I have one.
Please Log in or Create an account to join the conversation.
Time to create page: 0.186 seconds