Coder Social home page Coder Social logo

Comments (10)

nqv avatar nqv commented on June 22, 2024

I should provide expected length to read from serial port for each command.
What if you put time.Sleep(300 * time.Millisecond) before syscall.Select (serial_linux.go:123), will you have full response data?

from modbus.

gonium avatar gonium commented on June 22, 2024

@nqv: Thank you very much. If I insert a sleep time, I can correctly receive the data (and the data is also correctly decoded, see my last commit). I guess that you can determine the sleep time from the baudrate and the expected response length.

from modbus.

nqv avatar nqv commented on June 22, 2024

@gonium Thanks. I'll fix this issue as you have suggested.

from modbus.

nqv avatar nqv commented on June 22, 2024

@gonium Thanks for your pull request, I believe the issue has been fixed. I'd be grateful if you can test and let me know if it works with your device.

You also need to run go get -u github.com/goburrow/modbus to also download github.com/goburrow/serial as I move the serial part to another repository.

Thanks

from modbus.

gonium avatar gonium commented on June 22, 2024

@nqv I just switched from my temporary fork back to your master - now everything works as expected. Please note that I am currently using the SDM630 device in its factory settings: 9600 8N1. I didn't test higher baud rates.

Thank you very much for your help! Closing this for now.

from modbus.

arnavbansal95 avatar arnavbansal95 commented on June 22, 2024

@gonium How to connect Pi to TTL to 485 Converter?

from modbus.

gonium avatar gonium commented on June 22, 2024

Hi @arnavbansal95, I prefer using cheap (as in 3 USD) USB-to-RS485 converters. If you really need to connect directly to the extension header of your RPi you can have a look at the schematics of this Sparkfun RS485 shield.

from modbus.

arnavbansal95 avatar arnavbansal95 commented on June 22, 2024

@gonium Thanks ....I also got a Usb to 485 converter....but I don't know how to install its driver on raspian as I am new to linux....could you help me with that?

from modbus.

NilanjPatel avatar NilanjPatel commented on June 22, 2024

@gonium how you did sleep thing to to read energy meter??

from modbus.

surbhigup avatar surbhigup commented on June 22, 2024

@gonium i am also working on it but didn't get the result. Can you give me some help that how you send query?

from modbus.

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.