Subroutines; Subroutine Call; Subroutine Execution - Siemens WF 723 C Programming Manual

Positioning module
Table of Contents

Advertisement

04.97
3.3

Subroutines

The WF 723 C offers the subroutine technology for self-contained processes called or
executed several times.
3.3.1

Subroutine call

The subroutine call is defined by the address character L followed by a figure from 1 to 200.
The number of loops is defined by the address character P and a loop value from 0 to 65535.
Programming:
N10 L24 P23
Subroutine call with
program number 24
A traversing block with subroutine call must not contain other words apart from the number of
loops.
If 0 is entered as the number of loops, the subroutine will not be called.
3.3.2

Subroutine execution

The WF 723 C allows a two-level nesting depth, the number of subroutine calls being only
restricted by the memory space of the WF module.
Level 0
Main program PR 10
N1 ....
N20
L20 P ..
N30
L21 P ..
N50 ....
©
Siemens AG 1997 All Rights Reserved
WF 723 C (Programming Guide)
Number of loops=23
Level 1
Subroutine PR 20/PR 21
N10 ....
N30
L30 P ..
N50 ....
N10 ....
N20
L30 P ..
N30 ....
6ZB5 440-0VU02
Program Execution / Subroutines
Level 2
Subrotuine PR 30
N10 ....
N40 ....
3 – 3

Advertisement

Table of Contents
loading

Table of Contents