Skip to content

Unclear modbus datatypes in TMs #4

Description

@Ostrzyciel

The TMs currently include modbus:type definitions like:

So far, I've found that integer, number, and integer types are used, which sounds like datatypes in JSON.

However, it's really not clear how exactly should these types be interpreted on the binary level. I found the Siemens manual for the relevant device, and there is a section on Siemens datatypes in Modbus, so I can figure it out manually. But, it's not possible to do that automatically.

This document uses instead XSD datatypes: https://w3c.github.io/wot-binding-templates/bindings/protocols/modbus/#payloaddatatype

Which honestly creates even more problems (e.g., "how is xsd:decimal encoded???") and does not answer the questions about binary encodings.

This document also uses XSD datatypes, but with completely different indentifiers: https://w3c.github.io/wot-binding-templates/bindings/protocols/modbus/ontology.html#payloaddatatype

I currently have implemented a workaround which guesses the binary layout and datatype based on the generic datatype given in the TM and its length in registers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions