We cannot see that image; it needs to be attached to the post, using the
button when writing a post in Advanced Mode.
The first operand to that AOI is TagSource; that is the input INT; the first four bits of TagSrouce composw the position (0-15) of the bit to be set in the second operand TagDest.
@daba's is still the best, but here is another in line with the TechConnect approach but more concise:
Code:
MOV 2#1 TagDest
XIC TagSource.3 MUL TagDest 2#100000000 TagDest
XIC TagSource.2 MUL TagDest 2#10000 TagDest
XIC TagSource.1 MUL TagDest 2#100 TagDest
XIC TagSource.0 BTD TagDest 0 TagDest 1 15 OTU TagDest.0
One issue you have is that the conversion from Logix500 has created "Array" tags. In your case "N7" and "N20" and your code is addressing elements #53 and #49 respectively.
Array tags are not easy to work with, so I suggest you create "Alias" tags ...
eg.
INT type "MySource" as an alias to N7[53]
INT type "MyDest" as an alias to N20[49]