Thanks guys....I got it:site:
Two words for you: Bounds Checking.
Do it, or your PLC dies.
It won't fault if it points beyond the specific data table (which is a bad thing to allow - usually*) but it will if it would point beyond the last data table.
* exception example - We had a need for 1000 integers in a row addressable by a single indirect. We created 4 250 element 'N' data files and did the indirect relative to the first one. E.g. we created N20 through N23. The addresses were used as N20:[0] through N20:[999]
Clever. I'm not sure that I would have tried that, but it is good to know.
I nailed a Logix5k when I forgot to follow my own advice. I was accessing the most recently created data structure, so it most likely was the last data table.
@PLC Pie Guy: It can, and I have the scars to prove it...
I suppose you are suggesting that the controller will suffer a recoverable fault. One that may require manually clearing the fault or worst case, require a download of the program. You are not suggesting that the PLC will become junk, are you?
No, none of that. It will just (just...) stop your PLC, and the process that it is running at the time.
Clearing the fault, editing your code so it won't happen again, and then restarting the PLC and the process, will get you going again.
Thanks guys....I got it:site: