The problem could be in the size of a
WHILE DO or FOR DO loop in your code. A limit is reached at around
965 lines of code within a WHILE Loop. After which, if your loop is
longer than 965 lines then the pointer back to the top of the loop
gets corrupted and so the while condition never gets checked again,
and the code appears to terminate.
You can verify that the pointer for the WHILE DO loop is being
corrupted by adding [General]debugcode = 1 to the citect.ini. Then
recompile the project and a file called code.lst will get generated
in the BIN directory. View it with a text editor and you'll see
that it contains a list of all the compiled cicode within the
project (and in the order in which it is compiled). If you search
for your function you'll see that when the problem occurs, the
Branch line is incorrect. It should branch back to the first line
of the loop but instead it tries to branch to a bogus line number
which probably doesn't even exist. (eg a very large number)
Citect has confirmed this to be a problem in CitectHMI/SCADA
version 5.21 to 5.41. We are researching this problem and will post
new information here as it becomes available.
|