PROFIBUS USER MANUAL Leine & Linde AB
Part Id: 740590-01
28
Document Id: 740590 Ver. 01
Publication date: 2010-06-01
5.5.2 Preset function
The preset function enables adaptation of the position value from the encoder to a
known mechanical reference point of the system. The preset function sets the actual
position of the encoder to zero or to the selected preset value. The preset value is
written to the encoder as output data in the Data_Exchange function.
If scaling is used the preset function shall be used after the scaling function, to ensure
that the preset value is entered in the current measuring unit.
The most significant bit (MSB) of the preset value controls the preset function as
follows:
Normal operating mode: MSB = 0 (bit 31, optionally bit 15)
The encoder will not change the preset value.
Activated mode: MSB = 1 (bit 31, optionally bit 15)
With MSB = 1, the encoder accepts the transferred value (bits 0 – 30) as a preset value
in binary code. The encoder reads the current position value and calculates an offset
value from the preset value and the read position value. The position value is shifted
by the calculated offset value. If the input position value equals the preset value, the
preset mode is terminated and the MSB can be set to 0 by the master. The offset value
can be read with the diagnostic function and is securely stored in case of a power
interruption and is reloaded at each start-up.
Note:
The preset function should only be used at encoder standstill. In the case of a
Profibus gateway, the number of possible preset cycles is unlimited, but for
encoders the number of possible preset cycles can be limited. Please consult
Leine & Linde for more information.
Preset value format (2 words, 32 bits):
Octet:
1
2
3
4
Bits
31
30 – 24
23 – 16
15 – 8
7 – 0
Data
0 / 1
230 – 224
223 – 216
215 – 28
27 – 20
Preset
control bit
Preset value - max. 31 bits
Table 18 Preset value, 32-bit format
Preset value format (1 word, 16 bits):
Octet:
1
2
Bits
15
14 – 8
7 – 0
Data
0 / 1
214 – 28
27 – 20
Preset control bit
Preset value - max. 15 bits
Table 19 Preset value, 16-bit format