Siemens SIMATIC S5 Manual page 241

Positioning module 1p 247 for stepper motors
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Standard Function Block FB165
The actual values are stored in data block DBx from data word DWn as follows:
0000
DW n
DW n+l
B8B7
DW n+2
DW n+3
0000
DW n+4
DW n+5
The actual position value and the distance to go are interpreted as 32-bit fixed point numbers.
Negative values are stored as 32-bit fixed point numbers in 2's complement.
It is, however, possible to output the actual values as BCD numbers. This is achieved with direct
parameter assignment by means of the block parameter
BA = KY 255,66
or with indirect parameter assignment using the job field of the axis data block in data word
The actual values are then stored as seven decade BCD numbers with sign in the destination DB
(parameter Z-DB).
In the BCD format, the maximum value which can be represented with a 32-bit number is +/-
9999999 urn (0.0001 in, 0.001 degrees). If a conversion from binary to BCD is not possible (repre-
sentable BCD range exceeded), the value is entered in the data block as a 32-bit fixed point
number (2's complement). The monitoring values which could not be converted can be read
from flag byte FY249 (=> Section 7,2 "Troubleshooting").
If you assign parameters so that the monitoring vaiues reed are output as a BCD number when
FB165 is called, remember the following points:
Since the actual values are always first entered as a binary number in the data block
and later converted to a BCD number, if the cyclic reading of the actual values is not coordi-
nated, the value might be read once as a BCD number or once as a binary number.
To prevent this, actual values to be output as BCD values should only be read when the
appropriate "trigger flag" (BA 66) has signal state "O".
With indirect parameter assignment, the actual values must only be evaluated when data
word DWn = KHOOOO.
6-48
KH
Actual position [urn]: 47,287mm
KH
I
Distance to go [urn]: 12.602mm

Advertisement

Table of Contents
loading

Table of Contents