Siemens SIMATIC S5 Manual page 128

Ip 265 high speed sub control
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

IP 265
Counter operations (CU/D)
You can count both up and down with the IP 265. These two counter operations in an IP 265 user
program are largely identical to those used for CPU programming, with two exceptions:
The current count is available only as binary value.
The IP 265 counter functions have no counting element numbers.
Up counters and down counters are combined into a single language element:
"Counting up" (CU) input
"Counting down" (CD) input
Preset value defining the count value (CV)
with which the counter is to be started
Set input (S): Counter is initialized to Preset
value
Reset input (R): Counter is set to zero
Figure 9-5. Basic Structure of "Counter" Language Elements
The Preset value must be an integer constant or parameter. Parameter entry and deletioon
procedures are discussed in detail in Section 6. Section 13.1 "Sample Programs" contains program-
ming examples for counters.
Integer constants as Preset values for counters can be represented as follows:
hexadecimal:
e.g.: KH 0C
decimal:
e.g.: 12, KF+12, KC 12
KC 12
EWA 4NEB 812 6130-02a
CU/D
> CU
> CD
CV
> S BI
R
Q
Operand
Count (0 to 999)
Programming the IP 265 with COM 265
DU output:
current count;
binary-coded
Q output:
Q="0":
Count is "zero"
Q="1":
Count not "zero"
9-23

Advertisement

Table of Contents
loading

Table of Contents