ModbusTCP Server Real (datatype) Problem
-
Hi,
I'm using Mervis RT, setting up a modbustcp slave (also called server). When I add a variable of type real and choose "Identity" as conversion method I get one Int on the bus instead of two. Is this a known issue or am I missing some setup?
Thanks, Andi
-
Hello @_andi_ ,
can you please share the project with us? Zip the whole project folder and upload it somewhere if possible so we are clear on what you want to achieve.
-
Hi,
thats what I'm, doing. Just having the real works fine, adding the int breaks the real.
https://drive.google.com/open?id=1W7ZJpO1MUiSXMdvRWszUj2BQtqj9uxx2
Thanks, Andi
-
Hi @_andi_ ,
the real value is 32bits long, that means it will take two registers, in your example registers 1 and 2. By adding register 2 with variable "int1" you have inadvertently overwrite the half of the previous register. To avoid that, set the starting element of the "int1" to 3. -
Ah, thanks! I just clicked "add variable" and didn't realise I can / have to actually edit the offset afterwards. Might be worth a feature request to change the gui to automatically check the previous value and adjust the starting element accordingly.
-
@_andi_ Noted:)