LogicMachine Forum
Modbus profile of LM internally supports ONLY uint16 registers without type switchin - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Modbus profile of LM internally supports ONLY uint16 registers without type switchin (/showthread.php?tid=6227)



Modbus profile of LM internally supports ONLY uint16 registers without type switchin - Streety - 19.12.2025

Hello, 

I've tried a lot to get a specific Value from my modbus device into LM.
First I've created an Modbus Profile. For some of the values it works correct but some others deliver no values.
If I do a connection test with the Modbus Test Modul the correct value is delivered.
So I found out (with Chat GPT) that it seems the test modul and the profiles works different. Can you confirm?

Test Modul:
- reads raw data
- actively interprets (int16 / uint16 / int32 / uint32)

The Modbus profile ALWAYS interprets as uint16, no type selection and no sign switching and that seems the issue.

Please find the .json profile below. It's just the faulty address.

Code:
{
  "product_code": "KWL_HBX_250_500",
  "manufacturer": "HELIOS",
  "name": "KWL_HBX",
  "description": "LogicMachine Modbus profile for HBX",
  "mapping": [
{
      "address": 80,
      "bus_datatype": 4,
      "type": "register",
      "name": "operating hours"     
    },
]
}



RE: Modbus profile of LM internally supports ONLY uint16 registers without type switchin - admin - 19.12.2025

Use the Modbus profiler app to create profiles. There are two different data types - one for Modbus, one for the mapped object.


RE: Modbus profile of LM internally supports ONLY uint16 registers without type switchin - Streety - 19.12.2025

Good hint. I was not aware about that tool... Unfortunately it doesn't fix my issue. I've used the same values as in the Modbus Read Test but the value is still at 0. Any idea what could be the issue?        


RE: Modbus profile of LM internally supports ONLY uint16 registers without type switchin - CristianAgata - 20.12.2025

(19.12.2025, 17:59)Streety Wrote: Good hint. I was not aware about that tool... Unfortunately it doesn't fix my issue. I've used the same values as in the Modbus Read Test but the value is still at 0. Any idea what could be the issue?

Hi,
Try to set value bitmask to 0.
Best regards Cristian


RE: Modbus profile of LM internally supports ONLY uint16 registers without type switchin - Streety - 20.12.2025

Hello, I was able to solve the problem. My mistake was that I modified and saved an existing profile. However, it is important to export it and import it again. Then it works.

I also compared the old and the new .json scripts. The main problem was the distinction between bus data type and interpretation data type. Internally, LM distinguishes between the bus data type (how it is read) and the interpretation data type (how it is evaluated). In my profile, this was either mixed up or not present at all.

So thank you and the Modbus profiler app is a great help for such specific cases.