Schneider Electric 840 USE 106 0 manual Reduce the Use Of Complex Data Structures

Models: 840 USE 106 0

1 226
Download 226 pages 11.66 Kb
Page 162
Image 162

Additional Guidelines for IEC Hot Standby

Reduce the Use Of Complex Data Structures

Reduce Use of Usually, when complex data structures are used, the probability that each of its

Complex Data members are actually used is fairly low. Additionally, when complex data structures

Structuresare passed as variables or links, each superfluous input/output pin, link or variable has a lot more impact on data consumption than when using primitive data types. This is especially true whenever the "MOVE" EFB is involved, of which the usage should be reduced to the absolute minimum, or to none at all. Whenever the result of some preceding logic gets assigned to a variable, make sure that this variable is the final target for that value, not just an intermediate storage. Intermediate variables are often used for loosening the logic between different sections. However, it makes sense to reduce the full amount of global variables, not only in terms of data memory savings, but also in terms of application overview.

Handle the selection of arrays as data types for variables carefully, since the selected array is often bigger than needed.

The choice of all different IEC compliant languages is made for a good reason. For many different application problems, the best way to solve them depends heavily on what language has been selected for its implementation. Of course, the language selection is also a matter of the preferences of the programmers and those who maintain the application. The user should be free in his decision about which of the IEC languages to select for his particular application.

Because of the different focus of the IEC compliant languages, it is difficult to compare them. It should be mentioned, however, that the SFC language consumes more data in accomplishing a stepwise program execution compared than what one would expect from the implementation of that feature in another language. The overall data consumption of SFC steps ranges between 20 to 25 bytes per step, which does not include any data from transition sections.

162

840 USE 106 00 January 2003

Page 162
Image 162
Schneider Electric 840 USE 106 0 manual Reduce the Use Of Complex Data Structures