creativepaper
Lifetime Supporting Member
I have a subroutine that gets called to copy a UDT In an array to a tag.
This subroutine will be called around once per minute and has been running unchanged for 8 years.
Last night I got a PLC fault for subscript overrun.
Looking at the code, the tag tSummary_Prod_Nbr = 201
How could this occur when the LIM instruction should not allow the AD instruction to be executed?
This tag tSummary_Prod_Nbr is not used anywhere else in the PLC program and is not overwritten by a MSG, HMI, or transaction.
The only idea I have is if I have a copy with mismatched source and destination somewhere in the PLC (STRING copied to STRING with fixed length).
I haven't looked in the code to see if this occurs, but wondering if there is anything else that could potentially cause it.
This subroutine will be called around once per minute and has been running unchanged for 8 years.
Last night I got a PLC fault for subscript overrun.
Looking at the code, the tag tSummary_Prod_Nbr = 201
How could this occur when the LIM instruction should not allow the AD instruction to be executed?
This tag tSummary_Prod_Nbr is not used anywhere else in the PLC program and is not overwritten by a MSG, HMI, or transaction.
The only idea I have is if I have a copy with mismatched source and destination somewhere in the PLC (STRING copied to STRING with fixed length).
I haven't looked in the code to see if this occurs, but wondering if there is anything else that could potentially cause it.