Rockwell Automation 1772-LS_LSP,D17726.8.6 PROG/OPER MANUAL-MINI PLC-2/05 User Manual

Page 215

Advertising
background image

Programming Techniques

Chapter 18

18-7

Figure 18.7

Recording Temperature Values Every 5 Seconds

030

15

030

1.0

15

030

02

JSR

TON

PR 005

AC 000

06

LBL

100

200

203

X

900

009

201

G

G

202

X

000

900

203

206

:

005

204

G

G

205

:

180. 000

180

205

210

+

032

207

G

G

212

RET

Subroutine Area

Here is an explanation of each rung:

Rung 1:

When rung 1 is true, the timer (this is an example of a free
running timer) starts timing.

Rung 2:

The JSR instruction jumps to the subroutine area label
instruction when the timer’s accumulated value reaches
5 seconds.

Rungs 3–5:

Converts Celsius temperature to Fahrenheit temperature
exactly as in application one.

Rung 6:

The Return instruction signals the processor to return to
the main program area.

ATTENTION: Make allowances for conditions which could be
created by the use of the Jump to Subroutine instruction.
Subroutine program rungs are not scanned by the processor
unless initiated by the Jump to Subroutine is initiated by the
main program. The processor does not scan the subroutine
program unless initiated by a Jump to Subroutine in the Main
Program. Timers and counters within these rungs cease to
function. You should reprogram critical rungs in the main
program area.

Advertising