I tried posting the following to a five year old thread on the same subject but it didn't show up. Just putting this out there for other people searching the same problem:
I know I'm committing necromancy here but this post just solved a problem that's plagued my mill for 3 damn years. Whenever the homing switches were plugged into my G540 I couldn't jog in X without tripping an "External estop requested" message. All of the replies about people plagued with this problem say the same thing: you definitely need shielded cables and proper grounds, so I spent dozens of hours and hundreds of dollars rewiring everything to no avail. The problem: when I setup mach3, I conflated my physical g540 estop switch with mach3's estop input. Previously the only way to run my mill was to physically disconnect the homing switch cable, but by disabling estop as an input (actually: setting it to an incorrect pin because mach3 won't let me disable it) the problem was instantly eliminated. Homing works perfectly and zero erroneous estops.
So to anyone else, I say: before you buy new parallel extension cables, new stepper extension cables, crimping tools and hardware, terminal blocks, double shielded switch cables, a new meanwell power supply, and g16 plugs for everything, or call gecko support, just try disabling mach3's estop by setting it to pin 16 since it won't freakin' save the disabled "X".