78 Rockwell Automation Publication 2080-UM002K-EN-E - March 2019
Chapter 6 Program Execution in Micro800
Power Up and First Scan
In Program mode, all analog and digital input variables hold their last state, and
the LEDs are always updated. Also all analog and digital output variables hold
their last state, but only the analog outputs hold their last state while the digital
outputs are off.
When transitioning from Program mode to Run mode, all analog output
variables hold their last state but all digital output variables are cleared.
Two system variables are also available from revision 2 and later.
Variable Retention
After a power cycle, all variables inside instances of instructions are cleared.
Micro830 and Micro850 controllers retain all user-created variables. Micro810®
and Micro820 controllers can only retain a maximum of 400 bytes of user-created
variable values. Micro870 controllers can only retain a maximum of 128 kilobytes
of user-created variable values.
For example: A user-created variable called My_Timer of Time data type will be
retained after a power cycle but the elapsed time (ET) within a user-created timer
TON instruction will be cleared. This means that after a power cycle, global
variables are cleared or set to initial value, and depending on the controller, some
or all user-created variable values are retained. You can choose which variables to
retain by selecting them on the global variable page.
System Variables for Scan and Powerup on Firmware Release 2 and later
Variable Type Description
_SYSVA_FIRST_SCAN BOOL First scan bit.
Can be used to initialize or reset variables immediately
after every transition from Program to Run mode.
Note: True only on first scan. After that, it is false.
_SYSVA_POWER_UP_BIT BOOL Powerup bit.
Can be used to initialize or reset variables immediately
after download from Connected Components
Workbench or immediately after being loaded from
memory backup module (for example, microSD card).
Note: True only on the first scan after a powerup, or
running a new ladder for the first time.