ljean / modbus-tk Goto Github PK
View Code? Open in Web Editor NEWCreate Modbus app easily with Python
License: Other
Create Modbus app easily with Python
License: Other
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
Is it possible to have a 32 bit value and let the library to split in 2 16 bit
registers automatically ?
If so, could you please send me an example ?
Thanks !!
Platform: ARM
OS: Linux
Python version: 2.6.3
Original issue reported on code.google.com by [email protected]
on 29 Nov 2012 at 6:38
Modbus-tk is currently not available on Pypi. Is there a reason for this? If
not, should we add it to this platform?
Original issue reported on code.google.com by [email protected]
on 12 Aug 2013 at 1:43
The DIAGNOSTIC function was added on Oct 12.
The implementation has a 16-bit sub-function value and a number of 8-bit data
items.
According to the modbus application protocol document chapter 6.8 the data
field is "Nx2 Bytes", and all the documented sub-functions have 16-bit input
and output data. (except for sub-function 3 which concerns the ASCII protocol).
I suggest the implementation be changed to use 16-bit data items by default.
This would make it more conforming and also easier to use.
The changes involve the default input and output formats from ">B" to ">H", and
the default expected_length calculation to "expected_length =
2*len(output_value)+6" to account for 2 bytes pr output_value.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2012 at 7:33
What steps will reproduce the problem?
RtuMaster.execute(slave_number, WRITE_SINGLE_REGISTER,
address, output_value=-123)
What is the expected output? What do you see instead?
Exception : struct.error: integer out of range for 'H' format code
line 254, module modbus.py
What version of the product are you using? On what operating system?
0.4.1
Please provide any additional information below.
It is not a real bug. But it would be nice to have an 'output data format' as
there is the 'data_format' parameter for input data.
I'm using an Eurotherm 2404 regulator driving a thermal chamber that can set
negative temperatures. Negative temperatures are coded in two's complement so
the output value could be packed with the 'h' data format of the struct.pack
function.
Original issue reported on code.google.com by [email protected]
on 24 Jan 2012 at 3:23
Added FC7 (READ_EXCEPTION_STATUS), FC8 (DIAGNOSTIC) and FC23
(READ_WRITE_MULTIPLE_REGISTERS) to the Master class.
Original issue reported on code.google.com by [email protected]
on 12 Oct 2011 at 11:30
Attachments:
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
In modes protocol, the distinctions between inputs and outputs, and between bit-addressable and wordaddressable data items, do not imply any application behavior. It is perfectly acceptable, and very common, to regard all four tables as overlaying one another, if this is the most natural interpretation on the target machine in question.
Is there any way of having a modbus-tk tcp server with the all four tables overlaying one another?
For example, if I have a modbus-tk tcp server:
slave_1 = server.add_slave(1)
slave_1.add_block('1', cst.HOLDING_REGISTERS, 0, 100)
Can I write the single bit (coil) number 4 in holding registers 2 with somethign like this (executed in a modbus-tk tcp master connected to my modbus-tk server):
result = master.execute(1, modbus_tk.defines.WRITE_SINGLE_COIL, 16 + 4 + 1, output_value=1)
What steps will reproduce the problem?
1. start server
2. add a rtu master for com port 11. click add, protocol = rtu, server address
= port:10,baudrate=19200,parity='E'
3.
What is the expected output? What do you see instead?
Error, additional parameters after port not accepted.
If I add these lines before self.modbus = modbus_rtu.RtuMaster(s)
s.baudrate=19200
s.parity='E'
print "serial settings: ", s
And then use port:10 will successfully add master.
What version of the product are you using? On what operating system?
0.4.1. Winxp.
Please provide any additional information below.
What's the correct form of input parameters? Do I need put a quote ""?
Original issue reported on code.google.com by [email protected]
on 9 Feb 2011 at 9:50
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
One thing that would be useful is to be able to receive replies with
an unknown length. This is relevant in the "Report Slave ID" function.
There are many modbus functions that have a response with
<functionCode> <byteCount> at the start, and it is possible to decode
this in the masters _recv function and use the byteCount instead of
the expected_length parameter.
Original issue reported on code.google.com by [email protected]
on 1 Feb 2012 at 8:39
The link for the homepage references the retired Google Code page rather than the github one.
I'm using SIN-8 device and it's slaveid address is Feh (or FFh in it's
configuration mode).
However, modbus-tk does not allow me to use value > 247.
I use version 0.4.0, this issue exists bot on Windows XP and Ubuntu 10.10.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2010 at 2:56
What steps will reproduce the problem?
1.READ_WRITE_MULTIPLE_REGISTERS (0x17)- is not working
2.
3.
What is the expected output? What do you see instead?
Write and read the register
What version of the product are you using? On what operating system?
modbus-tk-e30742768fd9
Please provide any additional information below.
using the Spyder as IDE and it says starting_addressW_FC23 is undefined.
Original issue reported on code.google.com by [email protected]
on 6 Dec 2013 at 2:00
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:
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
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:
Hi,
JFYI.
I have been working on modbus simulator based on modbus-tk and gui built with kivy .
https://github.com/dhoomakethu/kivy-modbus-simu
feel free to use/share and report any issues.
At present , It only supports modbus tcp ,but I am working to enable serial part as well.
Regards
Sanjay
What steps will reproduce the problem?
1. Create new RTUMaster object with defined serial port.
2. Start program.
What is the expected output? What do you see instead?
Expected is normal behaviour of library, but ResponseLengthError is raised.
Because of to small timeout this error is raised.
Original issue reported on code.google.com by [email protected]
on 26 Mar 2013 at 11:04
This is superb implementation and I have been connecting successfully to an
RTU using Modbus TCP/IP over Ipsec for several months.
However the following issue means that the Slave has to be restarted regularly:
1. The connection is over Ipsec and the other end (Cisco, out of my control)
renegotiates the connection every 20 mins
2. When the connection is re-established the Master connects with a new Socket
3. This leads to a 'climb' up the sockets and eventually the Slave freezes.
4. on restart the address is often claimed to be in use
I think there are two issues:
a) using a new socket each time
b) not releasing the address
I suspect b is the socket library but any help on a) or if it is a bug would be
great.
I am using 0.4.2 on Ubuntu 12.04 server, Python 2.7 latest
Original issue reported on code.google.com by [email protected]
on 2 Sep 2013 at 9:30
Run functest_modbus_rty.py with version 0.2.0 under linux. The tests fail
because it is not possible to open the serial ports
Original issue reported on code.google.com by [email protected]
on 27 Jul 2009 at 1:19
Normally with one Slave/ModbusBlock and a "modbus.ModbusBlock.setitem" hook, the callback works perfectly fine. But, If the server is comprised of multiple Slave/ModbusBock instances (and all have the same register numbers), when the callback occurs, you are given the ModbusBlock, register, register value, etc but not the Slave ID. This makes is difficult to figure out which Slave the client was talking unless you building in your own map/lookup.
Ideally, it would be nice if the callback included the Slave ID as part of its arguments.
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:
As described in
http://stackoverflow.com/questions/17081442/python-modbus-library/21459211#21459
211 the RTU master implementation could read the whole serial buffer instead of
reading by one byte.
suggested modification:
modbus_rtu.py -> class RtuMaster(Master) -> _recv method:
instead: read_bytes = self._serial.read(1)
could use: read_bytes = self._serial.read(expected_length)
or could use: read_bytes = self._serial.read(expected_length) just for the
first pass and then try to read by single byte (to handle case when slave sends
more bytes than it should).
Hanging on read should not be a problem as timeout is used.
Currently for bigger payload CPU load increases drastically and profiling shows
the problem is not in modbus-tk module but in the serial port access by
pywin32. Reducing the number of reads helps a lot making modbus-tk the best
module to implement RTU modbus master over a serial line I know of.
Original issue reported on code.google.com by [email protected]
on 6 Mar 2014 at 10:02
What steps will reproduce the problem?
1. install on Win7
What is the expected output? What do you see instead?
Only egg file is installed in site-packages folder.
Expected fo;lder copy from build to also be copied.
What version of the product are you using? On what operating system?
0.4.2 win 7
Please provide any additional information below.
I am on Win7 64 but using python 2.7 32bit.
I have installed from the unzipped folder using "python setp.py install".
This ran successfully and generated a single file modbus_tk-0.4-py2.7.egg which
it installed in my python2.7/Lib/site-packages folder.
But I was expecting to see a pyd or a folder of py files...
Typing import modbus_tk at python prompt fails with "No module named modbus_tk"
error message.
So I looked under my separate unzipped folder. In there I see a
build/lib/modbus_tk folder. This is the folder I expected to see under the
site-packages folder.
I copied that folder into site-packages and now it works.
Should your installer copy this directory too ?
Original issue reported on code.google.com by [email protected]
on 20 Aug 2012 at 11:37
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
I have a RTU device connected to the serial port of my computer. The device is
configured to write 32 coils (for example 0xCC 0xCC 0xCC 0xCC) using the
WRITE_MULTIPLE_COILS command (FC15) to slave 10.
1. I configure the RtuServer with proper settings
server = modbus_rtu.RtuServer(serial.Serial(port=0, baudrate=9600, bytesize=8,
parity='E', stopbits=1, xonxoff=0))
2. Add the proper slave as configured in the device
slave_1 = server.add_slave(10)
3. I make a block with proper size
slave_1.add_block("block", cst.COILS, 0, 256)
4. And finally start the server
server.start()
The output that I get is following:
RtuServer COM1 is opened
running...
-->10-15-0-0-0-32-4-204
handle request failed: Invalid CRC in request
<--129-4
-->204-204-204-75-150
handle request failed: Invalid CRC in request
<--129-4
As you know 204 = 0xCC, so my 32 coils are the last value in the first request
and the first 3 values in the second request, where I expect only one request
like this:
-->10-15-0-0-0-32-4-204-204-204-204-75-150
which is not the case. That follows to wrong CRC and impossibility to correctly
fulfill the FC15.
I'm using version 0.4.1 on Windows XP SP3.
I tried the same configuration with Modbus Slave program from Modbus Tools and
it's working flawless.
Original issue reported on code.google.com by [email protected]
on 11 Oct 2011 at 8:27
https://code.google.com/p/modbus-tk/source/diff?spec=svn3d323780acb9d388581ea186
b3c1e1c893e1c194&r=3d323780acb9d388581ea186b3c1e1c893e1c194&format=side&path=/mo
dbus_tk/modbus.py
Purpose of code changes on this branch:
Let exceptions raised in Server._do_init() boil up to caller instead of being
catched by a try/except all block.
When reviewing my code changes, please focus on:
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 28 Feb 2015 at 8:40
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
Google Code will be shut down, will this repo be moved to GitHub? If necessary,
I offer to take care of the repo.
Original issue reported on code.google.com by [email protected]
on 26 Mar 2015 at 8:40
Hello,
maybe the following behavior is not ok
1. setup a tcp modbus server and install a coils bank on address 1
2.try the following sequence of command with a client script:
print m.execute(1, cst.READ_COILS, 15, 4)
print m.execute(1, cst.WRITE_MULTIPLE_COILS, 15, 4, [1,1,1,1])
print m.execute(1, cst.READ_COILS, 15, 4)
print m.execute(1, cst.WRITE_MULTIPLE_COILS, 15, 2, [0,0])
print m.execute(1, cst.READ_COILS, 15, 4)
the final output is (0,0,0,1)
i think it should be (0,0,1,1)
maybe the problem is modbus.py Slave._write_multiple_coils
the inner loop boundary set a bit more.
regards
franz
Original issue reported on code.google.com by [email protected]
on 14 Nov 2012 at 5:10
Please review:
https://code.google.com/p/modbus-tk/source/detail?r=7e392a33bd51615f2696307e6b5e
f639589e0d17
Purpose of code changes on this branch:
Add the possibility to work with signed values. It has been implemented in the
class Master, but it was missing in the class Slave.
When reviewing my code changes, please focus on:
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 21 Sep 2013 at 11:45
The problem occurs when you use the port variable that it's returned in string
type, but TcpMaster() need it in 'int' type.
So in line 35 I added the str() cast to host and int() to port.
Original issue reported on code.google.com by [email protected]
on 15 Apr 2011 at 7:07
Attachments:
Only reading functions are supported yet. Writing function would be nice to have
Original issue reported on code.google.com by [email protected]
on 3 Mar 2011 at 10:41
What steps will reproduce the problem?
This test currently fails:
def testWriteMultipleCoilsOffByOne(self):
"""Test that correct coils are written at range edges by writing range within range"""
result = self.master.execute(1, modbus_tk.defines.WRITE_MULTIPLE_COILS, 0, output_value=[1]*20)
self.assertEqual((0, 20), result)
result = self.master.execute(1, modbus_tk.defines.WRITE_MULTIPLE_COILS, 5, output_value=[0]*10)
self.assertEqual((5, 10), result)
self.assertEqual(tuple([1]*5+[0]*10+[1]*5), self.slave1.get_values("c0-100", 0, 20))
What is the expected output? What do you see instead?
See above
What version of the product are you using? On what operating system?
0.4.3
Please provide any additional information below.
I have the fix and associated test case. I will push it once I figure out how mercurial works.
Original issue reported on code.google.com by [email protected]
on 27 Feb 2015 at 3:27
I'm not sure if this is something you're looking for, but I found a minor issue with Python3 compatibility in modbus_tcp.py. It looks like you're in the middle of adding Python3 support, but if not feel free to close/ignore this. Also, I've run 2to3 on a local copy of modbus_tk in addition to the fix outlined below (2to3 didn't seem to catch this one problem).
/usr/local/lib/python3.5/site-packages/modbus_tk-0.5.0-py3.5.egg/modbus_tk/modbus_tcp.py in _recv(self, expected_length)
215 rcv_byte = self._sock.recv(1)
216 if rcv_byte:
--> 217 response += rcv_byte
218 if len(response) == 6:
219 to_be_recv_length = struct.unpack(">HHH", response)[2]
TypeError: Can't convert 'bytes' object to str implicitly
This is because the variable response is initialized like so:
Line 212: response = ""
This works fine in Python2, but not Python3. The fix is simple though, initialize response like this:
Line 212: response = "".encode()
or:
Line 212: response = b""
Though I think the first is a little clearer and more obvious. Probably plenty of other ways to fix this as well, but this is simple and makes my project work well (so far!) with Python3 and modbus_tk!
Using 0.4.0, RTU server
Have a virtual com port - COM11 (Windows XP PC, Python 2.6)
Server starts up ok and when its receives a request it then tries to reply. See
the following screen capture...
Open com11 19200 N
RtuServer com11 is opened
running...
enter 'quit' for closing the server
-->1-3-0-0-0-2-196-11
<--1-3-4-67-3-15-90-154-124
Error while handling request, Exception occurred: WriteFile failed ([Error 995]
The I/O operation has been aborted because of either a thread exit or an
application request.)
No other application is using this com port. Hyper terminal works with the
virtual com port. The following test code works ok...
import serial
print "Test 1"
s = serial.Serial(port="COM11", baudrate=19200, timeout=1)
print "s= %r" % (s)
rx = s.read(10) # read up to ten bytes (timeout)
print "rx= %r" % (rx)
tx = s.write("hello\n")
print "tx= %r" % (tx)
s.close()
Thank you
Regards
Michael
Original issue reported on code.google.com by [email protected]
on 8 Dec 2010 at 2:56
What steps will reproduce the problem?
1. Create master
2. click add
3. list only two functions
What is the expected output? What do you see instead?
Expect to see "read input registers", "write single coils", etc.
What version of the product are you using? On what operating system?
0.4.1, on windows xp.
Please provide any additional information below.
I have add these two function codes. See attached.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2011 at 9:43
Attachments:
Added FC7 (READ_EXCEPTION_STATUS), FC8 (DIAGNOSTIC) and FC23
(READ_WRITE_MULTIPLE_REGISTERS)
Original issue reported on code.google.com by [email protected]
on 12 Oct 2011 at 11:33
Attachments:
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
The TCP server is bound on the localhost address by default. It means that by
default, it doesn't accept queries coming from another machine on the network.
This can be fixed easily in the app by creating the TcpServer instance this way:
modbus_tcp.TcpServer(address='')
However, the current situation may be difficult to understand and cause
unecessary investigations.
There are several ways for fixing that:
* Keep current situation but improve the docs
* Force the address arg to be explicit : This would break existing apps
* Use '' as default value : that would change behavior of existing apps
Original issue reported on code.google.com by [email protected]
on 7 Jun 2012 at 7:09
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
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
when databank raises an error
the modbus server sends a malformed message
I think the issue is due to a malformed pdu
at the end of Databank.handle_request
maybe a query.build_response should be called to wrap the response
f
Original issue reported on code.google.com by [email protected]
on 19 Nov 2012 at 3:07
I see the following deprecation warning when running the code. The modbus
slave that I am talking to is a Watlow F4 controller / temp chamber.
C:\Python25\lib\site-packages\modbus_tk-0.4-py2.5.egg\modbus_tk\modbus.py:254:
DeprecationWarning: struct integer overflow masking is deprecated
pdu = struct.pack(">BHH", function_code, starting_address, output_value)
C:\Python25\lib\site-packages\modbus_tk-0.4-py2.5.egg\modbus_tk\modbus.py:254:
DeprecationWarning: 'H' format requires 0 <= number <= 65535
pdu = struct.pack(">BHH", function_code, starting_address, output_value)
What version of the product are you using? On what operating system?
I am running with Python 2.5 in Windows Vista.
Please provide any additional information below.
Original issue reported on code.google.com by mark.tekippe
on 22 Nov 2010 at 11:49
When a TcpServer fails to bound to a socket (because it is already in use or
user hasn't proper permissions) the TcpServer hangs.
The TcpServer hangs because the `_do_init()` method is called within a
try/catch all statement.
try:
self._do_init()
while self._go.isSet():
self._do_run()
LOGGER.info("%s has stopped" % self.__class__)
self._do_exit()
except Exception, excpt:
LOGGER.error("server error: %s" % str(excpt))
self._make_thread() #make possible to rerun in future
I think that the call to `self_do_init()` should be done outside try/catch
block. These exception must boil up to caller.
Original issue reported on code.google.com by [email protected]
on 28 Feb 2015 at 7:50
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:
Great library - could you please upload it to the Python Package Index so we
can install it using easy_install, pip etc? Maybe it could be automated in your
PyAnt build file..
Thanks!
Original issue reported on code.google.com by [email protected]
on 15 May 2012 at 9:08
detect RTU exception responses without a timeout and to get the proper
exception instead.
Original issue reported on code.google.com by [email protected]
on 1 Feb 2012 at 8:40
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.