PLCNoob
Member
I am using a bit of indirect addressing and I have always made it a point to check the array size and compare it to the "index" before I execute an instruction with the index tag inside the array. I'm pretty sure it still faults the processor if you try to indirectly reference an array element that doesn't exist. If not a major fault, it will definitely fill up your minor fault log, possibly making other things harder to troubleshoot.
Anyway, the "SIZE" instruction doesn't work on boolean arrays. How can I find out the array size of my boolean array through code? Granted I could hard code it, but then it is up to the diligence of future engineers to realize this indirect addressing is taking place and update this code if the array size is ever changed.
Any suggestions?
Anyway, the "SIZE" instruction doesn't work on boolean arrays. How can I find out the array size of my boolean array through code? Granted I could hard code it, but then it is up to the diligence of future engineers to realize this indirect addressing is taking place and update this code if the array size is ever changed.
Any suggestions?