Variables initialization

F

Thread Starter

Franco_L

Hi All,
I would like to know how is implemented the mechanism of arbitrary variables initialization in a plc.
In S7 or 1131 I can declare a variable and initialize it at the same time; after its value is changed, at next restart, the plc is able to
re-set its initial value.
There is something like a double-buffer? or the programming system does encode a "bootsrap code" for the initialization?
In the first case is the right one, how small plcs (with poor memory) handle the problem ?

Tanks
Francesco

(Sorry for my bad english)
 
H

Hakan Ozevin

I am not sure if I understood your question right, but at next restart you can do the followings:
1) Keep the variables as they are
2) Set them to some default values (or to zero's).

These are handled by the start-up OB's in S5/S7. (In S7-200, by SM0.1 bit).

By "arbitrary" if you mean some intermediate results, you can control them as above (Exception:
If you write them to the accumulators, they are lost with a power break).
 
Top