3.3.5
PKW Examples:
Reading and writing parameter values:
It is always possible to use a 4 word PKW in the master even when P2013 =127=
variable length. For the examples this will always be used and will be shown in
hexadecimal format. The reply PKW telegram will either be 3 or 4 words long
depending on the parameter value type.
To read a parameter you should use the Task ID 1 "request parameter value". The
Reply ID will be either 1 or 2 (single or double word respectively) or 7 (error).
Read parameter P0700. (700 = 2BC (hex))
→
Read parameter P1082. (1082 = 43A (hex))
→
For this example:
sign = 0,
exponent = 84 (hex) = 132
mantissa (1).900000 = [1 + 9/16 + 0/256...]
giving (1)x(32)x(1.5625) = 50.00.
To read a parameter between 2000 and 3999, you must set the PNU extension in
the 2nd word (IND).
→
MICROMASTER 420 Reference Manual
Issue A1
→
→
→
requests value of P0700.
the reply tells us this is a single word with
value 0002 (hex).
requests value of P1082.
the reply tells us this is a double word
with value 4248 0000 (IEEE float value).
The IEEE float format is as follows:
Bit 31
= sign,
Bit 23 to Bit 30
= exponent and
Bit 0 to Bit 22
= mantissa,
with the decimal value being given by:
value = ((-1) to power of sign)
x (2 to power of (exponent - 127))
x 1.Mantissa).
requests value of P2000.
the reply tells us this is a double word
with value 4248 0000 (IEEE float value)
i.e. 50.00.
49