beautypg.com

Siemens S5-135U/155U User Manual

Page 437

background image

9-55

System Manual
C79000-G8576-C199-06

In the selective sampling mode, a measured value is encoded on the central
initiative of the CPU. At the start of conversion, the module must be
addressed once with a write operation (T PW) by the user program. An active
bit (T = 1) is set during encoding.

With the transition to T = 0, the measured value becomes valid. With
non-constant cycle times, there may be non-periodic measured value
aquisition. If you operate the module in this mode, you must set a module
address from 128 to 255. You can also use the address range from 0 to 127
for selective sampling after appropriate programming in DB 1 of the user
program.

Another method is that of time-controlled program processing. With this
method, certain program segments (e.g. FB 13) are automatically inserted
into program processing at the 100 ms rate by a time-
controlled block (OB 13). A constant timebase is thus achieved.

FB 13

SPRM-B

LEN=22

ABS

SHEET

1

SEGMENT 1
NAME: SELSAMPL

EXAMPLE OF SELECTIVE SAMPLING

0005

:

0006

:

0007

:L

PW128

READ ANALOG VALUE

0008

:T

FW128

IN TO AUX: FLAG 128

0009

:S

F

129.2

SCAN

ACTIVITY=1?

000A

:JC

= END

IF = 1, JUMP TO END

000B

:T

FW10

IF = 0, MEASURED VALUE IN FW 10

000C

:T

PB128

INITIATE

SAMPLING

000D

END

:

(1ST VALUE INVALID AFTER START)

000E

000F

:

0010

:BE

You can read analog values of analog input modules with a function block
from the “basic functions” package.

The BASP signal is not interpreted by the 460 analog input module.

Time-Controlled
Program
Processing

Function Block

BASP (Output
Inhibit)

Analog Input/Output Modules