minaandrawos / OPCModbusUAServer

An open source OPC UA server for Modbus TCP devices
MIT License
58 stars 27 forks source link

Unhandled rejection #1

Open rafixo opened 7 years ago

rafixo commented 7 years ago

Hi, I'm testing OPCModbusUAServer. Default config.json work perfect, but with my new config I have a problem. Could you help me?

cmd:

node server.js OPC UA Server initialized Created a Modbus device on 192.168.50.40:502 1 creating folder: 192.168.50.40:502 unit:1 Creating folder: coils Server is now listening... Unhandled rejection (<{"errorCode":129,"exceptionCode":1,"me...>, no stack trace)

config.json:

{
    "url": "ModbusServer",
    "port": 8080,
    "modbusdevices": [
        {
            "modbushost": "192.168.50.40",
            "modbusport": 502,
            "unit": 1,
            "pollrate":500,
            "onebased":true,
            "deviceaddressspace": [
                {
                    "type": "coils",
                    "addresses": [
                        {
                            "address": 30002,
                            "count": 1
                        }
                    ]
                }
            ]
        }
    ]
}
ghost commented 5 years ago

Address 30002 looks a bit odd for a coil. Usually, numbers in the 30000 range are input registers.