Schneider Electric 840 USE 106 0 Stroller User Manual


 
Additional Guidelines for IEC Hot Standby
840 USE 106 00 January 2003 161
Programmed Logic
Reduce DFB
Instances
Every DFB instance consumes a certain amount of overhead data memory, which
grows with the number of input and output pins. To make the ratio between the fixed
overhead and the DFB internal logic’s data as small as possible, DFBs should be
used only when they cover a really big part of specialized logic. That means when a
DFB contains just one section with a few blocks of FBD/LD or a few lines of IL/ST
logic, you should probably consider replacing it with a macro that links the DFB-logic
directly to the program logic. Although if a DFB is used just a few times, like 1 to 10
times, consider not changing it, since the data memory savings might be too small
to be worth the work.
When some complicated logic has to be implemented, especially when it comes to
numeric algorithms, none of the IEC languages allow a really data efficient
implementation. Therefore, when a DFB should cover some of those kinds of logic,
it is worth implementing it as an EFB instead. EFBs are implemented in C, C++
language, which allows highly effective implementations of any kind of logic. To
implement EFBs, Schneider Electric offers the Concept-EFB-Toolkit. But it should
be noted, that EFBs do not allow animation of their internal data at runtime like DFBs
do.
Even with EFBs you should avoid having any unused input and output pins, because
every pin takes the data memory that its data type requires.