Additional Guidelines for IEC Hot Standby

Use Constants Instead of Equal Literals

Equal Literals In the diagram below, when multiple EFB instances use the same fixed value as input, they are using equal literals. This is not much logic, but there is already a lot of data to save, actually it’s 12 bytes. The trick is to declare a constant of type REAL with the value 1.0 and use that in the logic instead of always assigning equal literals to the inputs.

The point is: Every literal, no matter what value it has, is stored separately in data memory (program data area), this brings up the advantage that it could be modified due to a download change. Literals are rarely modified, therefore the modified logic in the diagram below would be more appropriate.

The four times allocated literal with the value 1.0 has been replaced with a one time allocated constant that has the value 1.0 as well. This little change saved 12 bytes of data memory, since the type REAL takes 4 bytes and now needs to be allocated 3 times less.

.1.7

 

 

 

 

.1.9

 

 

 

 

 

 

 

MUL_REAL

 

 

 

 

ADD_REAL

 

 

real_A

 

 

 

 

 

real_B

real_C

 

 

 

 

real_D

 

 

 

 

 

 

 

 

1.0

 

 

 

 

 

 

 

1.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.1.8

 

 

 

 

.1.10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SUB_REAL

 

 

 

 

ADD_REAL

 

real_E

 

 

 

real_F

real_G

 

 

 

 

real_H

 

 

 

 

 

 

 

 

 

1.0

 

 

 

 

 

 

 

1.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

158

840 USE 106 00 January 2003

Page 158
Image 158
Schneider Electric 840 USE 106 0 manual Use Constants Instead of Equal Literals, RealB RealC RealD, RealF RealG RealH