Git Product home page Git Product logo

modbus-tk's People

Contributors

ljean avatar orangetux avatar

Watchers

 avatar  avatar

modbus-tk's Issues

Hello

I am glad to have found your project. Was looking for a python modbus library 
and yours looks like it will suit me.

I was then thinking about adding this to django when i saw you have the same 
goal.

Over the next few weeks I will get some modbus hardware to work with. I hope 
we will be productive.

Eric Baker

Original issue reported on code.google.com by [email protected] on 1 Feb 2010 at 2:05

Patch to change the default value of the server address when adding a new master.

This patch sets the default format for a TCP master to be 0.0.0.0.  It also 
changes the format back to 0 for a RTU master.  A jquery function was added to 
change format based on the selection of the dropdown box (TCP or RTU).

Please note, it requires jquery 1.4+.  I had to add some element ids in order 
for the jquery function to work properly.  I also changed the script source to 
reference jquery instead of a specific version.


The reason for this patch is that I was confused what went into the server 
address box when I first started looking at the web hmi.  I think this would 
help clear things up a bit for newcomers.

Original issue reported on code.google.com by [email protected] on 30 Jun 2010 at 1:55

Attachments:

WebHMI should show an error if a query failed

What steps will reproduce the problem?
1. Run mysimu.py and master_webhmi.py
2. Show values in the browser
3. Shutdown the simulator

What is the expected output? What do you see instead?
The query fails but no errors is shown.


Original issue reported on code.google.com by [email protected] on 24 Jul 2010 at 2:19

hmi throws an exception if serial is not available

What steps will reproduce the problem?
1. Don't install pyserial
2. run master_webhmi.py
3.

What is the expected output? What do you see instead?
master_webhmi should run the webserver.  I see the following exception.

modbus_tk_svn\hmi>python master_webhmi.py
Warning: serial communication is disabled
Traceback (most recent call last):
  File "master_webhmi.py", line 29, in <module>
    serial.Serial(port=SERIAL)
NameError: name 'serial' is not defined

D:\kgray\My Documents\Software\modbus_tk_svn\hmi>

What version of the product are you using? On what operating system?
Using trunk revision on Windows XP SP3

Please provide any additional information below.
See attached patch for potential fix.

Original issue reported on code.google.com by [email protected] on 29 Jun 2010 at 1:58

Attachments:

web hmi template fix and adding auto refresh

1. The master_results template had a closing body tag instead of an opening one.
2. Added the ability for the results to auto refresh every 5 seconds.  This is 
not ideal but will work until a better solution is available.  I am thinking an 
AJAX update would be best.

See attached patch for the changes.

Original issue reported on code.google.com by [email protected] on 29 Jun 2010 at 6:08

Attachments:

when i got the exception:ModbusInvalidResponseError, "Invalid CRC in response" , it can't execute

What steps will reproduce the problem?
1.master = modbus_rtu.RtuMaster(seri)
2.
while(True):
    try:
        logger.info(master.execute(1, cst.READ_HOLDING_REGISTERS, 13, 1))
    except modbus_tk.modbus.ModbusError, e:
        logger.error("%s- Code=%d" % (e, e.get_exception_code()))
    except modbus_tk.modbus_rtu.ModbusInvalidResponseError, e:
        logger.error("ModbusInvalidResponseError: %s"%e)

3.
    when i got the exception:ModbusInvalidResponseError, it could not work
and has no reponse in the loop. in the console it displays: 
DEBUG   modbus.execute  Thread-1 -> 1-3-0-13-0-1-21-201


What is the expected output? 
A:ModbusInvalidResponseError, "Invalid CRC in response"

What do you see instead?
A:DEBUG modbus.execute  Thread-1 -> 1-3-0-13-0-1-21-201

What version of the product are you using? 
A:0.3.2

On what operating system?
A:windows xp sp3

Please provide any additional information below.
Forgive my poor English


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

Link to Discussion group

In the main page you should link to http://groups.google.com/group/modbus-tk 
rather than http://groups.google.fr/group/modbus-tk

A french GUI is not very useful for non-french speakers.

Greets!

Original issue reported on code.google.com by [email protected] on 7 Jul 2010 at 6:09

Error when changing the verbosity of the simulator

What steps will reproduce the problem?
1. Create a script with the modbus test kit simulator 
2. call the set_verbose function of the server

What is the expected output? What do you see instead?
The verbosity should change. An exception is raised du to unknown function name



Original issue reported on code.google.com by [email protected] on 14 Oct 2009 at 8:21

Error trying master_webhmi.py

Hi, I'm from Valencia, Spain.
I'm working on an Efficiency Energy project and I have to publish on the
Internet the data from some modbus energy meters like this one
(http://www.gavazzionline.com/pdf/EM2172DDS.pdf).

I'm trying to test your code. I don't know too much about python but I have
this error when trying the HMI you provide in r106:

$ python master_webhmi.py 
master_webhmi.py:46: Warning: 'with' will become a reserved keyword in
Python 2.6
  File "master_webhmi.py", line 46
    with self._get.db() as conn:
            ^
SyntaxError: invalid syntax

I'm using Debian with Python 2.5.2 and I have sqlite3 and python-sqlite2
installed.

Original issue reported on code.google.com by [email protected] on 16 Apr 2010 at 12:56

Works with Temco T3-8IO and T3-8I13O

Just tested with a Temco Controls T3-8IOA (8 Analog in/8 Analog Out) and T3-
8I13O (8 Analog in / 13 Relay out).

Seems to work fine. The unit comes configured as ID #254.

Changed a line in modbus_rtu.py to:

if (self._request_address < 0) or (self._request_address > 255):

to allow unit IDs up to 255. The equipment will always respond to unit #255, 
this allows you to find the device easier to see what unit id it has.

Also have a Temco T5E thermostat here, but still need to test it.

Original issue reported on code.google.com by [email protected] on 6 Feb 2010 at 6:26

Suggested enhancement for modbus write callback...

Would be nice if the app developer could supply a callback that is invoked as a 
result of a modbus write.

Please see attached modbus_tk/modbus.py patch (against r120).


Example use:

from modbus_tk.modbus import ModbusBlockWrite

class MBCoilWrite(ModbusBlockWrite):
  """Callback from modbus_tk library for coil writes"""

  def __init__(self, em, name, id_list):
    ModbusBlockWrite.__init__(self)
    self.em = em
    self.name = name
    self.id_list = id_list
    logger.debug("MBCoilWrite.__init__(%s, %s)" % (self.name, self.id_list))

  def __call__(self, offset, value):
    """Write method"""
    logger.debug("%s.__call__(%u, %u)" % (self.name, offset, value))
    assert(0 <= offset and offset < len(self.id_list))
    self.em.coil_write.send_cmd(self.id_list[offset], value)


Thanks,
Bob

Original issue reported on code.google.com by [email protected] on 11 Oct 2010 at 11:04

Attachments:

RTU modbus slave inner char time problems

What steps will reproduce the problem?
1.
I found a problem when using the library as the Modbus RTU Slave on baudrate 
9600bps. The library presents me the "Invalid CRC in request" when I send a 
FC16 cmd from WAGO I/O 750-841. Finaly the problem was the inner char timing -- 
one frame was received as the two separated ones.

What is the expected output? What do you see instead?

FC16 frame should be accepted as the FC16 frame not as two separated frames. 
This gives the CRC exception.

What version of the product are you using? On what operating system?
0.4

Please provide any additional information below.

See the code, the modbus_rtu.py, RtuServer class where the inner timing is 
calculated from the baudrate parameter (i.e. self._t0)

self._serial.interCharTimeout = 1.5 * self._t0
self._serial.timeout = 1.5 * self._t0

when I change it to

self._serial.interCharTimeout = 5 * self._t0
self._serial.timeout = 5 * self._t0

all works pretty well and the bug was fixed. Can you add some parameter to 
change the 1.5 constant?

Original issue reported on code.google.com by [email protected] on 23 Jul 2010 at 8:46

RTU master communnication is not adequate for multiple fast queries

The RTU master queries are waiting for communication timeout in order to
detect the end of the response. 

It is not adequate for multiple fast queries.

A possible quick-fix would be to add an expected_length as input parameter
and to return when the corresponding number of byte is received


Original issue reported on code.google.com by [email protected] on 5 Jan 2010 at 6:20

server error: could not open port COM1: [Error 5] Access is denied.

When running example rtuslave_example.py get the following error

server error: could not open port COM1: [Error 5] Access is denied.

rtumaster_example.py seems to open serial port ok - have no modbus device
so get time out...

C:\Temp\_py\modbus-tk-0.3.0\examples>python.exe rtumaster_example.py
2009-11-09 09:45:38,700 INFO    rtumaster_example.<module>      MainThread
connected
2009-11-09 09:45:38,700 DEBUG   modbus.execute  MainThread      ->
1-3-0-100-0-3
-68-20
2009-11-09 09:45:43,730 DEBUG   modbus.execute  MainThread      <-
Traceback (most recent call last):
  File "rtumaster_example.py", line 32, in <module>
    logger.info(master.execute(1, cst.READ_HOLDING_REGISTERS, 100, 3))
  File "build\bdist.win32\egg\modbus_tk\utils.py", line 28, in new
modbus_tk.modbus.ModbusInvalidResponseError: Response length is invalid 0


using:
modbus-tk-0.3.0
python26
windows xp
new to python

Thank you
Regards
Michael

Original issue reported on code.google.com by [email protected] on 9 Nov 2009 at 9:49

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.