Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Originally published on Geo SCADA Knowledge Base by sbeadle1 | June 10, 2021 04:14 AM
📖 Home Back
The "Maximum Number of Opcodes Executed" error message simply indicates that a logic program is taking too long to execute and as a simple protection mechanism if the number of operations exceed the configured value the logic is terminated and this error generated. This is usually is only an issue for structured text programs however all logic programs have this setting and could possibly hit this limit.
The default value is nowhere near what a normal logic program should ever get near to, however the introduction of loops (FOR and WHILE and the usage of %S) means that this limit can be easily reached.
The following program will always generate this error...
PROGRAM CountTestWHILE (1) DO;END_WHILE;END_PROGRAM
...because the program will never end. It will reach the maximum number of operations and terminate.
The number of opcodes (instructions) of the last execution can be seen by doing a Logic Execution Query and seeing the "Number of Instructions" column.
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.