Execution rules – Rockwell Automation 2080-LC10-12DWD Micro810 Programmable Controllers User Manual User Manual

Page 42

Advertising
background image

34

Rockwell Automation Publication 2080-UM001D-EN-E - September 2012

Chapter 6 Program Execution in Micro800

order. You can view and modify an order number for a program from the
program's properties. However, the Project Organizer does not show the new
order until the next time the project is opened.

The Micro800 supports jumps within a program. Call a subroutine of code
within a program by encapsulating that code as a User Defined Function Block
(UDFB). Although a UDFB can be executed within another UDFB, a maximum
nesting depth of five is supported. A compilation error occurs if this is exceeded.

Alternatively, you can assign a program to an available interrupt and have it
executed only when the interrupt is triggered. The User Fault Routine is the only
interrupt available in Micro810 controllers. A program assigned to the User Fault
Routine runs once just prior to the controller going into Fault mode.

The Global System Variables associated with cycles/scans are:

• __SYSVA_CYCLECNT - Cycle counter
• __SYSVA_TCYCURRENT - Current cycle time
• __SYSVA_TCYMAXIMUM - Maximum cycle time since last start.

Execution Rules

This section illustrates the execution of a program. The execution follows eight
main steps within a loop. The loop duration is a cycle time for a program.

1. Scan input variables

2. Consume bound variables

3. Execute POUs

4. Produce bound variables

5. Update output variables

6. Save retained values

7. Process IXL messages

8. Sleep until next cycle

1

2

3

4

5

6

7

8

1

2

3

Advertising