21.03.2017, 15:59
You can use in both, but first you need to figure out correct byte/word order by using this in your script:
One of the values in logs should be correct.
Code:
v1 = mb:readregistervalue(128, 'float32', 'n')
v2 = mb:readregistervalue(128, 'float32', 'b')
v3 = mb:readregistervalue(128, 'float32', 'w')
v4 = mb:readregistervalue(128, 'float32', 'bw')
log(v1, v2, v3, v4)
One of the values in logs should be correct.