Giter VIP home page Giter VIP logo

Comments (4)

dedhdude avatar dedhdude commented on August 16, 2024

Even Tried RTUBuffer

from node-modbus-serial.

yaacov avatar yaacov commented on August 16, 2024

Try the connectRTUBuffered

client.connectRTU("/dev/ttyAMA0", {baudrate: 9600, dataBits: 8, parity: 'even', stopBits: 1})
  .then(read)
  .catch(console.log)

will become:

client.connectRTUBuffered("/dev/ttyAMA0", {baudrate: 9600, dataBits: 8, parity: 'even', stopBits: 1})
  .then(read)
  .catch(console.log)

from node-modbus-serial.

yaacov avatar yaacov commented on August 16, 2024

can you check using the pymodbus:

a. install ( if you have python and pip )

$ sudo pip install pymodbus
...

b. run python

$ python
Python 2.7.13 (default, Jan 12 2017, 17:59:37) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymodbus.client.sync import ModbusSerialClient as ModbusClient
>>> client = ModbusClient(method='rtu', port='/dev/ttyAMA0', timeout=1)
>>> client.connect()
True
>>> client.read_holding_registers(5,2).registers
[234, 234]
>>> 

from node-modbus-serial.

yaacov avatar yaacov commented on August 16, 2024

Checked against ArduinoESP running TCP and RTU modbus, no crc errors.

Arduino code:
https://github.com/yaacov/ArduinoModbusESP

Test used as client:
https://github.com/yaacov/node-modbus-serial/blob/master/examples/simple.js

Fixed in v5.2.6 , closing.

from node-modbus-serial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.