This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus write error
#1
Hello,
I have a problem. I updated genohm-scada-modbus package version 20230404 to 20240621 and FW version 20230607 to 20240426. Now I run a write command and I get this error: "Write failed: Illegal data value". The only change in Modbus profile is to add write_delay:1 in the file header. I also tried package 20231213 and I have the same error. The error doesn't always occur, ometimes write correctly. It is possible to know which mapping element triggers the error?

Code:
{
  "manufacturer": "TEST",
  "description": "Modbus",
  "timeout": 5,
  "read_swap": "n", 
  "write_delay":1,
  "mapping": [
        {"name": "Allow Heating_[R/W]",
    "bus_datatype": "bool",
    "type": "register",
    "datatype": "uint16",
    "address": 47371,
    "writable": 1,
    "write_multiple": 1,
    "read_count": 1,
    "value_delta": 1,
    "value_multiplier": 1,
    "value_custom": {
            "0": "Off",
            "1": "On"
            }     
    },
    {"name": "Allow Cooling_[R/W]",
    "bus_datatype": "bool",
    "type": "register",
    "datatype": "uint16",
    "address": 47372,
    "writable": 1,
    "write_multiple": 1,
    "read_count": 1,
    "value_delta": 1,
    "value_multiplier": 1,
    "value_custom": {
            "0": "Off",
            "1": "On"
            }         
    }
]}
Reply
#2
Use this
https://forum.logicmachine.net/showthrea...8#pid35418
PS. You don't need read_count
------------------------------
Ctrl+F5
Reply
#3
(11.02.2025, 11:46)Daniel Wrote: Use this
https://forum.logicmachine.net/showthrea...8#pid35418
PS. You don't need read_count

i'm using this version of package
Reply
#4
Most likely the problem is on the physical communication level. Do you have GND connected between LM and Modbus device?
Reply
#5
What does this error mean? Can I know which profile item triggers it? We haven't changed anything physically, we just updated the firmware and package. It was working correctly before.
Reply
#6
If it worked, why did you need write_delay?
------------------------------
Ctrl+F5
Reply
#7
Because sometimes we got a timeout error. But not this illegal value error.
Reply
#8
Random timeouts usually mean that the end device does not always receive the message correctly. Do you have GND connected between LM and Modbus device?
Reply
#9
The error only occurs when I send the same value that the parameter currently has. If the value is different i don't have the error. I will check the physical device.

Thanks!
Reply
#10
In this case you can simply ignore "illegal data value" errors. Looks like this is simply a device "feature".
Reply


Forum Jump: