M
Hello all:
I am a Modbus newbie. Our application (slave device) can fit all values from -32767 to 32676. So, I am thinking of using a 16 bit signed integer for everything. For floating point, I would like to use a simple rule of sending the data by multiplying by 100 by the slave, and master receiving the data divides by 100?
Example 1: Temperature value desired to be sent (26.75C). Slave sends 2675, and master divides by 100 and displays 26.75.
This keeps my code really simple. All my floating point values are inside the range -327.67 and +327.67.
All we would do is have the memory map clearly explain how floating point is calculated and parsed. Would this suffice?
We need to ship our device as a slave device to customers saying we support Modbus. I am worried that customers/ems already have in-built IEEE Float format inbuilt into their master-code, and their software will balk at parsing the floating point information sent by our slave.
Please share your thoughts.
Thanks!
I am a Modbus newbie. Our application (slave device) can fit all values from -32767 to 32676. So, I am thinking of using a 16 bit signed integer for everything. For floating point, I would like to use a simple rule of sending the data by multiplying by 100 by the slave, and master receiving the data divides by 100?
Example 1: Temperature value desired to be sent (26.75C). Slave sends 2675, and master divides by 100 and displays 26.75.
This keeps my code really simple. All my floating point values are inside the range -327.67 and +327.67.
All we would do is have the memory map clearly explain how floating point is calculated and parsed. Would this suffice?
We need to ship our device as a slave device to customers saying we support Modbus. I am worried that customers/ems already have in-built IEEE Float format inbuilt into their master-code, and their software will balk at parsing the floating point information sent by our slave.
Please share your thoughts.
Thanks!