minimalmodbus-list Mailing List for minimalmodbus (Page 6)
Status: Beta
Brought to you by:
pyhys
This list is closed, nobody may subscribe to it.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
(6) |
Aug
(1) |
Sep
(2) |
Oct
(3) |
Nov
(1) |
Dec
(4) |
2013 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(9) |
Sep
|
Oct
|
Nov
(5) |
Dec
(3) |
2014 |
Jan
(11) |
Feb
(2) |
Mar
(1) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(7) |
Nov
(3) |
Dec
|
2015 |
Jan
(2) |
Feb
(6) |
Mar
|
Apr
(2) |
May
(5) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(3) |
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
(5) |
May
|
Jun
|
Jul
(1) |
Aug
(11) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2017 |
Jan
|
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jonas B. <jon...@ho...> - 2012-12-08 15:07:35
|
Hi Paddy, and sorry for the delay in my response. To change the baudrate, you should use: instrument.serial.baudrate = 9600 It is described in more detail on http://minimalmodbus.sourceforge.net/index.html#default-values To see all the settings, you can use: print(instrument) Your code should look something like: #!/usr/bin/env python import minimalmodbus minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True instrument = minimalmodbus.Instrument('com3', 1) # port name, slave address (in decimal) instrument.debug = True instrument.serial.baudrate = 9600 print(instrument) print( instrument.read_register(2822, numberOfDecimals=1, functioncode=3)) The output produced by MinimalModbus seems to be correct: '\x01\x03\x0b\x06\x00\x01f/' Displayed Hex Dec Description \x01 01 1 Slave address (here 1) \x03 03 3 Function code (here 3 = read registers) \x0b 0b 11 Start address MSB \x06 06 6 Start address LSB \x00 00 0 Number of registers MSB \x01 01 1 Number of registers LSB f 66 106 CRC LSB / 2F 47 CRC MSB The register address is 11*256 + 6 = 2822 The CRC seems to be correct: >>> minimalmodbus._calculateCrcString('\x01\x03\x0b\x06\x00\x01') 'f/' Please paste the output from the code above in an e-mail, and I will help you solve the problem. Best regards Jonas <-----Ursprungligt Meddelande-----> From: Paddy Finn [pad...@gm...] Sent: 3/12/2012 6:06:09 PM To: min...@li... Subject: [Minimalmodbus-list] Error with MinimalModbus Hiya, I am trying to use MinimalModbus with Python33 on a Windows 64-bit system. The USB->RS485 device is a PL2303 which sets up a virtual COM port on COM3. The modbus device I'm reading is an energy meter with a baud rate of 9600, byte size of 8 bits, no parity, and 1 stop bit. I know that it is correctly set up as I can use some ModBus polling software querying COM3 with the aforementioned settings. I am using the following python code to attempt to read the device using MinimalModbus: #!/usr/bin/env python import minimalmodbus minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True print(minimalmodbus._getDiagnosticString()) print(minimalmodbus.BAUDRATE) instrument = minimalmodbus.Instrument('com3', 1) # port name, slave address (in decimal) instrument.debug = True instrument.CLOSE_PORT_AFTER_EACH_CALL = True instrument.BAUDRATE = 9600 instrument.BYTESIZE = 8 instrument.STOPBITS = 1 print(instrument.BAUDRATE) print( instrument.read_register(2822, numberOfDecimals=1, functioncode=3)) But unfortunately it is returning the following: 19200 9600 MinimalModbus debug mode. Writing to instrument: '\x01\x03\x0b\x06\x00\x01f/' MinimalModbus debug mode. Response from instrument: '' Traceback (most recent call last): File "C:/Python33/Register Python.py", line 16, in <module> print( instrument.read_register(2822, numberOfDecimals=1, functioncode=3)) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 174, in read_register return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 261, in _genericCommand payloadFromSlave = self._performCommand(functioncode, payloadToSlave) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 317, in _performCommand response = self._communicate(message) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 395, in _communicate raise IOError('No communication with the instrument (no answer)') OSError: No communication with the instrument (no answer) I have no idea where to start to find the problem and I was hoping that you could perhaps shed some light on what it is that I am doing wrong. Thanks a million!! Paddy <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://adserver.adtech.de/?adlink|3.0|1297|4132301|1|16|AdId=8371245;BnId=1;link=http://www.vistaprint.se/vp/gateway.aspx?S=7280236673" target="_blank">Grattis! Nu kan du få en unik väggkalender gratis! Ladda upp dina favoritfoton och gör varje månad minnesvärd! Beställ nu och få en fotomugg på köpet!</a></font> |
From: Paddy F. <pad...@gm...> - 2012-12-03 17:06:21
|
Hiya, I am trying to use MinimalModbus with Python33 on a Windows 64-bit system. The USB->RS485 device is a PL2303 which sets up a virtual COM port on COM3. The modbus device I'm reading is an energy meter with a baud rate of 9600, byte size of 8 bits, no parity, and 1 stop bit. I know that it is correctly set up as I can use some ModBus polling software querying COM3 with the aforementioned settings. I am using the following python code to attempt to read the device using MinimalModbus: #!/usr/bin/env python import minimalmodbus minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True print(minimalmodbus._getDiagnosticString()) print(minimalmodbus.BAUDRATE) instrument = minimalmodbus.Instrument('com3', 1) # port name, slave address (in decimal) instrument.debug = True instrument.CLOSE_PORT_AFTER_EACH_CALL = True instrument.BAUDRATE = 9600 instrument.BYTESIZE = 8 instrument.STOPBITS = 1 print(instrument.BAUDRATE) print( instrument.read_register(2822, numberOfDecimals=1, functioncode=3)) But unfortunately it is returning the following: 19200 9600 MinimalModbus debug mode. Writing to instrument: '\x01\x03\x0b\x06\x00\x01f/' MinimalModbus debug mode. Response from instrument: '' Traceback (most recent call last): File "C:/Python33/Register Python.py", line 16, in <module> print( instrument.read_register(2822, numberOfDecimals=1, functioncode=3)) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 174, in read_register return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 261, in _genericCommand payloadFromSlave = self._performCommand(functioncode, payloadToSlave) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 317, in _performCommand response = self._communicate(message) File "C:\Python33\lib\site-packages\minimalmodbus.py", line 395, in _communicate raise IOError('No communication with the instrument (no answer)') OSError: No communication with the instrument (no answer) I have no idea where to start to find the problem and I was hoping that you could perhaps shed some light on what it is that I am doing wrong. Thanks a million!! Paddy |
From: Jonas B. <jon...@ho...> - 2012-11-03 14:35:19
|
Hi Andreas, and thanks for using MinimalModbus. I think your problem is local echo of the sent message. The request was '\x01\x03\x00\x03\x00\x01t\n', so you are reading one register (number 3) on slave 1 using function code 3. Register 3 is "Torque command monitor". Disp Dec Description \x01 1 Slave address (here 1) \x03 3 Function code (here 3 = Read holding registers) \x00 0 Start address MSB \x03 3 Start address LSB \x00 0 Number of registers MSB \x01 1 Number of registers LSB t 116 CRC LSB \n 10 CRC MSB >>> minimalmodbus._calculateCrcString("\x01\x03\x00\x03\x00\x01") 't\n' The CRC seems to be OK. To make these calculations, see http://minimalmodbus.sourceforge.net/index.html#example and http://minimalmodbus.sourceforge.net/develop.html#other-useful-internal- functions Note that the response is exactly the same as the request. This is wrong, as the the response should have a slightly different format as seen in http://minimalmodbus.sourceforge.net/#modbus-implementation-details The most likely cause is that you have local echo enabled in your USB-to-RS485 adaptor. Make a test to remove the adaptor from the instrument (but still connected to the computer), and see if you still have a response. Most adaptors have switches to select echo ON/OFF. This can be done in a number of ways. * A DIP-switch inside the plastic cover. * A jumper inside the plastic cover. * Shorting two of the pins in the 9-pole D-SUB connector turns off the echo for some models. * If based on a FTDI chip, some special program can be used to change a chip setting for disabling echo. It would be great if you can provide some more details on your adaptor, and I might be able to help you. Best regards Jonas <-----Ursprungligt Meddelande----- From: Cap...@gm... [Cap...@gm...] Sent: 31/10/2012 6:55:56 PM To: min...@li... Subject: [Minimalmodbus-list] minimal Modbus Hello my name is Andreas, im a student and currently working on my bachelor thesis in electrical engineering.. This is my first time working with python and also with the modbus protocol, so i was really glat to see your minimal modbus modul. Thanks for all the work. I "just" need to read a "few" register via modbus rtu. With my modbuspoll tool i get the right strings but in python.... the pdf of the instrument im working with: www.hitachi-ds.com/hitachi-ds/dms/downloads/ad.../ADAX4.pdf And here is the test code and also the console include error and diagnosticstring Thanks for looking into it :) ''' Created on 16.10.2012 @author: Andreas ''' import minimalmodbus print minimalmodbus._getDiagnosticString() #minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True class Driver_Servo(minimalmodbus.Instrument): ''' classdocs ''' def __init__(self, portname , slaveaddress): minimalmodbus.Instrument.__init__(self, portname, slaveaddress) #self.serial.timeout = 10 def current_speed(self): return self.read_register(3, 1 ) #def current_torque(self): # return self.read_register(4, 1 ) ''' Constructor ''' if __name__ == '__main__': minimalmodbus._print_out( 'TESTING DriverServo') a = Driver_Servo('/com3', 1) a.debug = True minimalmodbus._print_out( 'Umdrehungen: '.format( a.current_speed() )) # minimalmodbus._print_out( 'Drehmoment: '.format( a.current_torque() )) pass ## Diagnostic output from minimalmodbus ## Minimalmodbus version: 0.4 Minimalmodbus status: Beta Revision: $Rev: 166 $ Revision date: $Date: 2012-09-08 23:32:11 +0200 (Sat, 08 Sep 2012) $ File name (with relative path): C:\Python27\lib\site-packages\minimalmodbus.pyc Full file path: C:\Python27\lib\site-packages\minimalmodbus.pyc pySerial version: 2.6 pySerial full file path: C:\Python27\lib\site-packages\serial\__init__.pyc Platform: win32 Filesystem encoding: 'mbcs' Byteorder: little Python version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] Python version info: sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0) Python flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0) Python argv: ['C:\\Users\\Bernd\\Desktop\\Python\\IPTEST\\Driver_Servo.py'] Python prefix: 'C:\\Python27' Python exec prefix: 'C:\\Python27' Python executable: 'C:\\Python27\\python.exe' Long info: sys.long_info(bits_per_digit=15, sizeof_digit=2) Float repr style: 'short' Variable __name__: minimalmodbus Current directory: C:\Users\Bernd\Desktop\Python\IPTEST Python path: C:\Users\Bernd\Desktop\Python\IPTEST C:\Users\Bernd\Desktop\Python\IPTEST C:\Python27\DLLs C:\Python27\lib C:\Python27\lib\plat-win C:\Python27\lib\lib-tk C:\Python27 C:\Python27\lib\site-packages C:\Python27\lib\site-packages\PIL C:\Python27\lib\site-packages\win32 C:\Python27\lib\site-packages\win32\lib C:\Python27\lib\site-packages\Pythonwin C:\Python27\lib\site-packages\wx-2.8-msw-unicode C:\Windows\system32\python27.zip ## End of diagnostic output ## TESTING DriverServo MODBUS MODULE MinimalModbus debug mode. Writing to instrument: '\x01\x03\x00\x03\x00\x01t\n' MinimalModbus debug mode. Response from instrument: '\x01\x03\x00\x03\x00\x01t\n' Traceback (most recent call last): File "C:\Users\Bernd\Desktop\Python\IPTEST\Driver_Servo.py", line 38, in <module> minimalmodbus._print_out( 'Umdrehungen: '.format( a.current_speed() )) File "C:\Users\Bernd\Desktop\Python\IPTEST\Driver_Servo.py", line 23, in current_speed return self.read_register(3, 1 ) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 209, in read_register return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals, signed=signed) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 650, in _genericCommand _checkResponseByteCount(payloadFromSlave) # response byte count File "C:\Python27\lib\site-packages\minimalmodbus.py", line 1705, in _checkResponseByteCount raise ValueError(errortext) ValueError: Wrong given number of bytes in the response: 0, but counted is 3 as data payload length is 4. The data payload is: '\x00\x03\x00\x01' <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://spraydate.spray.se" target="_blank">Dejta gratis på Spraydate - Sveriges största dejtingsajt. Bli medlem gratis idag!</a></font> |
From: <Cap...@gm...> - 2012-10-31 18:56:11
|
Hello my name is Andreas, im a student and currently working on my bachelor thesis in electrical engineering.. This is my first time working with python and also with the modbus protocol, so i was really glat to see your minimal modbus modul. Thanks for all the work. I „just“ need to read a „few“ register via modbus rtu. With my modbuspoll tool i get the right strings but in python.... the pdf of the instrument im working with: www.hitachi-ds.com/hitachi-ds/dms/downloads/ad.../ADAX4.pdf And here is the test code and also the console include error and diagnosticstring Thanks for looking into it :) ''' Created on 16.10.2012 @author: Andreas ''' import minimalmodbus print minimalmodbus._getDiagnosticString() #minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True class Driver_Servo(minimalmodbus.Instrument): ''' classdocs ''' def __init__(self, portname , slaveaddress): minimalmodbus.Instrument.__init__(self, portname, slaveaddress) #self.serial.timeout = 10 def current_speed(self): return self.read_register(3, 1 ) #def current_torque(self): # return self.read_register(4, 1 ) ''' Constructor ''' if __name__ == '__main__': minimalmodbus._print_out( 'TESTING DriverServo') a = Driver_Servo('/com3', 1) a.debug = True minimalmodbus._print_out( 'Umdrehungen: '.format( a.current_speed() )) # minimalmodbus._print_out( 'Drehmoment: '.format( a.current_torque() )) pass ## Diagnostic output from minimalmodbus ## Minimalmodbus version: 0.4 Minimalmodbus status: Beta Revision: $Rev: 166 $ Revision date: $Date: 2012-09-08 23:32:11 +0200 (Sat, 08 Sep 2012) $ File name (with relative path): C:\Python27\lib\site-packages\minimalmodbus.pyc Full file path: C:\Python27\lib\site-packages\minimalmodbus.pyc pySerial version: 2.6 pySerial full file path: C:\Python27\lib\site-packages\serial\__init__.pyc Platform: win32 Filesystem encoding: 'mbcs' Byteorder: little Python version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] Python version info: sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0) Python flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0) Python argv: ['C:\\Users\\Bernd\\Desktop\\Python\\IPTEST\\Driver_Servo.py'] Python prefix: 'C:\\Python27' Python exec prefix: 'C:\\Python27' Python executable: 'C:\\Python27\\python.exe' Long info: sys.long_info(bits_per_digit=15, sizeof_digit=2) Float repr style: 'short' Variable __name__: minimalmodbus Current directory: C:\Users\Bernd\Desktop\Python\IPTEST Python path: C:\Users\Bernd\Desktop\Python\IPTEST C:\Users\Bernd\Desktop\Python\IPTEST C:\Python27\DLLs C:\Python27\lib C:\Python27\lib\plat-win C:\Python27\lib\lib-tk C:\Python27 C:\Python27\lib\site-packages C:\Python27\lib\site-packages\PIL C:\Python27\lib\site-packages\win32 C:\Python27\lib\site-packages\win32\lib C:\Python27\lib\site-packages\Pythonwin C:\Python27\lib\site-packages\wx-2.8-msw-unicode C:\Windows\system32\python27.zip ## End of diagnostic output ## TESTING DriverServo MODBUS MODULE MinimalModbus debug mode. Writing to instrument: '\x01\x03\x00\x03\x00\x01t\n' MinimalModbus debug mode. Response from instrument: '\x01\x03\x00\x03\x00\x01t\n' Traceback (most recent call last): File "C:\Users\Bernd\Desktop\Python\IPTEST\Driver_Servo.py", line 38, in <module> minimalmodbus._print_out( 'Umdrehungen: '.format( a.current_speed() )) File "C:\Users\Bernd\Desktop\Python\IPTEST\Driver_Servo.py", line 23, in current_speed return self.read_register(3, 1 ) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 209, in read_register return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals, signed=signed) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 650, in _genericCommand _checkResponseByteCount(payloadFromSlave) # response byte count File "C:\Python27\lib\site-packages\minimalmodbus.py", line 1705, in _checkResponseByteCount raise ValueError(errortext) ValueError: Wrong given number of bytes in the response: 0, but counted is 3 as data payload length is 4. The data payload is: '\x00\x03\x00\x01' |
From: Jonas B. <jon...@ho...> - 2012-10-18 21:04:24
|
Hi Mark, thanks for for your mail. I have been looking at your data, and I agree that it looks a bit strange. You are using an instrument address 1 and a function code 2. The response from your instrument looks like: '\x01\x02\x00\x00\x00\x01\xb9\xca\x01\x02\x01\x00\xa1\x88' \x01 1 Slave address (here 1) \x02 2 Function code (here 2 = Read discrete inputs) \x00 0 \x00 0 \x00 0 \x01 1 \xb9 185 \xca 202 \x01 1 \x02 2 \x01 1 \x00 0 \xa1 161 \x88 136 >>> minimalmodbus._calculateCrcString("\x01\x02\x00\x00\x00\x01\xb9\xca\x01\ x02\x01\x00") '\xa1\xac' As you see, the suggested CRC bytes does not match the last two bytes in your response. That is why there is an error indication. I suspect that your instrument is including the request in the response. The response makes much better sense if it is divided into two parts. Request: \x01 1 Slave address (here 1) \x02 2 Function code (here 2 = Read discrete inputs) \x00 0 Start address MSB \x00 0 Start address LSB \x00 0 Number of inputs MSB \x01 1 Number of inputs LSB \xb9 185 CRC LSB \xca 202 CRC MSB >>> minimalmodbus._calculateCrcString("\x01\x02\x00\x00\x00\x01") '\xb9\xca' Response: \x01 1 Slave address (here 1) \x02 2 Function code (here 2 = Read discrete inputs) \x01 1 Byte count \x00 0 Value \xa1 161 CRC LSB \x88 136 CRC MSB >>> minimalmodbus._calculateCrcString("\x01\x02\x01\x00") '\xa1\x88' In this case the suggested CRC values fit to the bytes given in the request and response. Maybe you can give some more data about your instrument? (Some online PDF manual would be appreciated) To make these calculations, see http://minimalmodbus.sourceforge.net/index.html#example and http://minimalmodbus.sourceforge.net/develop.html#other-useful-internal- functions Best regards Jonas <-----Ursprungligt Meddelande-----> From: Mark Krueger [mj_...@ho...] Sent: 18/10/2012 8:13:11 PM To: min...@li... Subject: [Minimalmodbus-list] crc-16 vs crc-16 (modbus) Just installed minimalmodbus to talk with my modbus device. I had no real problems getting it initialized and started, but it is failing immediately on a CRC error: ValueError: CRC error: 41352 ('\xa1\x88') instead of 41388 ('\xa1\xac'). The response is: '\x01\x02\x00\x00\x00\x01\xb9\xca\x01\x02\x01\x00\xa1\x88' This modbus device has been in use for some time and I've used a couple of different simulators to do testing with success. I wasn't sure why the CRC would be failing. I found an online crc calulator here (http://www.lammertbies.nl/comm/info/crc-calculation.html) and entered the x'01020100' value. It calculated the crc-16 value as x'aca1' and the crc-16 (modbus) value as x'88a1'. Based on this, it seems minimalmodbus is calculating the straight crc-16 value rather than the modbus version of the crc. Is there a parameter that I can set to have it switch to the modbus crc? Thanks. Here is the additional diagnostic info: ## Diagnostic output from minimalmodbus ## Minimalmodbus version: 0.4 Minimalmodbus status: Beta Revision: $Rev: 166 $ Revision date: $Date: 2012-09-08 23:32:11 +0200 (Sat, 08 Sep 2012) $ File name (with relative path): C:\Python27\lib\site-packages\minimalmodbus.pyc Full file path: C:\Python27\lib\site-packages\minimalmodbus.pyc pySerial version: 2.5 pySerial full file path: C:\Python27\lib\site-packages\serial\__init__.pyc Platform: win32 Filesystem encoding: 'mbcs' Byteorder: little Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] Python version info: sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0) Python flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0) Python argv: ['C:/Documents and Settings/mark.*******/My Documents/Automation/Python/modbus1.py'] Python prefix: 'C:\\Python27' Python exec prefix: 'C:\\Python27' Python executable: 'C:\\Python27\\pythonw.exe' Long info: sys.long_info(bits_per_digit=15, sizeof_digit=2) Float repr style: 'short' Variable __name__: minimalmodbus Current directory: C:\Documents and Settings\mark.*******\My Documents\Automation\Python Python path: C:/Documents and Settings/mark.*******/My Documents/Automation/Python C:\Documents and Settings\mark.*******\My Documents\Automation\Python C:\Python27\Lib\idlelib C:\WINDOWS\system32\python27.zip C:\Python27\DLLs C:\Python27\lib C:\Python27\lib\plat-win C:\Python27\lib\lib-tk C:\Python27 C:\Python27\lib\site-packages ## End of diagnostic output ## <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://www.anrdoezrs.net/click-5762941-10467700" target="_top">InkClub.se - Bläckpatron från 1 krona! Klicka här!</a><img src="http://www.tqlkg.com/image-5762941-10467700" width="1" height="1" border="0"/></font> |
From: Mark K. <mj_...@ho...> - 2012-10-18 18:13:20
|
Just installed minimalmodbus to talk with my modbus device. I had no real problems getting it initialized and started, but it is failing immediately on a CRC error: ValueError: CRC error: 41352 ('\xa1\x88') instead of 41388 ('\xa1\xac'). The response is: '\x01\x02\x00\x00\x00\x01\xb9\xca\x01\x02\x01\x00\xa1\x88' This modbus device has been in use for some time and I've used a couple of different simulators to do testing with success. I wasn't sure why the CRC would be failing. I found an online crc calulator here (http://www.lammertbies.nl/comm/info/crc-calculation.html) and entered the x'01020100' value. It calculated the crc-16 value as x'aca1' and the crc-16 (modbus) value as x'88a1'. Based on this, it seems minimalmodbus is calculating the straight crc-16 value rather than the modbus version of the crc. Is there a parameter that I can set to have it switch to the modbus crc? Thanks. Here is the additional diagnostic info: ## Diagnostic output from minimalmodbus ## Minimalmodbus version: 0.4 Minimalmodbus status: Beta Revision: $Rev: 166 $ Revision date: $Date: 2012-09-08 23:32:11 +0200 (Sat, 08 Sep 2012) $ File name (with relative path): C:\Python27\lib\site-packages\minimalmodbus.pyc Full file path: C:\Python27\lib\site-packages\minimalmodbus.pyc pySerial version: 2.5 pySerial full file path: C:\Python27\lib\site-packages\serial\__init__.pyc Platform: win32 Filesystem encoding: 'mbcs' Byteorder: little Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] Python version info: sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0) Python flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0) Python argv: ['C:/Documents and Settings/mark.*******/My Documents/Automation/Python/modbus1.py'] Python prefix: 'C:\\Python27' Python exec prefix: 'C:\\Python27' Python executable: 'C:\\Python27\\pythonw.exe' Long info: sys.long_info(bits_per_digit=15, sizeof_digit=2) Float repr style: 'short' Variable __name__: minimalmodbus Current directory: C:\Documents and Settings\mark.*******\My Documents\Automation\Python Python path: C:/Documents and Settings/mark.*******/My Documents/Automation/Python C:\Documents and Settings\mark.*******\My Documents\Automation\Python C:\Python27\Lib\idlelib C:\WINDOWS\system32\python27.zip C:\Python27\DLLs C:\Python27\lib C:\Python27\lib\plat-win C:\Python27\lib\lib-tk C:\Python27 C:\Python27\lib\site-packages ## End of diagnostic output ## |
From: Angelo C. <ang...@gm...> - 2012-09-10 14:54:25
|
Hi Jonas, First of all, thank you for your wonderful module! I'm using it greedily from a few days and I like it very much. I found a tedious bug in your implementation, on the read side, it always waits to receive MAX_NUMBER_OF_BYTES (1000) bytes so it always times out and makes the entire communication really slugghish and unreliable. I made a really simple patch: def _communicate(self, message): [...] functioncode = ord(message[1]) ## Getting from bus only necessary bytes ## if functioncode == 3: RESPONSE_FRAME_SIZE = 2 + 1 + _twoByteStringToNum(message[4:6])*2 + 2 elif functioncode == 6: RESPONSE_FRAME_SIZE = 2 + 4 + 2 [...] self.serial.write(message) answer = self.serial.read(RESPONSE_FRAME_SIZE) [...] So all I have to do is to calculate an appropriate RESPONSE_FRAME_SIZE for each command before reading from bus. With this, communication goes well and it's really speedy. Another defect is in the design of the library. You warn users everywhere about possible problems arising from using the same serial port multiple times. The problem it's due to the fact that you made a lot of concurrency assumption and specifically your code it's not concurrent at all! So the same device will be opened multiple times (it cannot be done in many oses!) when the device should be shared between instruments and you should have an access control to prevents misusing and race conditions! I would like to contribute and help, but I think sourceforge (with his ancient svn) it's not the better way to go. Have you thought to move the code on github? Thank you for your time! -- Profile: http://it.linkedin.com/in/compagnucciangelo |
From: Vitor F. <vit...@gm...> - 2012-08-23 21:16:52
|
Good evening. My name is Vitor Badiale Furlong and I'm and undergrad student in the Federal University of Rio Grande in southern Brazil. Currently I'm developing my graduation project and a great deal of such is accomplished by utilizing Minimalmodbus. Therefore I would like first to thank all the developers for supplying the free-software community with such remarkable tool. The package is very simple and user friendly, however, I'm having an interesting problem. I'm trying to connect an Arduino board in my modbus network, but every time I try to connect with the board I get the following error: Traceback (most recent call last): File "<ipython console>", line 1, in <module> File "C:\Python27\lib\site-packages\minimalmodbus.py", line 196, in write_register self._genericCommand(functioncode, registeraddress, value, numberOfDecimals) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 261, in _genericCommand payloadFromSlave = self._performCommand(functioncode, payloadToSlave) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 318, in _performCommand payloadFromSlave = _extractPayload(response, self.address, functioncode) File "C:\Python27\lib\site-packages\minimalmodbus.py", line 473, in _extractPayload repr(response) )) ValueError: CRC error: 36874 ('\x90\n') instead of 27359 ('j\xdf'). The response is: '\xe0\x01\x10\x00\r\x00\x01\x90\n' However, the instruction is carried on. If I try to write something, the value is accepted by the digital port and the error comes up. If I try to do another command, it is carried on without displaying the error message. I'm finding this very interesting. If anyone as any suggestion on how to proceed please contact me. As is required, the output for getDiagnosticString() is the following: ## Diagnostic output from minimalmodbus ## Minimalmodbus version: 0.3.2 Minimalmodbus status: Alpha Revision: $Rev: 130 $ Revision date: $Date: 2012-01-25 21:22:28 +0100 (Wed, 25 Jan 2012) $ File name (with relative path): C:\Python27\lib\site-packages\minimalmodbus.pyc Full file path: C:\Python27\lib\site-packages\minimalmodbus.pyc pySerial version: 2.6 pySerial full file path: C:\Python27\lib\site-packages\pyserial-2.6-py2.7.egg\serial\__init__.pyc Platform: win32 Python version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] Python flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0) Variable __name__: minimalmodbus Current directory: C:\Python27\lib\site-packages\xy Python path: C:\Python27\lib\site-packages\pymodbus-0.9.0-py2.7.egg C:\Python27\lib\site-packages\pyserial-2.6-py2.7.egg C:\Python27\lib\site-packages\nose-1.1.2-py2.7.egg C:\Python27\lib\site-packages\zope.interface-3.8.0-py2.7-win32.egg C:\Python27\python27.zip C:\Python27\DLLs C:\Python27\lib C:\Python27\lib\plat-win C:\Python27\lib\lib-tk C:\Python27 C:\Python27\lib\site-packages C:\Python27\lib\site-packages\PIL C:\Python27\lib\site-packages\win32 C:\Python27\lib\site-packages\win32\lib C:\Python27\lib\site-packages\Pythonwin C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg-info C:\Python27\lib\site-packages\IPython/Extensions C:\Users\Servidor\_ipython ## End of diagnostic output ## I thank in advance for your time. I'm looking forward to ear from you. -- * * *Vitor Badiale Furlong* Engenharia de Alimentos Laboratório de Engenharia Bioquímica Escola de Química e Alimentos Universidade Federal do Rio Grande |
From: Rajagopal Y. <raj...@wi...> - 2012-07-07 04:35:51
|
Thanks Jonas for your response. We have installed Linux and will be testing it today. To your responses, 1. We have already set the CLOSE_PORT_AFTER_EACH_CALL=True immediately after import minimalmodbus, but it did not seem to help. I have 4 scripts (one for each instrument) which are scheduled to run every 1 minute, each script reading certain number of registers on a different instrument. Each of this script individually works well, but when run simultaneously we get errors. 2. I will send you the error messages if we get the same on a Linux (Ubuntu) system 3. Thanks for the sample code to read multiple registers. It will help us immensely. May be I am asking a basic question which I am supposed to know, but What is this notation \x00\x05\x00\x01? For example, if I wanted to read 100 registers starting with register 5, would it be \x00\x05\x00\x100? Can you point me to an internet source where I can read up more on this notation? Regards, Rajagopal On Thu, Jul 5, 2012 at 1:49 PM, Jonas Berg <jon...@ho...> wrote: > Hi Rajagopal! > > > The problem I face now is that when I execute read_register statement > against one instrument, the others are not readable. > > This is strange. Try running in interactive mode, as described here: > http://minimalmodbus.sourceforge.net/usage.html#interactive-usage > > Set the value minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL=True immediately > after import minimalmodbus > > Then switch on debug mode, so you can see what actually is sent to/from > the instruments. See: > http://minimalmodbus.sourceforge.net/index.html#develop > http://minimalmodbus.sourceforge.net/usage.html#interactive-usage (end of > section) > > Paste the output (including error messages) into an email, and we will try > to solve the problem. > > > Can I use minimalmodbus to read multiple registers in one read statement? > > Not at the moment, I generally loop through the registers to read. It is > easy to extend MinimalModbus to read several registers. See: > http://minimalmodbus.sourceforge.net/develop.html#extending-minimalmodbus > > Instead of instr.read_register(5) you can use > > instr._performCommand(3, '\x00\x05\x00\x01') > > > Where 3 = function code for reading registers > \x00\x05 = register address (5) > \x00\x01 = number of registers to read (1 here) > > > Just increase the number of registers to read. You need to take care of the return data yourself. > > How the data should be formatted is described here: > http://minimalmodbus.sourceforge.net/index.html#modbus-implementation-details > > > Best regards > > Jonas > > > <-----Ursprungligt Meddelande-----> > > *From: Rajagopal Yadavalli [raj...@wi...]* > Sent: 5/7/2012 4:19:35 AM > To: min...@li... > Cc: nee...@wi... > Subject: [Minimalmodbus-list] reading multiple registers at once > > > My situation is that there are multiple instruments, each with multiple > registers to be read simultaneously with one master using RTU. The problem > I face now is that when I execute read_register statement against one > instrument, the others are not readable. > I have setup > > > minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True > > but it does not help. We are running Windows XP. Now I am installing Linux > on master and will try the same code to see if that is a windows specific > issue, but in the meanwhile, I wanted to check if you have any pointers for > me. > > On the same note, I have another question. Can I use minimalmodbus to read > multiple registers in one read statement, may be provide the read_register > function a register number, and a count of registers from there on to > read.. like instead of > > > instrument.read_register(289, 1) > > > instrument.read_register(289, 10, 1) # where 10 is number of registers to read after 289 > > Is this possible with minimalmodbus? > > Thanks for the help. > Regards, > Rajagopal > > -- > > +91.99490.31262 > > > _______________________________________________________________ > Annons: InkClub.com - Bläckpatron och fotopapper från 1:-<http://www.tkqlhce.com/click-5762941-10467706> > > -- +91.99490.31262 |
From: Jonas B. <jon...@ho...> - 2012-07-05 08:50:12
|
Hi again Alex. Have you got it to work with the standard registers (Integers, size = 1)? For example ALTITUDE_UNITS in register 1015. When it comes to reading floats, I think it would be better to improve MinimalModbus to include a function instrument.read_float(address) that takes care of all data conversion. This will make it much easier for non-experienced programmers to use. Similarly: instrument.write_float(address,value) instrument.read_string(address, [number of characters=16]) instrument.write_string(address, string, [number of characters=16]) I have not used the struct module of Python, but this is an alternative way of handling the internals of MinimalModbus. It would be pretty straight-forward to implement these functions, but I need help with data from your instrument (run it in debug mode), and help with testing it. Please start by using the interactive mode as described here: http://minimalmodbus.sourceforge.net/usage.html#interactive-usage Also switch on the debug mode as described in the end of the section. When you have got the integers to work, we will do some experiments with reading/writing floats and strings. It would be great if you can find some example address for these two, as well as the value that actually is stored in your instrument. Regards Jonas <-----Ursprungligt Meddelande-----> From: Alex van der Spek [zd...@xs...] Sent: 3/7/2012 7:41:52 PM To: jon...@ho... Subject: Re: [Minimalmodbus-list] minimalmodbus Thank you Jonas, I will try to come up with something for this instrument: http://www.cidra.com/?q=content/20959-01-manual-use-modbus-protocol-pass ive-sonar-transmitters As you can see, there are lots of outputs that this instrument provides through many registers but the datatypes are either float or string (16 byte). You are a much more accomplished python programmer than I am. I started with programming as a simple physics student in Algol60 and FORTRAN way back in 1979 and since then have evolved via Pascal and VB(A) to Python and R. Still use FORTRAN (!) and VB(A) but increasingly finding myself working in Python. I had thought of using minimalmodbus and extending it to request a number of bytes, letting the conversion to integer, float or string be handled by the struct module of Python. I have used struct before and would have used the same codes to indicate the datatypes that are requested. So the read_register function would become: instrument.read_register(start_address,number_of_bytes_to_receive,char_c ode_for_struct) Where the latter is for instance '<f' means that 4 bytes received are to be interpreted as a 4 byte floating point number. What do you think? Regards, Alex van der Spek ----- Original Message ----- From: Jonas Berg <mailto:jon...@ho...> To: zd...@xs... <mailto:zd...@xs...> Cc: min...@li... <mailto:min...@li...> Sent: Tuesday, 03 July, 2012 08:57 Subject: Re: [Minimalmodbus-list] minimalmodbus Hi Alex > It looks like the package minimalmodbus read-register function only supports reading 2 byte registers populated with integer values. Yes, this is true. > ...is there a way to make it read 2 consecutive registers storing a 4 byte float? Yes, but you need to do some data manipulation yourself. See: http://minimalmodbus.sourceforge.net/develop.html#extending-minimalmodbu s You basically use instr._performCommand(3, '\x00\x05\x00\x02') where 3=function code for reading registers \x00\x05 is the start address (here 0x0005) \x00\x02 is the number of registers (here 2) Then you need to convert the data payload (the 4 bytes) to a float yourself. Use similar to read your string (8 registers). I think MinimalModbus should be updated to handle these requests more elegantly. Any help is appreciated. The source is very easy to read, so please dive in. The controllers I use only handle integers. Which instrument/controller are you using, so I can have a look in the manual (if it is available on line)? Then I can help implement the missing functions. Best regards Jonas <-----Ursprungligt Meddelande-----> From: Alex van der Spek [zd...@xs...] Sent: 2/7/2012 4:06:21 PM To: min...@li... Subject: [Minimalmodbus-list] minimalmodbus It looks like the package minimalmodbus read-register function only supports reading 2 byte registers populated with integer values. Is this true or is there a way to make it read 2 consecutive registers storing a 4 byte float. Similary, I would be interested in reading 8 consecutive registers storing a 16 byte string. Thank you, Alex van der Spek ------------------------------------------------------------------------ ------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Minimalmodbus-list mailing list Min...@li... https://lists.sourceforge.net/lists/listinfo/minimalmodbus-list . _______________________________________________________________ Annons: Flygpoolen.se - Vi hjälper dig boka din resa på nätet! <http://www.kqzyfj.com/click-5762941-10551066> <http://www.tqlkg.com/image-5762941-10551066> <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://www.tkqlhce.com/click-5762941-10467706" target="_top">InkClub.com - Bläckpatron och fotopapper från 1:-</a><img src="http://www.lduhtrp.net/image-5762941-10467706" width="1" height="1" border="0"/></font> |
From: Jonas B. <jon...@ho...> - 2012-07-05 08:19:56
|
Hi Rajagopal! > The problem I face now is that when I execute read_register statement against one instrument, the others are not readable. This is strange. Try running in interactive mode, as described here: http://minimalmodbus.sourceforge.net/usage.html#interactive-usage Set the value minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL=True immediately after import minimalmodbus Then switch on debug mode, so you can see what actually is sent to/from the instruments. See: http://minimalmodbus.sourceforge.net/index.html#develop http://minimalmodbus.sourceforge.net/usage.html#interactive-usage (end of section) Paste the output (including error messages) into an email, and we will try to solve the problem. > Can I use minimalmodbus to read multiple registers in one read statement? Not at the moment, I generally loop through the registers to read. It is easy to extend MinimalModbus to read several registers. See: http://minimalmodbus.sourceforge.net/develop.html#extending-minimalmodbu s Instead of instr.read_register(5) you can use instr._performCommand(3, '\x00\x05\x00\x01') Where 3 = function code for reading registers \x00\x05 = register address (5) \x00\x01 = number of registers to read (1 here) Just increase the number of registers to read. You need to take care of the return data yourself. How the data should be formatted is described here: http://minimalmodbus.sourceforge.net/index.html#modbus-implementation-de tails Best regards Jonas <-----Ursprungligt Meddelande-----> From: Rajagopal Yadavalli [raj...@wi...] Sent: 5/7/2012 4:19:35 AM To: min...@li... Cc: nee...@wi... Subject: [Minimalmodbus-list] reading multiple registers at once My situation is that there are multiple instruments, each with multiple registers to be read simultaneously with one master using RTU. The problem I face now is that when I execute read_register statement against one instrument, the others are not readable. I have setup minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True but it does not help. We are running Windows XP. Now I am installing Linux on master and will try the same code to see if that is a windows specific issue, but in the meanwhile, I wanted to check if you have any pointers for me. On the same note, I have another question. Can I use minimalmodbus to read multiple registers in one read statement, may be provide the read_register function a register number, and a count of registers from there on to read.. like instead of instrument.read_register(289, 1) instrument.read_register(289, 10, 1) # where 10 is number of registers to read after 289 Is this possible with minimalmodbus? Thanks for the help. Regards, Rajagopal -- +91.99490.31262 <http://www.winnou.com/new/images/winnoulogowhite.png> <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://www.tkqlhce.com/click-5762941-10467706" target="_top">InkClub.com - Bläckpatron och fotopapper från 1:-</a><img src="http://www.lduhtrp.net/image-5762941-10467706" width="1" height="1" border="0"/></font> |
From: Rajagopal Y. <raj...@wi...> - 2012-07-05 02:51:25
|
My situation is that there are multiple instruments, each with multiple registers to be read simultaneously with one master using RTU. The problem I face now is that when I execute read_register statement against one instrument, the others are not readable. I have setup minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True but it does not help. We are running Windows XP. Now I am installing Linux on master and will try the same code to see if that is a windows specific issue, but in the meanwhile, I wanted to check if you have any pointers for me. On the same note, I have another question. Can I use minimalmodbus to read multiple registers in one read statement, may be provide the read_register function a register number, and a count of registers from there on to read.. like instead of instrument.read_register(289, 1) instrument.read_register(289, 10, 1) # where 10 is number of registers to read after 289 Is this possible with minimalmodbus? Thanks for the help. Regards, Rajagopal -- +91.99490.31262 |
From: Jonas B. <jon...@ho...> - 2012-07-03 06:57:16
|
Hi Alex > It looks like the package minimalmodbus read-register function only supports reading 2 byte registers populated with integer values. Yes, this is true. > ...is there a way to make it read 2 consecutive registers storing a 4 byte float? Yes, but you need to do some data manipulation yourself. See: http://minimalmodbus.sourceforge.net/develop.html#extending-minimalmodbu s You basically use instr._performCommand(3, '\x00\x05\x00\x02') where 3=function code for reading registers \x00\x05 is the start address (here 0x0005) \x00\x02 is the number of registers (here 2) Then you need to convert the data payload (the 4 bytes) to a float yourself. Use similar to read your string (8 registers). I think MinimalModbus should be updated to handle these requests more elegantly. Any help is appreciated. The source is very easy to read, so please dive in. The controllers I use only handle integers. Which instrument/controller are you using, so I can have a look in the manual (if it is available on line)? Then I can help implement the missing functions. Best regards Jonas <-----Ursprungligt Meddelande-----> From: Alex van der Spek [zd...@xs...] Sent: 2/7/2012 4:06:21 PM To: min...@li... Subject: [Minimalmodbus-list] minimalmodbus It looks like the package minimalmodbus read-register function only supports reading 2 byte registers populated with integer values. Is this true or is there a way to make it read 2 consecutive registers storing a 4 byte float. Similary, I would be interested in reading 8 consecutive registers storing a 16 byte string. Thank you, Alex van der Spek ------------------------------------------------------------------------ ------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Minimalmodbus-list mailing list Min...@li... https://lists.sourceforge.net/lists/listinfo/minimalmodbus-list . <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://www.kqzyfj.com/click-5762941-10551066" target="_top">Flygpoolen.se - Vi hjälper dig boka din resa på nätet!</a><img src="http://www.tqlkg.com/image-5762941-10551066" width="1" height="1" border="0"/></font> |
From: Alex v. d. S. <zd...@xs...> - 2012-07-02 14:06:36
|
It looks like the package minimalmodbus read-register function only supports reading 2 byte registers populated with integer values. Is this true or is there a way to make it read 2 consecutive registers storing a 4 byte float. Similary, I would be interested in reading 8 consecutive registers storing a 16 byte string. Thank you, Alex van der Spek |
From: Jonas B. <jon...@ho...> - 2012-06-01 08:31:44
|
Hi Asier, this might be some problem with the pySerial module version. Please provide the output after writing this at the interactive promt: import minimalmodbus print minimalmodbus._getDiagnosticString() It will help pinpointing the problem. It would be good if you also could provide the full error message output (traceback), and a larger chunk of your code. Best regards Jonas <-----Ursprungligt Meddelande-----> From: Asier Abalos [aa...@el...] Sent: 31/5/2012 10:49:33 AM To: min...@li... Subject: [Minimalmodbus-list] Error in serialutil.py Hi, I have a problem in serialutil.py and It happens when I use this (instrument=minimalmodbus.Instrument('com1',1) ) in the main programm This is the error: NameError: global name 'basestring' is not defined. Thank you very much for your help. Asier Abalos Legazpia <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Annons: <a href="http://www.anrdoezrs.net/click-5762941-10562022" target="_top">Just nu på Bygghemma.se - Upp till 25% på alla dörrar, fönster från Allmogefönster. Fritt hemkört!</a><img src="http://www.ftjcfx.com/image-5762941-10562022" width="1" height="1" border="0"/></font> |
From: Asier A. <aa...@el...> - 2012-05-31 09:46:09
|
Hi, I have a problem in serialutil.py and It happens when I use this (instrument=minimalmodbus.Instrument('com1',1) ) in the main programm This is the error: NameError: global name 'basestring' is not defined. Thank you very much for your help. Asier Abalos Legazpia |
From: Jonas B. <jon...@ho...> - 2012-01-30 02:55:10
|
Now version 0.3.2 of MinimalModbus is released. Compared to version 0.3, this version fully supports 'pip install'. /Jonas <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Få 50-90 % rabatt i din stad - Gratis! <b><a href="http://s1.adwatcher.net/sellbranch/tracker.php?t=46" target="_blank">Se dagens Deal här</a></b><br>På upplevelser, middagar, sportevenemang, teknik, resor och mer. </font> |
From: Jonas B. <jon...@ho...> - 2012-01-26 20:20:08
|
MinimalModbus 0.3 has now been released! More modbus function codes are supported, and it is now fully tested with Python3. There is now an option to close the serial port after each call (useful for Windows XP etc). Unit tests has been included in the distribution, and a dummy serial port for unit testing is provided (including recorded communication data). An example driver for Omega CN7500 process controllers is included. Also the documentation, error messages and debugging options have been improved. <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Få 50-90 % rabatt i din stad - Gratis! <b><a href="http://s1.adwatcher.net/sellbranch/tracker.php?t=46" target="_blank">Se dagens Deal här</a></b><br>På upplevelser, middagar, sportevenemang, teknik, resor och mer. </font> |
From: Aaron L. <cla...@gm...> - 2012-01-24 19:26:51
|
This is a test email from Aaron. |
From: Jonas B. <jon...@ho...> - 2011-12-15 08:06:18
|
Test 1 /J <P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Få 50-90 % rabatt i din stad - Gratis! - <b><a href="http://secure-dk.imrworldwide.com/cgi-bin/b?ci=aller-kampanj-se&cg=spray&tu=http%3A%2F%2Fwww.spray.se%2Fdeals" target="_blank">Se dagens Deal här</a></b><br>På upplevelser, middagar, sportevenemang, teknik, resor och mer. </font> |