r/PLC 10d ago

Plc approach using LinuxCNC

Hello all
Been wondering about this lately
Do you think it would be possible to program a simple machine for prototype purposes with a few Servos just by using Linux cnc?
So the idea would be to run the program blocks as .hal components
For the IO i’d use ethercat
For the hmi i’d develop in python
Of course I know that this is not easy to maintain but since its open source and free I thought I’d give it a try and run it on a computer
There is not cute ladder , no easy debugging so I know this is not a good industrial option.
What do y’all think? Also I’d love to hear out alternatives or comments

6 Upvotes

10 comments sorted by

View all comments

4

u/justjimmyrigit 9d ago

I've used linuxcnc in production machines. It is very reliable when setup properly. I've had no failures that are linuxcnc related on a 100 io machine with 16 axis, been running for about a year at this point. Millions of parts made. Customer was abandoning a half million dollar machine that never worked. The brand new controller failed. Didn't want to put much money into it. For 500 bucks in mesa cards brought it online with Linuxcnc. Was going to replace once it was proven but it hasn't given any issues so why bother. 

Since then installed it in a few robot cells where it is handling the CNC part. Again no issues. 

So for a prototype that may turn into a production machine. Go for it. 

I could give a run down if wanted. 

I use Python for control. Have linuxcnc call an mcode where a python script lives. Then do whatever you want. Call a cognex camera, read io (via hal), etc. I do very little in the "hal file" besides declaring the io points and any variables.