Topic: P234

Tag Initialization

Description

This topic explains the sequence of events the CPU performs for initializing tag values during a stop to run transition.  All tags are initialized each time a project goes to run.

  1. First stop to run transition: (This will be the case for every tag after a stop mode transfer. A tag added to the project via runtime transfer is also handled this way.)
    • Tag values in RAM are cleared.
    • If an initial value is specified for a tag in the project, that value is written to RAM.
    • If the tag is init forced, its init force value is written to memory and the tag is forced.
    • Code execution begins.
  2. Any stop to run transition thereafter:
    • Tag values in RAM are cleared.
    • If an initial value is specified for a tag in the project, that value is written to RAM.
    • If a tag has a retentive value in non-volatile RAM, the retentive value is written to RAM. See note below.
    • If the tag is init forced, its init force value is written to memory and the tag is forced.
    • Code execution begins.

Note: During power loss, non-volatile RAM is kept alive by a super cap and a replaceable battery in the CPU. If at power up the CPU detects that values in non-volatile RAM were lost, non volatile RAM will be cleared and the project will come up as if for the first time, since no retentive values would be available. An entry would be added to the non-critical error log.