Logic Machine Forum
Modbus - Phnix - Printable Version

+- Logic Machine 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 - Phnix (/showthread.php?tid=5743)



Modbus - Phnix - balatis - 14.11.2024

Hello everyone,

We have an installation with fancoils Phnix with modbus RTU and we are facing an issue with communication.
We can read data from modbus, but we cannot write on them, although we use writable -> true in json.
Due to testing, only one fancoil is connected and there is no other device in modbus.
It shows up this message in attaching photo.
 
I attach you the register lists, too.
Have you any idea about it?

Thank you in advance.


RE: Modbus - Phnix - Daniel - 15.11.2024

Add "write_multiple": true,


RE: Modbus - Phnix - balatis - 15.11.2024

(15.11.2024, 08:54)Daniel Wrote: Add "write_multiple": true,
We have tried this, but no change unfortunately.


RE: Modbus - Phnix - admin - 15.11.2024

Is GND connected between LM and Modbus device?


RE: Modbus - Phnix - balatis - 15.11.2024

Yes, GND is connected.


RE: Modbus - Phnix - admin - 15.11.2024

This error is usually caused by an issue on the physical communication level.

Disable RTU in Modbus settings and run this script once. Post what you get in Logs. Change device address (1) as needed.
Code:
require('luamodbus')
mb = luamodbus.rtu()

mb:open('/dev/RS485-1', 9600, 'N', 8, 1, 'H')
mb:connect()

buffer = {}

mb:setdebug(function(msg)
  buffer[ #buffer + 1 ] = msg
end)

mb:setslave(1)

res, err = mb:writemultipleregisters(28302, 0)
log(res, err)

mb:close()

log(table.concat(buffer))



RE: Modbus - Phnix - balatis - 15.11.2024

nice i'm back!


RE: Modbus - Phnix - admin - 15.11.2024

This profile should work the same as the script above.
Code:
{
    "manufacturer": "phnix",
    "description": "fc",
    "mapping": [
        {
            "name": "mode",
            "bus_datatype": "uint8",
            "datatype": "uint16",
            "type": "register",
            "address": 28302,
            "writable": true,
            "write_multiple": true
        }
    ]
}



RE: Modbus - Phnix - balatis - 16.11.2024

(15.11.2024, 09:25)admin Wrote: This profile should work the same as the script above.
Code:
{
    "manufacturer": "phnix",
    "description": "fc",
    "mapping": [
        {
            "name": "mode",
            "bus_datatype": "uint8",
            "datatype": "uint16",
            "type": "register",
            "address": 28302,
            "writable": true,
            "write_mutiple": true
        }
    ]
}
Hi admin ,
 it works with 
"writable": true,
"write_multiple": true
thanks !