Changing The Counting Direction; Actual Value And Overrange In Positon Decoding Mode; Reading The Actual Value; Zero Offset - Siemens Simatic S5 IP 240 Manual

Counter/positioning/position decoder module
Hide thumbs Also See for Simatic S5 IP 240:
Table of Contents

Advertisement

Position Decoding

Changing the counting direction

To change the counting direction, you must interchange the encoder signal connections as
follows:
for symmetrical encoders, interchange A/A and B/B.
for asymmetrical encoders, interchange A* and B*.
Actual value range and overrange
The actual value range is defined as - 99,999 to+99,999.
- 99,999
...
Overrange
Fig. 7-2. Actual Value and Overrange in Positon Decoding Mode
When the counter leaves the defined actual value range, it enters the overrange and the IP sets
the UEBL status bit (Overflow). In the overrange, pulse decoding continues as in the defined
range. However, the IP no longer compares the actual value with the predefined track limits. The
current state of the REFn bits is recorded (REFn bits Section 7.2.3).
Status bit UEBL can be used to trigger an interrupt. You must specify this, if required, in the
PRA2 parameter during configuring ( Section 7.3.1).
It is reset
when the status area is read
when the interrupt request bytes are read if the overrange has triggered the interrupt.

Reading the actual value

The actual value is updated in every module firmware cycle (operating system for the IP 240). To
be able to read the current actual value from the DB, you must first call control FB 170 and
parameterize function 1 "Reading the actual value and the status bits" ( Section 7.3.2).
The CPU fetches the current data from the IP and writes it to the data block. The data for the
actual value is entered as follows:
DW 30/31
Absolute actual value in BCD code
DW 32/33
Absolute actual value binary coded
D 19.0
Sign of the actual value (status bit SG)
After configuring, the value "0" is specified as actual value.

Zero offset

You can define a zero offset for the IP within the range - 99,999 to +99,999. You must store the
zero offset in BCD code in the installed data block in data words 66 and 67 ( Section 7.3.3). Now
call control FB 170 and parameterize function 5 "Write zero offset" ( Section 7.3.2). The CPU
then transfers the data from the DB to the IP.
After transfer of the zero offset, the actual value is modified by the difference between the old
and the new zero offset.
7-2
- 1 0 - 99,999
...
Defined actual value range
IST
= IST
+ (NVER
new
old
-1 0 +1
... +99,999
- NVER
)
new
old
IP 240
0 +1
...
+99, 999
Overrange
EWA 4NEB 811 6120-02a

Advertisement

Table of Contents
loading

Table of Contents