This document describes a priority control program for a PLC using ladder logic with two input signals. When input X0 turns on first, output Y0 will turn on through coil R0, while also disconnecting contact R0 so that input X1 cannot turn on output Y1. If input X1 turns on first instead, only output Y1 will turn on through coil R1, and output Y0 will remain off. The ladder logic provides priority output to whichever input signal turns on first.