PLC Program for Analog Input Sampling