PLC Field Notes

by Paila — Mitsubishi & Keyence troubleshooting from the factory floor

How I Finally Built a Galaxy-Compatible IKEv2/IPsec VPN with strongSwan on Ubuntu

This is not a PLC topic. I am writing it down because I had failed at this setup once before, then succeeded this time by using AI to work through the failure step by step. The final result is an IKEv2/IPsec VPN server on Ubuntu that works with the built-in VPN client on a Samsung Galaxy. The phone connects without a separate VPN app, receives a private VPN address, reaches the home LAN, and sends normal internet traffic through the home connection. ...

August 21, 2026 · 11 min · Paila

What Happened the First Time I Asked AI to Write a GX Works3 PLC Program

The first file did not even reach the logic test. I asked AI to write a small training program for GX Works3. It was a six-stage north-south and east-west traffic-light sequence, designed for a nominal 40-second cycle at the default 100 ms low-speed timer setting.[2] The target was GX Works3 1.125F, and the project header said RCPU R32. I kept that string as a header value. I did not turn it into the physical CPU model name R32CPU. ...

August 5, 2026 · 5 min · Paila

MR-J4 Multi-Axis Servo Commissioning: 9 Wiring and Setup Mistakes I Actually See (AL.16, AL.50/51, E6.1, AL.25)

Most MR-J4 alarms on a brand-new machine aren’t broken drives. They’re wiring done in a hurry. Commissioning is where every shortcut in the install comes due at once, and the same handful of mistakes turn up job after job. This post collects the nine I keep seeing on multi-axis servo systems, the alarm or symptom each one throws, and the check that catches it before it costs you a shift. ...

July 24, 2026 · 10 min · Paila

MR-J4 Servo Alarm 50 / 51 (AL.50 / AL.51) – Overload 1 and 2: Cause and Fix

AL.50 and AL.51 are the MR-J4’s overload protection alarms. The amplifier saw too much current for too long and shut the axis down to protect the motor and itself. Overload has more possible causes than any other alarm I deal with, so this post doesn’t try to list them all. It gives you the four cases I actually hit, and one habit that sorts them fast: read the shape of the load curve. ...

July 24, 2026 · 10 min · Paila

MR-J4 Servo Alarm 25 (AL.25) – Cause and Fix

AL.25 means the servo amplifier lost the absolute position data of the encoder. The machine no longer knows where its axis is, so it refuses to run until you restore the data and re-home. It almost always comes down to the encoder battery. Quick fix (TL;DR) Check the battery (MR-BAT6V1SET) and encoder cable — replace or reseat if either is suspect. Switch control power off, wait until it’s fully discharged (display/charge lamp dark), then back on — this deactivates AL.25. Perform a home position return (homing) before running the machine. If the alarm comes back after every power-off, the battery or encoder cable is the problem, not the data. ...

July 23, 2026 · 5 min · Paila

MR-J4 Servo Alarm 16 (AL.16) – Encoder Initial Communication Error: Cause and Fix

AL.16 means the servo amplifier could not establish initial communication with the motor’s encoder at startup, so it stops before the axis can run. On the floor, the cause is almost always the encoder cable, not a failed drive. Either the cable is bad or it’s wired wrong. Quick fix (TL;DR) Suspect the encoder cable first. Check the connector seating at both the CN2 (amplifier) end and the motor end, and look for crushed or cut sections along the run. On a multi-axis machine, confirm the cable goes to the right motor. If an encoder cable was crossed onto the wrong axis during install, that axis throws AL.16. The drive is talking to the wrong encoder, or to none. Temporarily lay in a spare encoder cable and test with it. This is the fastest way to confirm a cable fault. If AL.16 clears on the temporary cable, the original cable was the problem. Switch control power off and back on after any wiring change. This is the only way to clear AL.16. Alarm reset and CPU reset will not clear it. If AL.16 came up on a machine that ran fine yesterday, don’t start by suspecting the drive. Start with the cable. ...

July 23, 2026 · 8 min · Paila

MR-J4 Warning E6.1 – Servo Forced Stop (EM2): Cause and Fix

E6.1 means the servo amplifier sees its forced stop input as open, so it holds the motor in a stopped state and refuses to run. On a fresh install it almost always comes down to one thing: the forced stop input is enabled by default, but nobody wired it. Quick fix (TL;DR) If your machine has a real emergency-stop circuit, wire the EM2 forced stop input to CN3-20 (MR-J4-A general-purpose interface; pin differs by model/interface) so the input is satisfied — this is the correct fix for any machine that needs a functioning E-stop. If you are not using the amplifier’s forced stop input at all, set PA04 digit 2 (*AOP1) to Disabled in MR Configurator2 and cycle power. E6.1 is classified as a warning, but make no mistake — the axis will not run while it is active. It self-clears: once the input condition is satisfied (or the check is turned off), it disappears and the axis can run. If E6.1 comes back after you think you’ve wired it, the input isn’t actually being pulled to the ON state — check the wiring and the 24 V supply, not the parameter. ...

July 23, 2026 · 7 min · Paila