与一台老旧设备(Fanuc 0M)的沟通挣扎
My Struggles Talking to an Old Piece of Junk (Fanuc 0M)

原始链接: https://3nt3.de/blog/fanuc-0m-rs232-struggles

今年二月,我购入了一台二手 Hermle UWF 851 立式加工中心,配备 Fanuc 0M 控制器。从桌面级 3D 打印转向工业级机床的学习曲线十分陡峭,再加上需要升级车间电力设施以满足 63A 的电流需求,过程更是复杂。 机床通电后,伺服报警和变速箱传感器故障等问题接踵而至,令我困扰不已。通过反复的试错与对电路图的研究,我最终通过 MDI 面板实现了基本的稳定运行。 我的主要目标是通过 RS232 串口导入 CAM 程序,但这比预想中更困难。在尝试了各种线缆和转接器却屡屡失败的数月后,我终于利用特定的硬件建立了连接并接收到了数据,随后我编写了一个 Rust 工具对这些数据进行了解析。尽管目前仍在排查“086 P/S”报警以实现双向通信,但成功接收数据已是一项重大突破。如今,我感觉离将该机床完全融入工作流程更近了一步,也因此避免了进行彻底的 LinuxCNC 改装。

``` Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 与一台旧设备(Fanuc 0M)打交道的苦恼 (3nt3.de) 4 分,由 rmoriz 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请加入 YC | 联系 搜索: ```
相关文章

原文

This February I became the proud owner of an old Hermle UWF 851 vertical machining center. An industrial CNC mill with tool changer and everything. I already had a FoxAlien Masuter Pro (which seems laughable in comparison) and a lot of 3D-printing experience so I knew GCode. The workflow I was used to was to draw things up in CAD, do CAM (or slicing for 3d-printing) post-process them somehow and load them onto the respective machines. I knew the Fanuc 0M theoretically had the capability to get programs from a serial port with a DB25 connector on the side of the control cabinet but because I bought the machine without ever seeing it running I had no idea how to actually do that. Or how to use it in general lol.

It took months to get the machine running. Not because it was in broken in some major way but because I had literally never worked with an industrial machining center so I had to learn everything from scratch. Also we first had to redo all of the electrics for our workshop because the landlord had promised us “some kind of three-phase” but it turned out that was 16 amps max and the breaker tripped 70 % of the time starting the machine. We ran a twenty meter 5×16² cable through an apartment and the hair dresser next door and finally had 63 A at our disposal.

So the machine finally turned on reliably and all axes moved fine. Phew. After this achievement, a time of immense pain came over me. Alarms. So many alarms.

1002 CIRC. BR. 3PH. MOT  
400 SERVO ALARM OVER LOAD  
414 SERVO ALARM X AXIS DETECT ERR  
424 SERVO ALARM Y AXIS DETECT ERR  
434 SERVO ALARM Z AXIS DETECT ERR

It yelled at me, seemingly at random too. Through trial and error, reading the incomplete documentation and THANKFULLY included schematics, we kind of figured out possible things to cause the 1002 spindle alarm (the limit switches being flaky → the emergency stop tripping somehow) and now it only comes back every now and then and is fixed by restarting the controller twenty times or waiting eight hours. Other alarms we encountered were the gear change alarm, which is caused by coupling from the gearbox to the sprockets attached to the motors controlling it being loose and having to be tightened and then turned away from the cams so the controller tries to re-home it after powering on.

Now the machine runs pretty reliably, we can write programs on the MDI panel and run them. What doesn’t work is the feature I was most hopeful for: the serial port so I could load CAM programs. I’m not terrible at writing GCode but certainly not adequate for most things I wanted to machine. It seemed trivial: I got a DB25–DE9 null-modem adapter cable, an RS232–USB adapter and a null-modem adapater. That didn’t work at all. No data transmitted in either direction. This kind of drove me insane. I tried three different adapters, null-modem or straight cables, different operating systems, everything. I skimmed thousands of pages of manual only to find the relevant section gone. I was pretty close to giving up, throwing the whole control away and retrofitting the machine with LinuxCNC when, in an act of desperation I bought another two adapters from Amazon. Here’s a list of the adapters that ultimately worked for futre reference:

I was very happy to receive my first program (although in a weird format I had never seen before).

And got to writing a quick rust transpiler decoding the EIA (?) format.

What still doesn’t work is sending data to the machine but that should not be a big challenge, now that I have established the serial chip is not literally broken. When I try to receive a program by pressing INPUT I get this

086 P/S ALARM

Which, according to the manual means the machine did not see a DR signal. I’ll see if I can configure that somehow with my adapter or need to hard wire it.

联系我们 contact @ memedata.com