There are four inputs and three outputs for the SHIFTL_WORD instruction.
The top input is boolean logic flow and is the enabling logic. When true, the shift is performed. Unless you want the shift to be performed every scan, make sure this input is a one-shot.
The input labeled "IN" is the address of the starting point of the range of bits to be shifted. If you leave the value inside the function at its default setting of 1, the range of the shift is 16 bits starting at the address specified at "IN". A value of 2 inside the box sets a range of 32 bits, etc.
The input labeled "N" wants numeric data. It is the number of places to shift each time the enabling logic is true. Most of the time this value is 1.
The input B1 is boolean. When true, you shift a "1" into the bit array. When false, you shift in a "0".
The "Q" output is the starting address of the shifted bits. In the OP's case it should be the same address as the "IN" input.
The B2 output is optional and boolean. It is true if the bit shifted out is true. It won't be of any use in the OP's case since he's only interested in the value two positions downstream.
If the OP uses a SHIFTL_WORD instruction with a length of 1 and address %M0017, then %M0019 will represent the presense or absense of a part at the stamping nest. Note that the starting address needs to be on a byte boundary, %M0001, %M0009, %M0017, %M0025 etc.
Thanks for the explanation. Cleared up a lot of confusion for me.