Xybernetics RSLogix5 Common Mistakes Using AFIThis article is going to be a short and specific one. Its utilizing AFI instruction with coils in multiple rungs. This is one gotcha that can get programmers stuck in a hamster wheel.

Notice how the coil O:2/6 is de-energized even when the shut I:1/12 is energized

Xybernetics RSLogix5 Common Mistakes Using AFI

This de-energization coil O:2/6 is due to the rung below which is AFI’ed (Always Fault Instruction). Debugging this can get even more tricky if the two coils are in difference ladder (RSLogix 5 and 500) or task (RSLogix 5000).

The best way to write this ladder logic would be this way.

Xybernetics RSLogix5 Common Mistakes Using AFI

I hope this article helps all out all the fellow PLC programmers out there.