04-21-2017 04:02 AM
Hi there,
I am trying to write 32-bit single precision number to two 16-bit unsigned modbus regsiters. Any ideas how could that be done?
thanks in advance!
Solved! Go to Solution.
04-21-2017 04:06 AM
04-21-2017 04:11 AM
04-21-2017 04:14 AM
04-21-2017 04:22 AM
For now, I don't have specific requirement for precision. I'am trying to do the modbus master/slave simulator. The SGL value will be written in input register of slave, then read with Read from input registers function on master. Since the modbus functions accepts the U16 format, the conversion is needed.
04-21-2017 04:29 AM
Hi there, I tried something similar using type cast to transform to U32 and the used Split Number. But probably, I would need to create the opposite conversion on master where I read the values from register?
04-21-2017 04:31 AM
Hi zde,
I tried something similar using type cast to transform to U32 and the used Split Number.
So you get the same result using more functions!? 😄
But probably, I would need to create the opposite conversion on master where I read the values from register?
Yes, when you want to "simulate" this master too…