08.08.2022, 05:55
Hi all,
I think I have figured out the method to read a register and write its value to an LM object
-------------------------------------------------- ---------------------------
result_5, result_6, result_7, result_8 = mb:readregisters(3203, 4)
if result_5 then
value5 = bit.lshift(result_5, 48) + bit.lshift(result_6, 32) + bit.lshift(result_7, 16) + result_8
../..
end
-------------------------------------------------- ---------------------------
But could you explain to me how to do the opposite with the method "mbetregisters(register,value)"
from values of LM objects like Uint8, Float32 and Int64?
Thank you in advance for your assistance and have a good week.
I think I have figured out the method to read a register and write its value to an LM object
-------------------------------------------------- ---------------------------
result_5, result_6, result_7, result_8 = mb:readregisters(3203, 4)
if result_5 then
value5 = bit.lshift(result_5, 48) + bit.lshift(result_6, 32) + bit.lshift(result_7, 16) + result_8
../..
end
-------------------------------------------------- ---------------------------
But could you explain to me how to do the opposite with the method "mbetregisters(register,value)"
from values of LM objects like Uint8, Float32 and Int64?
Thank you in advance for your assistance and have a good week.