6F3B0250

6. Programming Information

6.6.2Sub-program #1

If the sub-program #1 is programmed, it is executed once at the beginning of the first scan (before main program execution).

Therefore, the sub-program #1 can be used to set the initial value into the registers. The sub-program #1 is called the initial program.

The figure below shows the first scan operation.

RUN mode

 

1st scan

transition

 

 

 

 

 

 

 

I/O

Timer

Sub#1

Main program

 

 

 

 

 

2nd scan

Mode I/O Timer

Main program

Time

The end of the sub-program #1 is recognized by the END instruction.

6.6.3Timer interrupt program

The timer interrupt is the highest priority task. It is executed cyclically with a user specified interval, with suspending other operation.

The interrupt interval is set in the system information. (5 to 1000 ms, 5 ms units)

1 scan

1 scan

Scan

Timer interrupt

Timer interrupt

interval

 

1 scan

 

1 scan

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer interrupt

interval

Time

The end of the timer interrupt is recognized by the IRET instruction.

Basic Hardware and Function 113

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Page 115
Image 115
Toshiba 6F3B0250, PROSEC T1 T1S user manual Sub-program #1, Timer interrupt program