Modbus / Physical value not available in monitor

Hi all,
We have an X90CP172 mobile controller on which we activated modbus master.
We already user modbus master and slave on this platform.
For a reason unknown to me, the new holding registers mapping fails to display and serve an value.
In the monitor all we see is Not available in the Physical and process variable value.
The Discrete inputs is correctly served.
Attached is part of the configuration and result

What should I look for ?

Best regards


Hello Alain,

You won’t see the physical value in the IO mapping under monitor mode because you have selected OCTET as your Data type. OCTET has no interpretation, so the Physical View doesn’t know how to present the information to you.

You should see the variables mapped to the OCTETs represent the value from the holding registers in the format of the data type of the variables.

EDIT/ADDENDUM: What do you mean by “has no interpretation?”
Interpretation is how the value is utilized by the processor and human readers. In the memory where the variable sits, are just 1’s and 0’s. For example, if we have a 1-byte variable, it could contain the bits: 0b1010_1010 (underscore for simplified reading). What does this mean to our application, and how should the processor apply it?

Well, that depends on the interpretation or data type. If we say this variable is a SINT, then the value will be interpreted as decimal -86. The first bit is 1 and tells us it’s a negative number, and the rest is counted against the standard -128 to 127 of SINT. If we say this variable is a USINT, then the value is decimal 170 using the standard of USINT. These are drastically different values depending on the desired interpretation of the value. It gets even more complex when factoring in REAL variables for 4-byte values.

Unlike SINT and USINT, OCTET has no interpretation to an integer to display. Therefore, the IO mapping shows ‘Not available’ in the IO mapping.

-Austin

3 Likes

Hello Austin.

You are perfectly right.
Because I have to define data type as octet (made compulsory because the size of my data is not 16bit), the data becomes non visible in monitor, I mean it is not interpreted (casted) and displayed.
Testing with a modbus tool, I could verify that the modbus stack is functional and monitor should not be relied on for testing.
Moreover ther was a bug in the runtime that was fixed the same day (version O.4.93) that fixed another related bug when using 4octets (which is required to transport a UDINT)

Thank you very much.
Best regards

1 Like