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:)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login