Coder Social home page Coder Social logo

arduino-modbus-slave's People

arduino-modbus-slave's Issues

Trouble serving registers

What steps will reproduce the problem?
1. Connect with Industrial controller that is a Master
2. Read any address other than 0 and found that 30001 and other registers 
return zero
3. Try a PLC (Automation Direct Click ) and duplicate problem.

What is the expected output? What do you see instead?
Using test program provided, instead of random numbers only see 0 for anything 
other than register zero or one.

What version of the product are you using? On what operating system?
Latest Arduino as of today and latest libraries as of today.

Please provide any additional information below.
Will test with a different HMI and will report

Original issue reported on code.google.com by [email protected] on 10 May 2014 at 5:01

Baud rate intermessage timing issue and coil/digital register problem.

What steps will reproduce the problem?
1.
Run it with any baud rate above 19200. Use it with > 8 coil or digital 
registers.

2.
Inter-message timing calculation is not right for all baud rates, refer 
http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf page 13. 

The existing code uses baud as type word, which has max value of 65535, 
therefore any baud over that doesn't work. 

Also above 19200, inter-message delay should be 1750ms (Fixed). 

3.
Coil and digital types only populate one byte for return packet (equivalent to 
8 contiguous digital or coil registers).

What is the expected output? - Non-fragmented messages above 19200 baud and 
ability to utilise 100+ coil and digital registers. 

What do you see instead? fragmented messages above 19200 and only the first 8 
contiguous digital or coil registers are returned to master.

What version of the product are you using? - Version 0.01b.

On what operating system? - Arduino

Please provide any additional information below.
See files attached for fixes that work for my application.
I have tested at 19200, 38400 and 115200 and packets look okay. 
I have also tested with 100 coil registers and all are returned correctly. 
Need to test digis and i suspect that analogues have similar issue.
Cheers, Ben


Original issue reported on code.google.com by [email protected] on 18 Nov 2014 at 1:32

Attachments:

Uncommon serial setup

When using your library on a Arduino DUE with a RS485 sheelt I had the 
following problems:

Message framing detection did not work. The MODBUS I connect to runs at 57600 
bps. This results in modbusSlave::_frameDelay being set to 0. For all MODBUS 
messages I received the first byte was detected as a frame of only one byte 
length. All messages were then rejected as having invalid CRC.

I think the calculation is even broken for slower MODBUS buses. The current 
code calculates the time considered as a frame gap as 24000/baud (milli 
seconds). This seems to be calculated as 3 characters of 8 bit length each. But 
on the one hand a character has a length of 11 bit and on the other hand the 
spec defines the frame to be at least 3.5 characters in length. Therefore I 
think the correct division would be 38500/baud (milli seconds).

I also think, that it is incorrect to setup the serial port as 8N1. The 
required to implement mode is 8E1 (having an even parity bit). No-parity is 
allowed, but is a MAY in the specification and you need an extra stop bit in 
that case resulting in 8N2.

Original issue reported on code.google.com by [email protected] on 23 Oct 2013 at 11:15

If communicating with Mach3 CNC software and write to multiple Analog Outputs reg. cant get respons from library

If communicating with Mach3 CNC software (ower USB) and write to multiple 
Analog Outputs reg. then can't get answer from modbus library.

Mach3 sends hex: 01 10 00 00 00 05 0A 00 00 00 00 00 00 00 00 00 00 01 F8, (10 
reg.) but no responds. Is this function implemented?

write to single Analog Outputs (01 06 ....) works.
Reading Analog Inputs with Mach3 works.

I use Arduino Micro.

Original issue reported on code.google.com by [email protected] on 15 Dec 2013 at 3:18

Slave hangs after some modbus scans.

What steps will reproduce the problem?
1. Connect multiple Modbus slaves in RS485 network
2.
3.

What is the expected output? What do you see instead?
With 0.01b version :-
After approximately around 345 scans, the code stops.
With 0.02b version :-
After approximately around 670 scans, the code stops.

What version of the product are you using? On what operating system?
0.01b & 0.02b, Arduino 1.66

Please provide any additional information below.
Added 4 input status registers, 2 input registers.
Baud 9600
Note: With just 1 modbus slave connected to Master over RS845,
this problem is not faced.

Can you please advice, how to overcome this problem ?

Thanks in Advance.

Regards,
Shan

Original issue reported on code.google.com by [email protected] on 30 Jun 2015 at 8:35

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.