This appears to be a suggested format for reading multiplex analog input cards. They sequence a channel's data into the lower bits of the input and identify the channel using the upper bits of the input word. This loop is reading all 8 channels on the input card. Some of the CPUs will do this multiplexed input automatically in the background not requiring logic.
The analog modules sample logic only does one channel per scan. I can't find this FOR loop using immediate input instructions in the documentations.
As a pure guess the immediate read could trigger the next channel but since it occurs twice I would be skeptical.
Maybe ask on the AutomationDirect forum. https://forum.automationdirect.com/index.php
The OUTX is what moves the channel data based on the channel decode information in X14-X17.
The person who wrote it is trying to hack the PLC into getting all 8 channels in a single scan.
I am fairly sure that this code doesn't work the way that it was intended to since neither Bernie nor I have ever seen it done this way.
fenix - the apparent purpose of the code is to read all 8 channels of the single analog input card in one scan. I don't have the hardware to test the validity of this method.