They are both used.One is used then the other one is below it. Both have conditions before the move function..Trying to learn something new. Never a dull moment.
Thanks
Terry, you didn't say whether you had understood Ken's breakdown of the instruction syntax.
I can put it more simply - anything in square brackets means "get the value of... and use it"...
So, a few examples....
N100:45 is a direct address, element 45 in Integer File 100
N100:[N22:10] is an indirect address to the element number, use the value stored in N22:10 as the element number in Integer file 100, so if N22:10 had the value 19, the
effective address would be N100:19
N[N7:3]:17 is an indirect address to the file number, accesses element 17 in different Integer files. So if N7:3 had the value 33, the
effective address would be N33:17
N[N7:3]:[N22:10] is an indirect address to both the file number and the element number. With the above values the
effective address would be N33:19
I think everyone has just assumed your original posting had a typo where you missed the file type specifier... N[7:162] should have been N[N7:162], which completes the "indirection" by specifying an actual address to read the value from.
When, and if, you move on to the Logix5000 series of processors, ControlLogix, CompactLogix, etc., the square brackets denote access to an element in an Array tag (the nearest equivalent to a PLC5 or SLC data file). As a bonus, the brackets can contain math
expressions which are evaluated to arrive at the effective data location....
eg.
Array[Pointer + 3]
Note : you can't use expressions in Logix5 or 500, only another unique address, as per the examples above.