23.09.2017, 16:38
While Erwin's code works it easier to use built-in datatype read function:
Code:
-- read 32-bit floating point value from input register nr 123, use word swap
res, err = mb:readinputregistervalue(123, "float32", "w")