
Rockwell Automation Publication 2080-UM002N-EN-E - November 2022
125
Chapter 7 Program Execution in Micro800
Periodic Execution of Programs
For applications where periodic execution of programs with precise timing is required, such
as for PID, it is recommended that STI (Selectable Timed Interrupt) be used to execute the
program. STI provides precise time intervals.
It is not recommended that the system variable __SYSVA_TCYCYCTIME be used to periodically
execute all programs as this also causes all communication to execute at this rate.
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.
WARNING:
Communication timeouts may occur if programmed cycle time is
set too slow (for example, 200 ms) to maintain communications.
System Variable for Programmed Cycle Time
Variable
Type
Description
__SYSVA_TCYCYCTIME
TIME
Programmed cycle time.
Note
: Programmed cycle time only accepts values in multiples
of 10 ms. If the entered value is not a multiple of 10, it will be
rounded up to the next multiple of 10.
System Variables for Scan and Power-up on Firmware Revision 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
Power-up 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 power-up, or running a
new ladder for the first time.