QUESTION:
Why, when compiling an SCL source with SCL Version V5.1+SP2, do I
get the message "Maximum number of testable components/instances is
reached" (1) and why, when I access the instance variables of an
instance ">255" do I get no debug info shown (2)?
ANSWER:
1) The message may be caused by the following:
- The SCL source was created with SCL Version V5.0+SP3 and is now
being compiled with SCL V5.1+SP2. In Version V5.0+SP3 this message
did not appear after compiling.
- If access to a certain data range is overwritten:
For example:
The instruction:
DB_Test.BST19:= 1; refers to the bit DB23.DBX512.6
The instruction
DB_Test.BST20:= 1; refers to the bit DB23.DBX512.7
If in DB23 you enter only the data range up to and including
DBX512.6, you don't get any message. But as soon as you exceed this
data range (from DB23.DBX512.7 on), the message appears.
Background:
Debug info can always only pass on 254 elements in the structure or
interface of a function or data block.
2.) Here again you have reached an internal
system limit that can't be exceeded.
Remedy:
Include the function block to be called as a statistical
variable in the variables declaration of that block. In this
function block call more function blocks, but not with their own
instance data blocks. In this way you will concentrate the instance
data in one instance data block, which means you can utilize the
available number of data blocks more satisfactorily. Call the
blocks for the multi-instance in question as a global instance for
test purposes. After that the debug info can be generated. Once the
function has been tested, the block with the planned multi-instance
calls can be properly recompiled (but this time with no debug
info). Instead of using a command sequence such as:
Instance1(...);
x := Instance1.y;
you should use the instructions
FB1.DB257(...);
x:= DB257.y;
Extract from the Readme file for SCL Version V5.1 + SP 2 (Point
1 Service Pack 2): Service Pack 2 (S7-SCL K5.1.2) contains the
following corrections for S7-SCL V5.1 + SP1. If structures have
more than 254 components, the first 254 of them can now be
monitored again for testing. The other components are not shown.
Keywords:
Debug info, Compilation error, Compiler message, Compiler,
Development environment, Debugger.
|