Detectives.....
mordred:
The text you posted is from the Help file on the FLL instruction. I thought that the discussion was about MOV.
The '#' symbol in any instruction means that the address is indexed. That is, the value in S:24 will determine how many registers offset from the base address will be used when the PLC gets/puts the data in the register.
Some instructions, such as COP, FLL, SQO, FAL, DDT (i.e., any instruction that requires you to enter a "Length"), co-opt S:24 for their own internal bookkeeping. The instructions initialize S:24 to zero (or R6:xx.POS, if used) and perform its task. Without advancing in the scan, it then increments S:24, checks to see if it exceeds the length (or R6:xx.LEN), and does it's function again, and repeats until the length is reached.
Therefore, the instruction
FLL #N7:0 #N10:0 10 is functionally equivalent to
COP #N7:0 #N10:0 10. The value in N7:0 will go into N10:0, N7:1 to N10:1, and so on up to N7:9 going into N10:9.
On the other hand
FLL N7:0 #N10:0 10 (without the '#' in the source) will populate all of N10:0 through N10:9 with the same value (N7:0). This is its intended function.
Now, you CAN do something like
MOV #N7:0 #N10:0 (with #'s in front of either/both of the Source and/or Destination), but what happens is that you may not have control over S:24. If it still had a value of 10 (from when the above FLL instruction left it), then you would be getting a move, not of N7:0 into N10:0, but of N7:9 into N10:9.
If Greg Webb has the #, that could be why his "move instrution (sic)doesn't move the number."
Note that he said:
I can put the number in the file and it works.
If I make the rung go true the move instrution doesn't move the number.
If he can put the number in, then nothing is overwrtting the MOV.
That means that either the thread's tangent accidentally but accurately diagnosed the problem (rogue '#' symbol), or the logic isn't being scanned (most probable).
There are four ways that logic isn't scanned:
- No JSR to the subroutine that the logic is in (discussed)
- MOV logic is between a JMP and a LBL, and the JMP instruction is true;
- MOV logic is between two MCRs, and the logic on the first MCR is false;
- The PLC is in program mode (on second shift, you never know).