Can linuxCNC be (easily) made to send commands over ethernet to my CNC machine?

More
3 years 4 months ago #273909 by rodw
Just to clarify, the Linuxcnc PC is the motion controller so it works in real time. In other environments that use Windows that cannot be real time, the motion controller is often another hardware device connected by Ethernet or USB. So a copy of Linuxcnc must be at the machine.

You should be able to run a service in the Linuxcnc controller that receives your protocol commands and convert it to the relevant NML commands much like a Linuxcnc GUI does.

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

More
3 years 4 months ago #274059 by mlw19mlw91
Have I missed a stupidly simple option?  Not sure on best course of action.  Python sounds usable for me.  

I should mention that the DNC interface may not necessarily be suitable for direct control of the mill, as that may use a slightly different protocol.  The DNC protocol document does seem to describe parts of the packets I captured, but in some manuals, they seem to suggest that the DNC machine still requires the front-end windows PC.  Some of the manuals from EMCO are saying different things but not explicitly.  Some seemed to suggest that the instructions themselves were sent directly to the back-end pc, while others suggested that the g-code was interpreted on the front-end PC then sent to the backend pc in simpler instructions, such as "axis X 1 step positive direction", etc.  This theory would kindof make sense with the interchangeable controls.  For example, Fanuc, siemens, and Heidenheim all use slightly different flavors of g-code, no?  It seems unlikely to me that all different flavors of g-code would be processed differently on the back-end pc.  I think it would make more sense that the g-code is interpreted on the front-end pc then sent as simpler instructions to the back-end pc.  So I was thinking that I could use linuxcnc to send a packet commanding the correct axis one step at a time.

So I've been told that this is a possibility, but not sure it's necessary or worthwhile:

To make LinuxCNC output raw binary data over Ethernet TCP, you can use the Remote Machine Interface (RMI) feature of LinuxCNC. RMI allows you to exchange data between LinuxCNC and external programs or devices using a TCP/IP connection.Here are the steps to configure LinuxCNC to output raw binary data over Ethernet TCP:

  1. Ensure that you have LinuxCNC installed and running on your machine. Make sure your LinuxCNC configuration and machine setup are properly configured and operational.
  2. Create a custom component in LinuxCNC's configuration. A component is a module that handles data exchange between LinuxCNC and external programs/devices. You'll need to write a custom component that can handle the raw binary data output.
  3. Write the custom component using the HAL (Hardware Abstraction Layer) language. HAL allows you to define custom connections, signals, and functions for data exchange within LinuxCNC. In your custom component, you'll define an output signal that represents the raw binary data.
  4. In your custom component, use the
    Code:
    netout
    function to send the raw binary data to the TCP/IP connection. The
    Code:
    netout
    function allows you to send data to a remote program or device over TCP/IP.
  5. Configure the TCP/IP connection settings in your custom component. Set the IP address and port number of the remote program or device that will receive the raw binary data.
  6. Load and run your custom component within LinuxCNC. You can do this by adding the custom component to your LinuxCNC configuration file or using the LinuxCNC command-line options.
  7. Start the remote program or device that will receive the raw binary data over TCP/IP. Make sure it is listening on the specified IP address and port number.
  8. Once both LinuxCNC and the remote program/device are running, LinuxCNC will output the raw binary data over the TCP/IP connection. The remote program/device can then receive and process the data as per your requirements.
Note that implementing a custom component for raw binary data output requires programming skills in the HAL language. It's recommended to refer to the LinuxCNC documentation and resources for detailed guidance on writing custom components and working with the RMI feature.

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

More
3 years 4 months ago #274066 by tommylight
DNC,
www.cnccookbook.com/dnc-software-machine-monitoring-free-rs232/
-
Personally, i would retrofit it and have a normal machine.
That is an old and very not reliable way of running machines, so i would promptly get rid of it.
Not helping, am i ? :)

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

More
3 years 4 months ago #274067 by Aciera

So I've been told that this is a possibility, but not sure it's necessary or worthwhile:

Where did you get this from? Is this the result of some Chat GPT query?
I've never heard of such a 'Remote Machine Interface' feature. 

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

More
3 years 4 months ago - 3 years 4 months ago #274070 by mlw19mlw91

Aciera post=274067 userid=25994
Where did you get this from? Is this the result of some Chat GPT query?
I've never heard of such a 'Remote Machine Interface' feature. 


^ correct lol. If that's the case it's not the best "search engine".  I mean it basically just scours the internet and pieces together what it finds in a coherent way.
Last edit: 3 years 4 months ago by mlw19mlw91.

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

More
3 years 4 months ago #274077 by Aciera

I mean it basically just scours the internet and pieces together what it finds in a coherent way.

You got that right.

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

Time to create page: 0.135 seconds
Powered by Kunena Forum