{"action":"created","issue":{"url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/195","repository_url":"https://api.github.com/repos/Cloud-Automation/node-modbus","labels_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/195/comments","events_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/195/events","html_url":"https://github.com/Cloud-Automation/node-modbus/issues/195","id":329048316,"node_id":"MDU6SXNzdWUzMjkwNDgzMTY=","number":195,"title":"modbus rtu Request timed out","user":{"login":"Mohammed-OceanPLX","id":32494170,"node_id":"MDQ6VXNlcjMyNDk0MTcw","avatar_url":"https://avatars2.githubusercontent.com/u/32494170?v=4","gravatar_id":"","url":"https://api.github.com/users/Mohammed-OceanPLX","html_url":"https://github.com/Mohammed-OceanPLX","followers_url":"https://api.github.com/users/Mohammed-OceanPLX/followers","following_url":"https://api.github.com/users/Mohammed-OceanPLX/following{/other_user}","gists_url":"https://api.github.com/users/Mohammed-OceanPLX/gists{/gist_id}","starred_url":"https://api.github.com/users/Mohammed-OceanPLX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mohammed-OceanPLX/subscriptions","organizations_url":"https://api.github.com/users/Mohammed-OceanPLX/orgs","repos_url":"https://api.github.com/users/Mohammed-OceanPLX/repos","events_url":"https://api.github.com/users/Mohammed-OceanPLX/events{/privacy}","received_events_url":"https://api.github.com/users/Mohammed-OceanPLX/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-06-04T13:08:35Z","updated_at":"2018-06-13T21:15:32Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n I am having an issue trying to connect to salve device through Modbus RTU with ReadHoldingRegisters.js using the code below,\r\n I am getting the error:\r\n{ '0': { err: 'Timeout', message: 'Request timed out' } }\r\n{ '0': null }\r\n\r\nCould you help please? thanks in advance!\r\n\r\n````let modbus = require('jsmodbus')\r\nlet SerialPort = require('serialport')\r\nlet socket = new SerialPort('COM6', {\r\n  baudRate: 19200,\r\n  Parity: 'none',\r\n  stopBits: 1,\r\n  dataBits: 8\r\n})\r\n//set Slave PLC ID\r\nlet client = new modbus.client.RTU(socket , 1)\r\n\r\nsocket.on('close', function () {\r\n  console.log(arguments)\r\n})\r\n\r\nsocket.on('open', function () {\r\n  console.log('opened');\r\n  client.readDiscreteInputs(1,1)\r\n    .then(function (resp) {\r\n      console.log(resp)\r\n      socket.close()\r\n    }).catch(function () {\r\n      console.error(arguments)\r\n      socket.close()\r\n    })\r\n})\r\n\r\nsocket.on('data', function () {\r\n  console.log(arguments)\r\n})\r\n\r\nsocket.on('error', console.error)\r\n````\r\n"},"comment":{"url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/comments/397089317","html_url":"https://github.com/Cloud-Automation/node-modbus/issues/195#issuecomment-397089317","issue_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/195","id":397089317,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzA4OTMxNw==","user":{"login":"stefanpoeter","id":962108,"node_id":"MDQ6VXNlcjk2MjEwOA==","avatar_url":"https://avatars3.githubusercontent.com/u/962108?v=4","gravatar_id":"","url":"https://api.github.com/users/stefanpoeter","html_url":"https://github.com/stefanpoeter","followers_url":"https://api.github.com/users/stefanpoeter/followers","following_url":"https://api.github.com/users/stefanpoeter/following{/other_user}","gists_url":"https://api.github.com/users/stefanpoeter/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpoeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpoeter/subscriptions","organizations_url":"https://api.github.com/users/stefanpoeter/orgs","repos_url":"https://api.github.com/users/stefanpoeter/repos","events_url":"https://api.github.com/users/stefanpoeter/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpoeter/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T21:15:32Z","updated_at":"2018-06-13T21:15:32Z","author_association":"MEMBER","body":"Just start your application like this `DEBUG=* node yourscript.js`"}}
{"actor":{"display_login":"stefanpoeter"}}