Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting LINUXCNC to physical CNC machine using AWLSIM #31

Closed
MichaelWoodc opened this issue Jun 17, 2021 · 6 comments
Closed

Connecting LINUXCNC to physical CNC machine using AWLSIM #31

MichaelWoodc opened this issue Jun 17, 2021 · 6 comments
Labels

Comments

@MichaelWoodc
Copy link

I am admittedly having a hard time with this part! I am not sure where to go next but other than AWL file issues I think this is my last hurdle.

Map1

Do I need some commercial ethernet to PLC hardware? The machine uses RS485 in particular, and I have all sorts of adapters.

Also is there some slack channel for forum we can use for support / documentation?

@mbuesch
Copy link
Owner

mbuesch commented Jun 17, 2021

Thanks for your question.

I'm afraid I can't really answer your question with the information at hand.
How you connect your machine power stages to LinuxCNC + AWLSim fully depends on what actual hardware you have available.
So what hardware does your machine offer? What is the interface of the hardware you have?

@MichaelWoodc
Copy link
Author

The hardware has a DB9 interface and it was connected to the original PC via an RS485 ISA slot card. The DB9 connector goes straight into the axis controller. At first I thought it was profibus, and profibus is mentioned one time in the manual, however, some of these also seemed to use siemens 840 hardware, and I'm pretty sure this EMCO pcmill 50 uses something similar. The machine is setup with an AWL file.

So I see the linuxCNC example, how how do I get the respective commands into the DB9 port of my CNC? What would be kindof a flowchart of software to hardware ending at the DB9 connector of the CNC machine?

I assume:
LinuxCNC
Custom HAL & INI files
Server on linuxcnc pc
client on raspberry pi
rs485 interface somehow
cnc machine

@mbuesch
Copy link
Owner

mbuesch commented Jun 17, 2021

Ok, well.
The most important thing now would be to definitely find out what that DB9 port really is. What standard. What protocol it talks.
Then the second most important thing would be to figure out a way to have LinuxCNC talk to that port.
I can't really help with both of these points and these points are not really subject to Awlsim.

Awlsim comes into play much later. Before you think about Awlsim, you basically need to get the hard realtime components working (e.g. the axes and joint drives). That is: Get LinuxCNC basically working with your machine.
Then you can think about how to control the whole not-hard-realtime rest of the machine from Awlsim (e.g. coolant, lubrication, hard limit switches, ... whatever else).

@MichaelWoodc
Copy link
Author

One thing that leaves me slightly confused about that is that the axis controllers are detailed in the AWL file, and I'm not looking to perform much realtime functions like rigid tapping for example.

I was under the impression that the whole machine was controlled by parameters listed in the AWL file and thus AWLSIM could use a slightly updated AWL file to be the only control to the machine.

When I analyzed the protocol it seemed to be profibus at first, but the machine uses AWL files which to me was rather confusing

@mbuesch
Copy link
Owner

mbuesch commented Jun 17, 2021

One thing I forgot is:
It is important to first understand how LinuxCNC works (especially the LinuxCNC HAL) before trying to understand how to connect Awlsim to LinuxCNC.
The interface between LinuxCNC and Awlsim is the LinuxCNC HAL configuration. All communication between Awlsim and LinuxCNC runs through HAL signals.

Awlsim includes a fully functional LinuxCNC simulation example.

@mbuesch
Copy link
Owner

mbuesch commented Jun 17, 2021

One thing that leaves me slightly confused about that is that the axis controllers are detailed in the AWL file, and I'm not looking to perform much realtime functions like rigid tapping for example.

The realtime behavior of tapping would only be directly controlled by the LinuxCNC motion controller.
Awlsim is not directly involved in the axis/joint movements.
That's similar to a commercial CNC controller. The motion controller of a commercial machine is separate from the machine's PLC. The PLC does not directly control the power stage (e.g. the servos).

I was under the impression that the whole machine was controlled by parameters listed in the AWL file and thus AWLSIM could use a slightly updated AWL file to be the only control to the machine.

Yes. HAL signals can be written and read from Awlsim. These HAL signals can be connected to lots of functionality in LinuxCNC. Please read the LinuxCNC integrator manual and the HAL manual first.

@mbuesch mbuesch closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants