Just tested with your structs and seems JSON is perfectly valid. With root: {"biota":{"PLANT":[{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null}],"ANIMAL":[{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null}]}} Rootless: {"PLANT":[{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null}],"ANIMAL":[{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null}]}...
Just tested with your structs and seems JSON is perfectly valid. With root: {"biota":{"PLANT":[{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null}],"ANIMAL":[{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null}]}} Rootless: {"PLANT":[{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null}],"ANIMAL":[{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null}]}...
Just tested with your structs and seems JSON is perfectly valid. With root: {"biota":{"PLANT":[{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null}],"ANIMAL":[{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null}]}} Rootless: {"PLANT":[{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null},{"NAME":null,"QUANTITY":null}],"ANIMAL":[{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null},{"NAME":null,"AGE":null}]}...
You are welcome. Also note, that it's valid only if you modbus-device use same real/float value representation (IEEE 754). That's true for most of systems. But some devices may have other representation, such as integer + position of the decimal point, for example 123.456 is integer = 123456 and position = 3 Also note, that, ones again, depending on endianess of each system, you may also need to swap not just words, but bytes. TYPE u_Real : UNION rVal:REAL; wVal:ARRAY[0..1] OF WORD; bVal:ARRAY[0..3]...
You are welcome. Also note, that it's valid only if you modbus-device use same real/float value representation (IEEE 754). That's true for most of systems. But some devices may have other representation, such as integer + position of the decimal point, for example 123.456 is integer = 123456 and position = 3 Also note, that, ones again, depending on endianess of each system, you may also need to swap not just words, but bytes. TYPE u_Real : UNION rVal:REAL; wVal:ARRAY[0..1] OF WORD; bVal:ARRAY[0..3]...
First, if you don't need to change conversion rules in runtime, take a look at "Unit conversion" module (Application -> add object -> UnitConversion). You can specify there biderectional conversion with different units, limits and so on. Second, since MODBUS don't have "real" types but only general 16-bit registers and Real is 32-bit, generally you need a byte-was conversion Real <> two Words. Note, that depending on the devices on both sides, there are two options: Real-> Word1, Word2 or Real->...
First, if you don't need to change conversion rules in runtime, take a look at "Unit conversion" module (Application -> add object -> UnitConversion). You can specify there biderectional conversion with different units, limits and so on. Second, since MODBUS don't have "real" types but only general 16-bit registers and Real is 32-bit, generally you need a byte-was conversion Real <> two* Words. Note, that depending on the devices on both sides, there are two options: Real-> Word1, Word2 or Real->...
You actually can use copilot by PLCOpen XML file exporting/importing. It's fine to work with it directly (at least, the Codex do it quite well).