The example below is very generic. It assumes that TOD has been set in the PLC. It will MOVE the contents of the IN pin to the OUT pin for the entire minute that %SW51 is equal to IN2. Also note that %SW51 might not be local time depending on the CPU configured.