celichi
Lifetime Supporting Member
create an IO module that does not physically exist.
create an IO module that does not physically exist.
That will fault a CompactLogix but not a ControlLogix.
L33 is compact.
I am pretty certain that this is not always true - if the array is part of a UDT-scoped tag, and there is something after the array in the UDT, then the "out-of-bounds" crash doesn't work.
Indexed instructions simply check that the destination address calculated is consistent with the tag size, meaning the UDT tag, not the array "member".
Could you share a sample of that? We have the same issue as many of the lines are very similar but not exactly the same and sometimes people download the wrong program to the wrong controller and it's close enough that most times it works until we find 1 or 2 small operations are not working and by then sometimes we have ran a lot of bad production that has to be scrapped.
Could you share a sample of that? We have the same issue as many of the lines are very similar but not exactly the same and sometimes people download the wrong program to the wrong controller and it's close enough that most times it works until we find 1 or 2 small operations are not working and by then sometimes we have ran a lot of bad production that has to be scrapped.
If that doesn't work, use indexed addressing to access or write to an element or an array that doesn't exist.
Need some assistance. I am testing out a heart beat code and I want to fault the processor so I can check from the SCADA system that the PLC is Faulted and Alarms me. Thank you.
Are you sure about this. Maybe I'm not understanding...
Let's say I have a UDT, members are .Name and .Count. I create an instance of it that is an array, let's say 10.
So I have MyTag[0].Name, MyTag[1].Count and so on. If I try to point to MyTag[10].Name, it's going to fault.
Maybe I structure it another way. My UDT is now .Name[10] and .Count[10] and I create a single instance. So now I have OtherTag.Name[0-9] and OtherTag.Count[0-9]. If I point to OtherTag.Name[10], it's going to fault.
If you try this with a MOV or similar instruction, it faults out, the array boundaries are checked.
However, if you use a COP, CPS, or FLL instruction, it does not check that you are writing or reading outside of the array, see the picture, I think it speaks for itself.
Default setting for an I/O module in ControlLogix is to NOT fault the processor if it fails and the connection is lost. However this can be turned ON in the module properties.
Ah I see what you say.
Put COP CPS and FLL into a class of instructions called DANGEROUS !
AFAIK they are the only instructions that can corrupt your stored data if you get the instruction arguments wrong...
They were designed and implemented to execute as fast as possible, and have minimal error-checking.
They will not encroach outside of the current tag, but as you have seen can corrupt data within the destination tag.
daba said:They were designed and implemented to execute as fast as possible, and have minimal error-checking.