What you can do, using the article's program 'as is', is reading the pair of registers and then convert yourself the return values into the meaningful value. For instance, assume you read a register pair
reg[n] = 0x4128 and register reg[n+1] =0x0000
then, if the
PLC
uses the big endian representation, you obtain the
int
value
0x41280000
whose conversion to
float
gives eventually
10.5
(see
"IEEE 754 Converter"[
^]).
Of course a better way would be modifying the original code to make it perform the required conversions for you.