Main program block, Power-up block – Maple Systems MAPware-7000 User Manual
Page 285

MAPware-7000 Programming Manual
285
1010-1040, Rev. 02
Main Program block
The main program is the core of the user program. It is executed once during each scan.
Multiple logic blocks can be created (up to 256) and used in the Main Program block. During
execution, the HMC7000 starts with the first block listed. When completed, it will execute each
block in sequence. Each logic block must have an END instruction to indicate where execution
of instructions ends and the program is exited. Please note that you can place additional
instructions after the END instruction, though these will not be executed during operation. The
figure below shows a typical scan sequence:
1 scan time
Mode
I/O
Timers
Main
Program
Mode
I/O
Timers
Main
Program
Time
Where:
Mode- determines mode of operation (Run, Halt, etc.)
I/O- update and process all inputs and outputs
Timer- update all running timers
Main Program- all logic blocks created under Main
Power-Up block
If the Power up-program is programmed, it is executed once at the beginning of the first scan
(before main program execution). Therefore, this program can be used to set initial values into
registers.
The figure below shows the first scan operation:
Run mode
transition
1st scan
2
nd
scan…
I/O
Timers
Power-
up
Main
Program
Mode
I/O
Timers
Main
Program
Time