Hi,
Must admit, I have no idea what the program is coded to do - but here’s what I think each rung does.....
Rung 49 is IF comparisons:
If S0165 isn’t equal to 3999 ———— If S0165 is equal to S0217——- energise coil 0010-07
So these are comparing registers to each other, in the first comparison you are checking if S0165 is not equal to 3999, then in the second comparison you are checking if S0165 is the same value as S0217. If both IF comparisons are true then the rung output coil (0010-07) is energised
Rung 50 is a LET instruction - like Allen Bradley MOV
Let S0217 = S0165
So here the value in S0165 is moved into S0217
Rung 51 is a Matrix LET.
If the coil of 0010-07 is energised the LET instruction will execute.
As above LET is like a MOV instruction, but in this case it’s moving a matrix. The size of the matrix (SIZE) is 5 and the Pointer (PNTR) is register S0200 (the ^ prefix means it is a repeating function)
In some Matrix Let instructions the pointer value can be used to single out specific registers within the matrix to move - this is done by writing a 1, 2 , 3 etc into the pointer register to make the 1st 2nd or 3rd etc register move. With the repeat function active, the pointer value will move all the registers in the matrix. There is also a transitional version (one shot) and incremental (cycles through each register in the matrix one offer the other per scan)
When the repeat function is active the code will allow the move to execute when the pointer value is 0. As soon as the instruction completes the pointer value will equal the size value, and the instruction won’t execute again until you drive a zero to the pointer value.
The M prefix to the register just shows it’s a matrix of registers (S prefix) - and the starting address
In your example you need 0010-07 to be energised, and S0200 to be a value of zero then the move will transfer the 5 registers S0202, S0203, S0204, S0205 & S0206 to the following registers S0201, S0202, S0203, S0204 & S0205
Somewhere else in the code there will probably be a LET instruction where a zero os moved to S0200 to make the instruction operate again?
Rung 52 is another LET instruction
When 0010-07 is energised the value in S0165 is moved into S0206.
Does the above help in any way?
Andy